소스 검색

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