添加后端评论的管理页面

This commit is contained in:
2024-07-02 23:53:13 +08:00
parent 60c1a495f2
commit 73eb288d3c
18 changed files with 198 additions and 22 deletions
@@ -0,0 +1,23 @@
<script lang="ts" setup>
import { deleteComment } from '~/admin/api';
const props = defineProps<{commentID: number}>()
const emit = defineEmits(["deleted"])
const message = useMessage()
async function submit() {
await deleteComment(props.commentID)
message.success("成功删除")
emit("deleted")
}
</script>
<template>
<n-popconfirm @positive-click="submit">
<template #trigger>
<n-button secondary size="small" type="error">删除</n-button>
</template>
确定删除这条评论吗
</n-popconfirm>
</template>