Merge pull request #195 from 15982650876/feat/shark

feat:add 增加了菜单font图标的适配
This commit is contained in:
Ah jung
2022-11-10 21:05:19 +08:00
committed by GitHub
2 changed files with 462 additions and 360 deletions

View File

@@ -10,6 +10,28 @@ import { cloneDeep } from 'lodash-es';
export function renderIcon(icon) {
return () => h(NIcon, null, { default: () => h(icon) });
}
/**
* font 图标(Font class)
* */
export function renderFontClassIcon(icon: string, iconName = 'iconfont') {
return () => h('span', { class: [iconName, icon] });
}
/**
* font 图标(Unicode)
* */
export function renderUnicodeIcon(icon: string, iconName = 'iconfont') {
return () => h('span', { class: [iconName], innerHTML: icon });
}
/**
* font svg 图标
* */
export function renderfontsvg(icon) {
return () =>
h(NIcon, null, {
default: () =>
h('svg', { class: `icon`, 'aria-hidden': 'true' }, h('use', { 'xlink:href': `#${icon}` })),
});
}
/**
* render new Tag

800
yarn.lock

File diff suppressed because it is too large Load Diff