1

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