소스 검색

修复年度和年月组件清空事件的时间显示异常和报错问题

luoaoxuan 1 년 전
부모
커밋
12143ec02d
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/business/platform/form/formrender/dynamic-form/dynamic-form-field.vue

+ 4 - 0
src/business/platform/form/formrender/dynamic-form/dynamic-form-field.vue

@@ -1039,6 +1039,10 @@ export default {
         },
         // 日期格式调整
         selectTime (val) {
+            if (!val) {
+                this.dataModel = ''
+                return
+            }
             const date = new Date(new Date())
             const year = date.getFullYear()
             const month = this.trans(date.getMonth() + 1)