Showing
3 changed files
with
6 additions
and
3 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-08-31 11:45:30 | 2 | * @Date: 2022-08-31 11:45:30 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-06-06 16:12:36 | 4 | + * @LastEditTime: 2024-06-13 14:30:42 |
| 5 | * @FilePath: /data-table/src/components/DatePickerField/index.vue | 5 | * @FilePath: /data-table/src/components/DatePickerField/index.vue |
| 6 | * @Description: 日期选择组件 | 6 | * @Description: 日期选择组件 |
| 7 | --> | 7 | --> |
| ... | @@ -75,6 +75,7 @@ const maxDate = ref() | ... | @@ -75,6 +75,7 @@ const maxDate = ref() |
| 75 | 75 | ||
| 76 | onMounted(() => { | 76 | onMounted(() => { |
| 77 | // 根据默认值时间调整显示 | 77 | // 根据默认值时间调整显示 |
| 78 | + props.item.value = props.item.component_props.default; | ||
| 78 | currentDate.value = props.item.component_props.default ? props.item.component_props.default.split("-") : props.item.value.split("-"); | 79 | currentDate.value = props.item.component_props.default ? props.item.component_props.default.split("-") : props.item.value.split("-"); |
| 79 | let Year = ''; | 80 | let Year = ''; |
| 80 | let Month = ''; | 81 | let Month = ''; | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-08 15:02:45 | 2 | * @Date: 2022-09-08 15:02:45 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-02-07 16:46:30 | 4 | + * @LastEditTime: 2024-06-13 14:32:20 |
| 5 | * @FilePath: /data-table/src/components/DateTimePickerField/index.vue | 5 | * @FilePath: /data-table/src/components/DateTimePickerField/index.vue |
| 6 | * @Description: 日期时间选择器 | 6 | * @Description: 日期时间选择器 |
| 7 | --> | 7 | --> |
| ... | @@ -81,6 +81,7 @@ const maxDate = ref() | ... | @@ -81,6 +81,7 @@ const maxDate = ref() |
| 81 | 81 | ||
| 82 | onMounted(() => { | 82 | onMounted(() => { |
| 83 | // 根据默认值时间调整显示 | 83 | // 根据默认值时间调整显示 |
| 84 | + props.item.value = props.item.component_props.default; | ||
| 84 | const datetime = props.item.component_props.default ? props.item.component_props.default.split(" ") : props.item.value.split(" "); | 85 | const datetime = props.item.component_props.default ? props.item.component_props.default.split(" ") : props.item.value.split(" "); |
| 85 | currentDate.value = datetime[0]?.split("-"); | 86 | currentDate.value = datetime[0]?.split("-"); |
| 86 | currentTime.value = datetime[1]?.split(":"); | 87 | currentTime.value = datetime[1]?.split(":"); | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-08-31 11:45:30 | 2 | * @Date: 2022-08-31 11:45:30 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-06-06 16:12:16 | 4 | + * @LastEditTime: 2024-06-13 14:33:24 |
| 5 | * @FilePath: /data-table/src/components/TimePickerField/index.vue | 5 | * @FilePath: /data-table/src/components/TimePickerField/index.vue |
| 6 | * @Description: 时间选择组件 | 6 | * @Description: 时间选择组件 |
| 7 | --> | 7 | --> |
| ... | @@ -62,6 +62,7 @@ const columns_type = ref([]); | ... | @@ -62,6 +62,7 @@ const columns_type = ref([]); |
| 62 | const date_format = props.item.component_props.data_dateformat; // HH:mm=时分,HH:mm:ss=时分秒 | 62 | const date_format = props.item.component_props.data_dateformat; // HH:mm=时分,HH:mm:ss=时分秒 |
| 63 | onMounted(() => { | 63 | onMounted(() => { |
| 64 | // 根据默认值时间调整显示 | 64 | // 根据默认值时间调整显示 |
| 65 | + props.item.value = props.item.component_props.default; | ||
| 65 | currentTime.value = props.item.component_props.default ? props.item.component_props.default.split(":") : props.item.value.split(":"); | 66 | currentTime.value = props.item.component_props.default ? props.item.component_props.default.split(":") : props.item.value.split(":"); |
| 66 | let Hour = '' | 67 | let Hour = '' |
| 67 | let Minute = '' | 68 | let Minute = '' | ... | ... |
-
Please register or login to post a comment