浏览代码

feat: 添加热点bug

rindy 2 年之前
父节点
当前提交
912c812817
共有 1 个文件被更改,包括 8 次插入10 次删除
  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