mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
perf: 将本地图标全部按需引入,首屏加载减少 61 个图标资源,首屏加载再次变快 (#389)
* perf: 优化图标,将本地图标按需引入,首屏加载减少 `61` 个图标资源,首屏加载再次变快
This commit is contained in:
@@ -7,6 +7,7 @@ import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import { extractPathList, deleteChildren } from "@/utils/tree";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import type { TreeNode } from "element-plus/es/components/tree-v2/src/types";
|
||||
import NodeTree from "@iconify-icons/ri/node-tree";
|
||||
|
||||
defineOptions({
|
||||
name: "MenuTree"
|
||||
@@ -50,7 +51,7 @@ const filterMethod = (query: string, node: treeNode) => {
|
||||
<el-link
|
||||
href="https://element-plus.gitee.io/zh-CN/component/tree-v2.html"
|
||||
target="_blank"
|
||||
:icon="useRenderIcon('node-tree')"
|
||||
:icon="useRenderIcon(NodeTree)"
|
||||
style="font-size: 16px; margin: 0 5px 4px 0"
|
||||
>
|
||||
Tree V2
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { markRaw } from "vue";
|
||||
import { useRenderFlicker } from "@/components/ReFlicker";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import Iphone from "@iconify-icons/ep/iphone";
|
||||
|
||||
defineOptions({
|
||||
name: "TimeLine"
|
||||
@@ -32,7 +33,7 @@ const activities = [
|
||||
content: "支持自定义图标",
|
||||
timestamp: lastBuildTime,
|
||||
color: "transparent",
|
||||
icon: useRenderIcon("iphone", {
|
||||
icon: useRenderIcon(Iphone, {
|
||||
color: "#0bbd87"
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user