hookehuyr

fix 日期控件的月份计算问题处理,月份从0开始需要+1

<!--
* @Date: 2022-08-31 11:45:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-13 15:54:10
* @LastEditTime: 2024-06-13 17:52:57
* @FilePath: /data-table/src/components/DatePickerField/index.vue
* @Description: 日期选择组件
-->
......@@ -82,7 +82,7 @@ onMounted(() => {
let Day = '';
if (!props.item.component_props.default) {
Year = String(dayjs().year());
Month = formatZero(dayjs().month(), 2);
Month = formatZero(dayjs().month()+1, 2);
Day = formatZero(dayjs().date(), 2);
} else {
Year = currentDate.value[0];
......
<!--
* @Date: 2022-09-08 15:02:45
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-13 15:56:40
* @LastEditTime: 2024-06-13 17:53:14
* @FilePath: /data-table/src/components/DateTimePickerField/index.vue
* @Description: 日期时间选择器
-->
......@@ -91,7 +91,7 @@ onMounted(() => {
let Day = '';
if (!props.item.component_props.default) {
Year = String(dayjs().year());
Month = formatZero(dayjs().month(), 2);
Month = formatZero(dayjs().month()+1, 2);
Day = formatZero(dayjs().date(), 2);
} else {
Year = currentDate.value[0];
......