mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2025-10-15 14:20:30 +00:00
@@ -44,6 +44,7 @@
|
|||||||
:default-expand-all="false"
|
:default-expand-all="false"
|
||||||
lazy
|
lazy
|
||||||
:load="getChildrenList"
|
:load="getChildrenList"
|
||||||
|
:expand-change="expandMenuHandle"
|
||||||
>
|
>
|
||||||
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
||||||
<el-table-column prop="icon" label="图标" align="center" width="100">
|
<el-table-column prop="icon" label="图标" align="center" width="100">
|
||||||
@@ -353,6 +354,13 @@ const getChildrenList = async (row: any, treeNode: unknown, resolve: (data: any[
|
|||||||
resolve(children);
|
resolve(children);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 收起菜单时从menuExpandMap中删除对应菜单id数据 */
|
||||||
|
const expandMenuHandle = async (row: any, expanded: boolean) => {
|
||||||
|
if (!expanded) {
|
||||||
|
menuExpandMap.value[row.menuId] = undefined;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/** 刷新展开的菜单数据 */
|
/** 刷新展开的菜单数据 */
|
||||||
const refreshLoadTree = (parentId: string | number) => {
|
const refreshLoadTree = (parentId: string | number) => {
|
||||||
if (menuExpandMap.value[parentId]) {
|
if (menuExpandMap.value[parentId]) {
|
||||||
|
Reference in New Issue
Block a user