选择了日期范围后,没有清除的api,该怎么才能清除初始化日期呢
3条回答 默认 最新
- 听听那晚风 2022-01-10 17:26关注
<van-calendar safe-area-inset-bottom v-model="AlldateShow" type="range" ref="alltime" color="#2c79ef" :min-date="minDate" > <template slot="footer"> <div class="timeTrue" @click="onConfirmAll">确定</div> <div class="clearTime" @click="clearTimeAll">清除时间</div> </template> </van-calendar> clearTimeAll(){ this.$refs.alltime.defaultDate=null //也可以用实例方法reset() this.$refs.alltime.reset(date) }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用 19