mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 菜单数据及组件接入
This commit is contained in:
12
src/utils/common/icon.ts
Normal file
12
src/utils/common/icon.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { h } from 'vue';
|
||||
import type { Component } from 'vue';
|
||||
import { NIcon } from 'naive-ui';
|
||||
|
||||
/** 动态渲染vicon */
|
||||
export function dynamicIconRender(icon: Component) {
|
||||
return () => {
|
||||
return h(NIcon, null, {
|
||||
default: () => h(icon)
|
||||
});
|
||||
};
|
||||
}
|
@ -13,3 +13,5 @@ export {
|
||||
} from './typeof';
|
||||
|
||||
export { brightenColor, darkenColor } from './color';
|
||||
|
||||
export { dynamicIconRender } from './icon';
|
||||
|
Reference in New Issue
Block a user