<template>
<div>
<a-range-picker format='YYYY-MM-DD' @change='onUpdateChange'
:default=value='[dataParams.updatedTime_begin, dataParams.updateTime_end]/>
</div>
</template>
<script setup>
const dataParams = ref({
updatedTime_begin: moment(
moment()
.add(-30, 'days')
.startOf('day')
.valueOf()
).format('YYYY-MM-DD '),
updatedTime_end: moment(
moment()
.add(0, 'days')
.endOf('day')
.valueOf()
).format('YYYY-MM-DD '),
});
const onUpdateChange = (date, dateString) => {
this.dataParams.updatedTime_begin = dateString[0]
this.dataParams.updatedTime_end = dateString[1]
}
</script>
标签:updatedTime,片段,DD,valueOf,复用,dateString,dataParams,moment,AntDesign
From: https://www.cnblogs.com/openmind-ink/p/17161553.html