feature:分类管理接口对接

This commit is contained in:
chen committed 2024-11-21 22:56:56 +08:00
1 parent 37a8db0055
commit 0cfcebdebd
4 files changed
+7 -16

No files matched your search

+3 -10
View File
@@ -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>