Browse Source

feat: 添加热点bug

rindy 2 years ago
parent
commit
912c812817
1 changed files with 8 additions and 10 deletions
  1. 8 10
      src/components/files/index.vue

+ 8 - 10
src/components/files/index.vue

@@ -227,17 +227,15 @@ const onAddConfirm = () => {
             tag = editTag
         }
         if (tag) {
-            // delete tag.__temp
-
-            if (tag) {
-                if (isAdd) {
-                    tag.__temp = true
-                    // tag._add = true
-                    isAdd = false
-                }
-
-                notify.value = tag
+            if (isAdd) {
+                tag.__temp = true
+                // tag._add = true
+                isAdd = false
             }
+
+            notify.value = tag
+        } else {
+            onAddCancel()
         }
     }
     editTag = null