Commit 0733b5e6 authored by youjie's avatar youjie

优化类型,列表日期样式

parent 601ec0c7
...@@ -325,19 +325,21 @@ ...@@ -325,19 +325,21 @@
</div> </div>
<template v-for="(x, i) in categoryList"> <template v-for="(x, i) in categoryList">
<div class="category-btn" :key="i" :label="x.CategoryName" flat unelevated <div class="category-btn" :key="i" :label="x.CategoryName" flat unelevated
:content-style="{ hover: '#ff0000' }" @mouseenter="typeHover(i, true)" @mouseleave="typeHover(i, false)"> :content-style="{ hover: '#ff0000' }" @mouseenter="typeHover(i, true)" @mouseleave="typeHover(i, false)"
@click="x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':handleCategoryChage(x)"
:class="[x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':'cursor-pointer']">
{{ x.CategoryName }} {{ x.CategoryName }}
<q-menu ref="menu" :key="i" @mouseenter="menuFocus = 2" @mouseleave="menuLeave(i)"> <q-menu ref="menu" :key="i" @mouseenter="menuFocus = 2" @mouseleave="menuLeave(i)">
<div class="category-box"> <div class="category-box" v-if="x.SubList&&x.SubList.length>0">
<div :key="index" v-for="(item,index) in x.SubList"> <div :key="index" v-for="(item,index) in x.SubList">
<div @click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)" <div @click.stop="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2" :class="{ class="category-l2" :class="{
'category-l2-select': selectCategory === item.Id, 'category-l2-select': selectCategory === item.Id,
}"> }">
{{ item.CategoryName }} {{ item.CategoryName }}
</div> </div>
<div v-if="item.SubList&&item.SubList.length"> <div v-if="item.SubList&&item.SubList.length">
<div @click="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)" <div @click.stop="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3" :class="{ class="category-l3" :class="{
'category-l3-select': selectCategory === item2.Id, 'category-l3-select': selectCategory === item2.Id,
}" :key="index" v-for="(item2,index) in item.SubList"> }" :key="index" v-for="(item2,index) in item.SubList">
......
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
> >
{{ x.productRecommend }} {{ x.productRecommend }}
</div> </div>
<div class="row items-center f12 text-grey-6 q-mt-md"> <div class="row items-center f12 text-grey-6 q-mt-md" style="align-items: center;">
<q-icon size="12px" name="iconfont icondingweixiao" class="q-mr-sm" /> <q-icon size="12px" name="iconfont icondingweixiao" class="q-mr-sm" />
<span class="q-mr-lg" @click="GotoDetails(x)">{{ x.countryName }}</span> <span class="q-mr-lg" @click="GotoDetails(x)">{{ x.countryName }}</span>
<q-icon <q-icon
...@@ -380,15 +380,36 @@ ...@@ -380,15 +380,36 @@
></q-icon> ></q-icon>
<template v-if="x.startDateList && x.startDateList.length > 0"> <template v-if="x.startDateList && x.startDateList.length > 0">
<template v-if="x.startDateList.length > 1"> <template v-if="x.startDateList.length > 1">
<q-badge <template v-for="(item, index) in x.startDateList">
outline <q-badge v-if="index<4"
:color="x.index == index ? 'secondary' : 'blue-grey-4'" outline
:label="item" :color="x.index == index ? 'secondary' : 'blue-grey-4'"
v-for="(item, index) in x.startDateList" :label="item"
:key="index" :key="index"
style="margin-right: 5px; margin-bottom: 7px" style="margin-right: 5px;"
@click="SwitchTCID(x, i, index)" @click="SwitchTCID(x, i, index)"
/> />
</template>
<span v-if="x.startDateList.length>4" class="row q-pl-sm">
<a>更多</a>
<q-icon name="iconfont iconpreviewright" size="18px" color="grey" class="cursor-pointer" v-ripple />
<q-menu ref="MoreDates" :key="i" @mouseenter="menuFocus = 2" @mouseleave="menuLeave(i)">
<div class="q-pl-sm q-pt-sm row" style="max-width: 330px;">
<div :key="index" v-for="(item,index) in x.startDateList">
<q-badge v-if="index>3"
class="cursor-pointer"
:class="[x.startDateList.length-1==index?'q-mb-sm':'q-mb-xs']"
outline
:color="x.index == index ? 'secondary' : 'blue-grey-4'"
:label="item"
:key="index"
style="margin-right: 5px;"
@click="SwitchTCID(x, i, index)"
/>
</div>
</div>
</q-menu>
</span>
</template> </template>
<template v-else> <template v-else>
<q-badge outline color="secondary" :label="x.startDateList[0]" /> <q-badge outline color="secondary" :label="x.startDateList[0]" />
...@@ -561,6 +582,7 @@ export default { ...@@ -561,6 +582,7 @@ export default {
max: 40000, max: 40000,
}, },
CityList: [], CityList: [],
menuFocus: 0,
}; };
}, },
created() { created() {
...@@ -588,8 +610,13 @@ export default { ...@@ -588,8 +610,13 @@ export default {
}, },
methods: { methods: {
handleSelected(target) { menuLeave(i) {
this.menuFocus = 0;
setTimeout(() => {
if (!this.menuFocus) {
this.$refs.MoreDates[i].hide();
}
}, 50);
}, },
handleTicked(target) { handleTicked(target) {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
......
...@@ -669,6 +669,9 @@ export default { ...@@ -669,6 +669,9 @@ export default {
if(x.Id==1){ if(x.Id==1){
return; return;
} }
if(x.Id==this.msg.categoryId){
arr.push(x.Id);
}
x.checked = false; x.checked = false;
x.explsed = false; x.explsed = false;
x.isShow = true; x.isShow = true;
......
...@@ -680,6 +680,7 @@ ...@@ -680,6 +680,7 @@
} }
.desktop-page { .desktop-page {
max-width: 1200px; max-width: 1200px;
min-width: 1100px;
margin: 0 auto; margin: 0 auto;
} }
</style> </style>
......
...@@ -695,6 +695,7 @@ ...@@ -695,6 +695,7 @@
.desktop-page { .desktop-page {
max-width: 1200px; max-width: 1200px;
min-width: 1100px;
margin: 0 auto; margin: 0 auto;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment