浏览代码

fix: 添加标注后再删除报错

jinx 2 年之前
父节点
当前提交
7e9519e44f
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 2
      src/components/files/TagEditor.vue
  2. 1 0
      src/components/files/index.vue

+ 2 - 2
src/components/files/TagEditor.vue

@@ -168,13 +168,13 @@ const handlerUpload = async data => {
                 pushData.content = tag.content
                 pushData.members = tag.members
                 pushData.createTime = response.data.createTime
-                console.error(pushData)
+              
                 tags.value.push(pushData)
                 pushData = null
             }
             isEdit.value = false
             delete notify.value.__temp
-            notify.value.id = response.data
+            notify.value.id = response.data.markingId
             notify.value = null
         } else if (response.code == 4008) {
             showTips.value = t('code.4008')

+ 1 - 0
src/components/files/index.vue

@@ -51,6 +51,7 @@ const props = defineProps(['show'])
 const emits = defineEmits(['add', 'exit'])
 const handlerDel = status => {
     if (status == 'ok') {
+      console.log(tags.value)
         http.post(`smart-site/marking/del`, {
             markingId: delComfirm.value.id,
         }).then(response => {