调试frontend
This commit is contained in:
@@ -156,6 +156,11 @@ function toggleExpand(category) {
|
||||
}
|
||||
|
||||
function handleDelete(category) {
|
||||
if (Number(category.tid) === 0 || category.is_global === true) {
|
||||
ElMessage.warning("全局分类不可删除");
|
||||
return;
|
||||
}
|
||||
|
||||
ElMessageBox.confirm(`确定要删除分类\"${category.label}\"吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
|
||||
@@ -53,9 +53,18 @@
|
||||
<el-button type="text" title="添加子分类" @click.stop="$emit('add-child', item)">
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-button>
|
||||
<el-button type="text" class="danger" title="删除" @click.stop="$emit('delete', item)">
|
||||
<el-button
|
||||
v-if="item.tid !== 0"
|
||||
type="text"
|
||||
class="danger"
|
||||
title="删除"
|
||||
@click.stop="$emit('delete', item)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
<el-tag v-else type="info" size="small" title="全局分类不可删除">
|
||||
全局
|
||||
</el-tag>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user