feat: 新增级联菜单删除按钮

This commit is contained in:
xlsea
2025-06-05 21:45:34 +08:00
parent f81a65a359
commit 40f3fbbd77
7 changed files with 145 additions and 5 deletions

View File

@ -9,11 +9,13 @@ defineOptions({ name: 'MenuTree' });
interface Props {
immediate?: boolean;
showHeader?: boolean;
[key: string]: any;
}
const props = withDefaults(defineProps<Props>(), {
immediate: true
immediate: true,
showHeader: true
});
const { bool: expandAll } = useBoolean();
@ -106,7 +108,7 @@ defineExpose({
<template>
<div class="w-full flex-col gap-12px">
<div class="w-full flex-center">
<div v-if="showHeader" class="w-full flex-center">
<NCheckbox v-model:checked="expandAll" :checked-value="true" :unchecked-value="false">展开/折叠</NCheckbox>
<NCheckbox
v-model:checked="checkAll"