|
|
|
|
@ -44,6 +44,7 @@
|
|
|
|
|
:default-expand-all="false"
|
|
|
|
|
lazy
|
|
|
|
|
:load="getChildrenList"
|
|
|
|
|
:expand-change="expandMenuHandle"
|
|
|
|
|
>
|
|
|
|
|
<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">
|
|
|
|
|
@ -353,6 +354,13 @@ const getChildrenList = async (row: any, treeNode: unknown, resolve: (data: any[
|
|
|
|
|
resolve(children);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 收起菜单时从menuExpandMap中删除对应菜单id数据 */
|
|
|
|
|
const expandMenuHandle = async (row: any, expanded: boolean) => {
|
|
|
|
|
if (!expanded) {
|
|
|
|
|
menuExpandMap.value[row.menuId] = undefined;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 刷新展开的菜单数据 */
|
|
|
|
|
const refreshLoadTree = (parentId: string | number) => {
|
|
|
|
|
if (menuExpandMap.value[parentId]) {
|
|
|
|
|
|