|
@@ -38,7 +38,7 @@
|
|
<div>{{ $t('tag.deleteTagText') }}</div>
|
|
<div>{{ $t('tag.deleteTagText') }}</div>
|
|
</template>
|
|
</template>
|
|
</ui-confirm>
|
|
</ui-confirm>
|
|
- <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
|
|
|
|
|
|
+ <Toast v-if="showTips" :type="toastOps" :content="showTips" :close="() => (showTips = null)" />
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
import { ref, inject, watchEffect, onMounted, nextTick, watch } from 'vue'
|
|
import { ref, inject, watchEffect, onMounted, nextTick, watch } from 'vue'
|
|
@@ -54,12 +54,17 @@ const props = defineProps(['show'])
|
|
const emits = defineEmits(['add', 'exit'])
|
|
const emits = defineEmits(['add', 'exit'])
|
|
// const source = inject('source')
|
|
// const source = inject('source')
|
|
const showTips = ref(null)
|
|
const showTips = ref(null)
|
|
|
|
+const toastOps = ref({
|
|
|
|
+ type: 'success',
|
|
|
|
+})
|
|
const handlerDel = status => {
|
|
const handlerDel = status => {
|
|
if (status == 'ok') {
|
|
if (status == 'ok') {
|
|
http.post(`smart-site/marking/del`, {
|
|
http.post(`smart-site/marking/del`, {
|
|
markingId: delComfirm.value.id,
|
|
markingId: delComfirm.value.id,
|
|
}).then(response => {
|
|
}).then(response => {
|
|
if (response.success) {
|
|
if (response.success) {
|
|
|
|
+ toastOps.value.type = 'success'
|
|
|
|
+ showTips.value = '删除成功'
|
|
let index = tags.value.findIndex(item => item.sid == delComfirm.value.sid)
|
|
let index = tags.value.findIndex(item => item.sid == delComfirm.value.sid)
|
|
if (index != -1) {
|
|
if (index != -1) {
|
|
tags.value.splice(index, 1)
|
|
tags.value.splice(index, 1)
|
|
@@ -68,6 +73,7 @@ const handlerDel = status => {
|
|
notify.value = null
|
|
notify.value = null
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ toastOps.value.type = 'warm'
|
|
showTips.value = response.message
|
|
showTips.value = response.message
|
|
}
|
|
}
|
|
delComfirm.value = null
|
|
delComfirm.value = null
|