Quellcode durchsuchen

fix:修改clear date range没有清空的bug

AmandaG vor 4 Monaten
Ursprung
Commit
8f9f83064b

+ 5 - 3
src/components/DateRange/src/DateRange.vue

@@ -15,10 +15,12 @@ onMounted(() => {
   emitter.on('clearTag', (tag: any) => {
     if (tag.includes('ETD')) {
       clearDateStart()
-    } else if (tag.includes('ETA')) {
+    }
+    if (tag.includes('ETA')) {
+      clearDateEnd()
+    }
+    if (tag.includes('Creation Time')) {
       clearDateEnd()
-    } else {
-      clearDateCreation()
     }
   })
   emitter.on('clearDaterangeObj', () => {

+ 2 - 0
src/components/DateRange/src/components/CalendarDate.vue

@@ -32,6 +32,8 @@ watch(
         current[0] ? dayjs(current[0]).format(valueFormatDate) : '',
         current[1] ? dayjs(current[1]).format(valueFormatDate) : ''
       ]
+    } else {
+      ETDDate.value  = []
     }
   },
   { immediate: true, deep: true }