Tencent / tdesign-vue-next

A Vue3.x UI components lib for TDesign.
https://tdesign.tencent.com/vue-next
MIT License
1.35k stars 446 forks source link

[t-date-range-picker] presets 类型报错 #3750

Open DoctorWei opened 6 months ago

DoctorWei commented 6 months ago

tdesign-vue-next 版本

1.7.1

重现链接

No response

重现步骤

 <t-date-range-picker
    v-model="dateArr"
    :placeholder="['创建开始日期', '创建结束日期']"
    clearable
    :first-day-of-week="7"
    class="operation-date"
    presets-placement="left"
    :presets="PRESETS"
  />
import dayjs from 'dayjs';
const PRESETS = ref({
  今天: [dayjs().toString(), dayjs().toString()],
  近3天: [dayjs().subtract(2, 'day'), dayjs()],
  近7天: [dayjs().subtract(6, 'day'), dayjs()],
  近30天: [dayjs().subtract(29, 'day'), dayjs()],
  近1年: [dayjs().subtract(365, 'day'), dayjs()],
});

期望结果

不报错

实际结果

image

框架版本

tdesign-vue-next-starter

浏览器版本

No response

系统版本

window10

Node版本

v20.10.0

补充说明

No response

github-actions[bot] commented 6 months ago

👋 @DoctorWei,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。