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:
@@ -5,6 +5,7 @@ import laptopIcon from "@/assets/svg/laptop.svg?component";
|
||||
import serviceIcon from "@/assets/svg/service.svg?component";
|
||||
import calendarIcon from "@/assets/svg/calendar.svg?component";
|
||||
import userAvatarIcon from "@/assets/svg/user_avatar.svg?component";
|
||||
import More2Fill from "@iconify-icons/ri/more-2-fill";
|
||||
|
||||
defineOptions({
|
||||
name: "ReCard"
|
||||
@@ -64,7 +65,7 @@ const cardLogoClass = computed(() => [
|
||||
{{ product.isSetup ? "已启用" : "已停用" }}
|
||||
</el-tag>
|
||||
<el-dropdown trigger="click" :disabled="!product.isSetup">
|
||||
<IconifyIconOffline icon="more-vertical" class="text-[24px]" />
|
||||
<IconifyIconOffline :icon="More2Fill" class="text-[24px]" />
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu :disabled="!product.isSetup">
|
||||
<el-dropdown-item @click="handleClickManage(product)">
|
||||
|
||||
@@ -6,6 +6,8 @@ import { ElMessageBox } from "element-plus";
|
||||
import { ref, onMounted, nextTick } from "vue";
|
||||
import dialogForm from "./components/DialogForm.vue";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import Search from "@iconify-icons/ep/search";
|
||||
import AddFill from "@iconify-icons/ri/add-circle-line";
|
||||
|
||||
defineOptions({
|
||||
name: "ListCard"
|
||||
@@ -93,7 +95,10 @@ const handleManageProduct = product => {
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="w-full flex justify-between mb-4">
|
||||
<el-button :icon="useRenderIcon('add')" @click="formDialogVisible = true">
|
||||
<el-button
|
||||
:icon="useRenderIcon(AddFill)"
|
||||
@click="formDialogVisible = true"
|
||||
>
|
||||
新建产品
|
||||
</el-button>
|
||||
<el-input
|
||||
@@ -106,7 +111,7 @@ const handleManageProduct = product => {
|
||||
<el-icon class="el-input__icon">
|
||||
<IconifyIconOffline
|
||||
v-show="searchValue.length === 0"
|
||||
icon="search"
|
||||
:icon="Search"
|
||||
/>
|
||||
</el-icon>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user