|
|
@@ -51,8 +51,8 @@ const handleCategoryDialogClosed = () => {
|
|
|
isEdit.value = false
|
|
|
currentTableData.value = {}
|
|
|
}
|
|
|
-const deleteCategoryClick = async (category: Category) => {
|
|
|
- await deleteCategoryRequest({ id: category.id })
|
|
|
+const deleteCategoryClick = async (id: string) => {
|
|
|
+ await deleteCategoryRequest(id)
|
|
|
fetchData()
|
|
|
MessagePlugin.success('删除分类成功')
|
|
|
}
|
|
|
@@ -80,13 +80,6 @@ const deleteCategoryClick = async (category: Category) => {
|
|
|
onChange: onPageChange
|
|
|
}"
|
|
|
>
|
|
|
- <template #roles="{ row }">
|
|
|
- <TSpace>
|
|
|
- <TTag v-for="role in row.roles" :key="role.id" theme="success" variant="light">{{
|
|
|
- role.label
|
|
|
- }}</TTag>
|
|
|
- </TSpace>
|
|
|
- </template>
|
|
|
<template #operation="{ row }">
|
|
|
<TSpace :size="1">
|
|
|
<TButton variant="text" size="small" theme="primary" @click="editClick(row)"
|
|
|
@@ -95,7 +88,7 @@ const deleteCategoryClick = async (category: Category) => {
|
|
|
<t-popconfirm
|
|
|
theme="default"
|
|
|
content="确认删除此项分类吗"
|
|
|
- @confirm="deleteCategoryClick(row)"
|
|
|
+ @confirm="deleteCategoryClick(row.id)"
|
|
|
>
|
|
|
<TButton variant="text" size="small" theme="danger">删除</TButton>
|
|
|
</t-popconfirm>
|