添加了删除提示
This commit is contained in:
parent
77664c98e3
commit
fb173c548d
@ -137,6 +137,7 @@
|
||||
<script lang="ts">
|
||||
import { delreply, getcommentlist } from '@/api';
|
||||
import { useI18n } from '@/utils/i18n';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { defineComponent, onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import ReviewItemtwo from "./ReviewItemtwo.vue"
|
||||
@ -219,13 +220,7 @@ export default defineComponent({
|
||||
replylist.value =await getcommentlist({type: 3,id: e})
|
||||
ifshow.value = true;
|
||||
}
|
||||
async function del(e?: number){
|
||||
console.log(e)
|
||||
const res=await delreply(e)
|
||||
|
||||
}
|
||||
|
||||
async function reload() {
|
||||
async function reload() {
|
||||
if(iszk.value == true){
|
||||
iszk.value = false;
|
||||
if(prop.replyid){
|
||||
@ -234,6 +229,17 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
}
|
||||
async function del(e?: number){
|
||||
console.log(e)
|
||||
const res=await delreply(e)
|
||||
if(res.code != 0){
|
||||
message.error(res.msg)
|
||||
}
|
||||
reload()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return {
|
||||
stars,
|
||||
|
@ -100,6 +100,7 @@
|
||||
import { delreply } from '@/api';
|
||||
import store from '@/store';
|
||||
import { useI18n } from '@/utils/i18n';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { defineComponent, ref } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
@ -139,6 +140,8 @@ export default defineComponent({
|
||||
const res=await delreply(e)
|
||||
if(res.code==0){
|
||||
context.emit("reload",prop.replyid)
|
||||
}else {
|
||||
message.error(res.msg)
|
||||
}
|
||||
console.log(res)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user