mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-18 04:32:01 +08:00
refactor(icons): 移除离线图标依赖并改用CSS类
移除 `@iconify/icons-flat-color-icons/folder`、`@iconify/icons-material-symbols/menu` 和 `@iconify/icons-mdi/button-pointer` 的显式导入与离线图标包装导出。将树组件和菜单视图中的图标使用方式从组件实例更改为CSS类(例如 `icons-[flat-color-icons--folder]`)。这消除了对特定离线图标包的依赖,使图标管理更统一并可能减少打包体积。
This commit is contained in:
@@ -2,9 +2,11 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import type { ID } from '#/api/common';
|
||||
import type { MenuOption } from '#/api/system/menu/model';
|
||||
|
||||
import { h, markRaw } from 'vue';
|
||||
import { h } from 'vue';
|
||||
|
||||
import { FolderIcon, MenuIcon, OkButtonIcon, VbenIcon } from '@vben/icons';
|
||||
import { VbenIcon } from '@vben/icons';
|
||||
|
||||
import { menuTypes } from '#/views/system/menu/data';
|
||||
|
||||
export interface Permission {
|
||||
checked: boolean;
|
||||
@@ -16,12 +18,6 @@ export interface MenuPermissionOption extends MenuOption {
|
||||
permissions: Permission[];
|
||||
}
|
||||
|
||||
const menuTypes = {
|
||||
C: { icon: markRaw(MenuIcon), value: '菜单' },
|
||||
F: { icon: markRaw(OkButtonIcon), value: '按钮' },
|
||||
M: { icon: markRaw(FolderIcon), value: '目录' },
|
||||
};
|
||||
|
||||
export const nodeOptions = [
|
||||
{ label: '节点关联', value: true },
|
||||
{ label: '节点独立', value: false },
|
||||
|
||||
Reference in New Issue
Block a user