Skip to content

DateRange 日期范围

💡 组件名:my-date-range

日期范围组件

局部导入

ts
import { defineAsyncComponent } from 'vue'
ts
const MyDateRange = defineAsyncComponent(() => import('/@/components/my-date-range/index.vue'))

基本使用

vue
<MyDateRange
  v-model:startDate="state.filter.addStartTime as string"
  v-model:endDate="state.filter.addEndTime as string"
  style="width: 230px"
/>

不设置快捷选项

vue
<MyDateRange
  v-model:startDate="state.filter.addStartTime as string"
  v-model:endDate="state.filter.addEndTime as string"
  :shortcuts="[]"
  style="width: 230px"
/>

Props

参数说明类型默认值可选值
startDate开始日期String--
endDate结束日期String--