jinx 2 년 전
부모
커밋
418469d3e0
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/components/files/index.vue

+ 4 - 2
src/components/files/index.vue

@@ -38,25 +38,26 @@
             <div>{{ $t('tag.deleteTagText') }}</div>
         </template>
     </ui-confirm>
+    <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
 </template>
 <script setup>
 import { ref, inject, watchEffect, onMounted, nextTick } from 'vue'
 import { http } from '@/utils/request'
 import UiConfirm from '@/components/dialog/Confirm.vue'
+import Toast from '@/components/dialog/Toast'
 let editTag = null
 let tempTag = null
 const exit$ = ref(null)
 const add$ = ref(null)
 const props = defineProps(['show'])
 const emits = defineEmits(['add', 'exit'])
+const showTips = ref(null)
 const handlerDel = status => {
     if (status == 'ok') {
-      console.log(tags.value)
         http.post(`smart-site/marking/del`, {
             markingId: delComfirm.value.id,
         }).then(response => {
             if (response.success) {
-                console.log(delComfirm.value)
                 let index = tags.value.findIndex(item => item.sid == delComfirm.value.sid)
                 if (index != -1) {
                     tags.value.splice(index, 1)
@@ -65,6 +66,7 @@ const handlerDel = status => {
                     notify.value = null
                 }
             } else {
+                showTips.value = response.message
             }
             delComfirm.value = null
         })