|
@@ -38,24 +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') {
|
|
|
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)
|
|
@@ -64,6 +66,7 @@ const handlerDel = status => {
|
|
|
notify.value = null
|
|
|
}
|
|
|
} else {
|
|
|
+ showTips.value = response.message
|
|
|
}
|
|
|
delComfirm.value = null
|
|
|
})
|