1

parent 19156449
......@@ -37,6 +37,10 @@ const props = defineProps({
},
});
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
onMounted(async () => {
getStartDateList();
});
......
......@@ -86,10 +86,10 @@
<wd-icon size="24rpx" class="icons"></wd-icon>
</view>
</view>
<Sort v-show="rotate" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" @placeParams="placeParams" />
<Screen v-show="rotate4" @screenParams="screenParams" />
<Sort v-show="rotate" ref="sortRef" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" ref="departureDateRef" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" ref="scenicSpotsRef" @placeParams="placeParams" />
<Screen v-show="rotate4" ref="screenRef" @screenParams="screenParams" />
</view>
<view class="list">
<view @click="jumpPage(item)" class="item" v-for="(item, index) in cardData" :key="index">
......@@ -140,6 +140,10 @@ const textColor = ref('#ffffff');
const backIconColor = ref('white');
const current = ref(0);
const isLoadReachBottom = ref(null);
const sortRef = ref(null);
const departureDateRef = ref(null);
const scenicSpotsRef = ref(null);
const screenRef = ref(null);
const params = ref({
current: 1,
size: 15,
......@@ -235,6 +239,12 @@ const screenParams = (item, type) => {
});
};
const resetParams = () => {
if (sortRef.value || departureDateRef.value || scenicSpotsRef.value || screenRef.value) {
sortRef.value.reset();
departureDateRef.value.reset();
scenicSpotsRef.value.reset();
screenRef.value.reset();
}
params.value = {
size: 15,
current: 1,
......
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