Showing
1 changed file
with
3 additions
and
2 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: 2023-04-07 15:51:31 | 4 | + * @LastEditTime: 2023-04-07 16:41:59 |
| 5 | * @FilePath: /custom_form/src/components/DatePickerField/index.vue | 5 | * @FilePath: /custom_form/src/components/DatePickerField/index.vue |
| 6 | * @Description: 日期选择组件 | 6 | * @Description: 日期选择组件 |
| 7 | --> | 7 | --> |
| ... | @@ -50,7 +50,7 @@ const HideShow = computed(() => { | ... | @@ -50,7 +50,7 @@ const HideShow = computed(() => { |
| 50 | }) | 50 | }) |
| 51 | 51 | ||
| 52 | const showPicker = ref(false); | 52 | const showPicker = ref(false); |
| 53 | -const popupDesc = ref('请选择'); | 53 | +const popupDesc = ref(''); |
| 54 | let minDate = new Date(2020, 0, 1); | 54 | let minDate = new Date(2020, 0, 1); |
| 55 | let maxDate = new Date(2035, 10, 1); | 55 | let maxDate = new Date(2035, 10, 1); |
| 56 | const currentDate = ref(''); | 56 | const currentDate = ref(''); |
| ... | @@ -77,6 +77,7 @@ const date_format = props.item.component_props.data_dateformat; // YYYY-MM=å¹´æœ | ... | @@ -77,6 +77,7 @@ const date_format = props.item.component_props.data_dateformat; // YYYY-MM=å¹´æœ |
| 77 | 77 | ||
| 78 | onMounted(() => { | 78 | onMounted(() => { |
| 79 | // 根据默认值时间调整显示 | 79 | // 根据默认值时间调整显示 |
| 80 | + popupDesc.value = props.item.component_props.default ? props.item.component_props.default : '请选择'; | ||
| 80 | currentDate.value = new Date(props.item.component_props.default); | 81 | currentDate.value = new Date(props.item.component_props.default); |
| 81 | switch (date_format) { | 82 | switch (date_format) { |
| 82 | case "YYYY-MM": | 83 | case "YYYY-MM": | ... | ... |
-
Please register or login to post a comment