hookehuyr

fix 默认值为空判断

<!--
* @Date: 2022-09-08 15:02:45
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-13 17:53:14
* @LastEditTime: 2024-06-13 18:22:45
* @FilePath: /data-table/src/components/DateTimePickerField/index.vue
* @Description: 日期时间选择器
-->
......@@ -81,7 +81,7 @@ const maxDate = ref()
onMounted(() => {
// 根据默认值时间调整显示
props.item.value = props.item.component_props.default;
props.item.value = props.item.component_props.default ? props.item.component_props.default : '';
const datetime = props.item.component_props.default ? props.item.component_props.default.split(" ") : props.item.value?.split(" ");
currentDate.value = datetime[0]?.split("-");
currentTime.value = datetime[1]?.split(":");
......