feat(projects): 菜单数据及组件接入

This commit is contained in:
Soybean
2021-09-15 07:35:38 +08:00
parent 57e00e6417
commit 3226a724be
25 changed files with 361 additions and 95 deletions

12
src/utils/common/icon.ts Normal file
View 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)
});
};
}

View File

@ -13,3 +13,5 @@ export {
} from './typeof';
export { brightenColor, darkenColor } from './color';
export { dynamicIconRender } from './icon';