perf: 将本地图标全部按需引入,首屏加载减少 61 个图标资源,首屏加载再次变快 (#389)

* perf: 优化图标,将本地图标按需引入,首屏加载减少 `61` 个图标资源,首屏加载再次变快
This commit is contained in:
RealityBoy
2022-11-30 12:39:12 +08:00
committed by GitHub
parent d2b1bd5b44
commit c7ab236e10
63 changed files with 4761 additions and 2259 deletions

View File

@@ -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"
})
}