edit user.

This commit is contained in:
2023-03-20 13:53:18 +08:00
parent 0fa885d892
commit efbc21ba18
9 changed files with 181 additions and 20 deletions

View File

@@ -10,8 +10,8 @@ const emit = defineEmits(["deleted"])
const router = useRouter()
const message = useMessage()
async function handleDeleteProblem(problemID: number) {
await deleteProblem(problemID)
async function handleDeleteProblem() {
await deleteProblem(props.problemID)
message.success("删除成功")
emit("deleted")
}
@@ -32,7 +32,7 @@ function goEdit() {
<n-button size="small" secondary type="primary" @click="goEdit">
编辑
</n-button>
<n-popconfirm @positive-click="() => handleDeleteProblem(props.problemID)">
<n-popconfirm @positive-click="handleDeleteProblem">
<template #trigger>
<n-button secondary size="small" type="error">删除</n-button>
</template>