[update] 修改bug81904

This commit is contained in:
lideqin
2024-02-20 15:44:47 +08:00
parent f1f99be551
commit 443559e809
+26 -7
View File
@@ -14,13 +14,32 @@
v-on="childListeners" v-on="childListeners"
@click="clickField" @click="clickField"
/> />
<van-calendar <van-popup
color="#3074F6"
v-model="showCalendar" v-model="showCalendar"
:min-date="minDate" position="bottom"
:max-date="maxDate" closeable
@confirm="onConfirm" round
/> safe-area-inset-bottom
close-on-click-overlay
close-on-popstate
>
<van-calendar
color="#3074F6"
:poppable="false"
:min-date="minDate"
:max-date="maxDate"
@confirm="onConfirm"
:style="{ width: '100%', height: '80vh' }"
/>
</van-popup>
<!-- 上面的方法只有第一次加载的时候卡之后加载不会卡 -->
<!-- <van-calendar-->
<!-- color="#3074F6"-->
<!-- v-model="showCalendar"-->
<!-- :min-date="minDate"-->
<!-- :max-date="maxDate"-->
<!-- @confirm="onConfirm"-->
<!-- />-->
</div> </div>
</template> </template>
@@ -48,7 +67,7 @@ export default {
return { return {
showCalendar: false, showCalendar: false,
minDate: new Date(2000, 0, 1), minDate: new Date(2000, 0, 1),
maxDate: new Date(2500, 0, 1) maxDate: new Date(2300, 0, 1) // 设置时间可选日期时间跨度太大的话显示和隐藏日历很卡
} }
}, },
computed: { computed: {