fix: 完成 login 页面

This commit is contained in:
MTrun
2021-12-15 14:25:28 +08:00
parent c4caff75e4
commit ed49e4add8
27 changed files with 155 additions and 43 deletions
+9 -3
View File
@@ -13,12 +13,18 @@ export function getUUID(randomLength: number) {
).toString(36);
}
/**
* * render 图标
*/
export const renderIcon = (icon: any) => {
export const renderIcon = (icon: typeof NIcon) => {
return () => h(NIcon, null, { default: () => h(icon) });
}
/**
* * 处理 vite 中无法使用 require 的问题
* @param name
* @returns
*/
export const requireUrl = (path: string, name: string) => {
return new URL(`${path}/${name}`, import.meta.url).href
}