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

@@ -3,6 +3,7 @@ import "@wangeditor/editor/dist/css/style.css"; // 引入 css
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
import { onBeforeUnmount, ref, shallowRef, onMounted } from "vue";
import Edit from "@iconify-icons/ep/edit";
defineOptions({
name: "Editor"
@@ -46,7 +47,7 @@ const handleCreated = editor => {
<el-link
href="https://www.wangeditor.com"
target="_blank"
:icon="useRenderIcon('edit')"
:icon="useRenderIcon(Edit)"
style="font-size: 16px; margin: 0 4px 5px"
>
Wangeditor