From 760eac1c4d7bf7b2d4d5413601b56fe2b5365cbc Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Wed, 28 Feb 2024 14:36:50 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=A7=84=E8=8C=83=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E6=A0=87=E6=97=B6=E7=9A=84=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E8=A7=84=E5=88=99=EF=BC=8C=E4=BD=BF=E5=85=B6=E6=9B=B4?= =?UTF-8?q?=E5=A5=BD=E5=9C=B0=E9=85=8D=E5=90=88=E5=9B=BE=E6=A0=87=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ReIcon/src/offlineIcon.ts | 89 ++++++++++---------- src/layout/components/search/index.vue | 2 +- src/layout/types.ts | 2 +- src/router/modules/able.ts | 2 +- src/router/modules/about.ts | 2 +- src/router/modules/board.ts | 2 +- src/router/modules/editor.ts | 2 +- src/router/modules/error.ts | 2 +- src/router/modules/flowchart.ts | 2 +- src/router/modules/formdesign.ts | 2 +- src/router/modules/guide.ts | 2 +- src/router/modules/home.ts | 2 +- src/router/modules/list.ts | 4 +- src/router/modules/nested.ts | 2 +- src/router/modules/ppt.ts | 2 +- src/router/modules/result.ts | 2 +- src/router/modules/table.ts | 2 +- src/views/components/segmented.vue | 6 +- src/views/list/card/index.vue | 2 +- src/views/system/dept/index.vue | 2 +- src/views/system/menu/index.vue | 2 +- src/views/system/role/index.vue | 2 +- src/views/system/user/index.vue | 2 +- src/views/system/user/tree.vue | 2 +- src/views/welcome/components/table/index.vue | 2 +- 25 files changed, 71 insertions(+), 72 deletions(-) diff --git a/src/components/ReIcon/src/offlineIcon.ts b/src/components/ReIcon/src/offlineIcon.ts index 6b27c348e..ceca7220b 100644 --- a/src/components/ReIcon/src/offlineIcon.ts +++ b/src/components/ReIcon/src/offlineIcon.ts @@ -1,55 +1,54 @@ +// 这里存放本地图标,在 src/layout/index.vue 文件中加载,避免在首启动加载 import { addIcon } from "@iconify/vue/dist/offline"; -/** - * 这里存放本地图标,在 src/layout/index.vue 文件中加载,避免在首启动加载 - */ - -// 本地菜单图标,后端在路由的icon中返回对应的图标字符串并且前端在此处使用addIcon添加即可渲染菜单图标 -import UbuntuFill from "@iconify-icons/ri/ubuntu-fill"; +// 本地菜单图标,后端在路由的 icon 中返回对应的图标字符串并且前端在此处使用 addIcon 添加即可渲染菜单图标 +// @iconify-icons/ep import Menu from "@iconify-icons/ep/menu"; import Edit from "@iconify-icons/ep/edit"; -import InformationLine from "@iconify-icons/ri/information-line"; import SetUp from "@iconify-icons/ep/set-up"; -import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line"; import Guide from "@iconify-icons/ep/guide"; -import HomeFilled from "@iconify-icons/ep/home-filled"; -import Card from "@iconify-icons/ri/bank-card-line"; -import ListCheck from "@iconify-icons/ri/list-check"; -import Histogram from "@iconify-icons/ep/histogram"; -import Ppt from "@iconify-icons/ri/file-ppt-2-line"; -import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line"; -import FlUser from "@iconify-icons/ri/admin-line"; -import Role from "@iconify-icons/ri/admin-fill"; -import Setting from "@iconify-icons/ri/settings-3-line"; -import Dept from "@iconify-icons/ri/git-branch-line"; -import Search from "@iconify-icons/ri/search-line"; -import Lollipop from "@iconify-icons/ep/lollipop"; import Monitor from "@iconify-icons/ep/monitor"; -import Tag from "@iconify-icons/ri/bookmark-2-line"; -import Table from "@iconify-icons/ri/table-line"; -import Info from "@iconify-icons/ri/file-info-line"; -import Artboard from "@iconify-icons/ri/artboard-line"; -addIcon("ubuntuFill", UbuntuFill); +import Lollipop from "@iconify-icons/ep/lollipop"; +import Histogram from "@iconify-icons/ep/histogram"; +import HomeFilled from "@iconify-icons/ep/home-filled"; addIcon("ep:menu", Menu); -addIcon("edit", Edit); -addIcon("informationLine", InformationLine); -addIcon("setUp", SetUp); -addIcon("terminalWindowLine", TerminalWindowLine); -addIcon("guide", Guide); -addIcon("homeFilled", HomeFilled); -addIcon("card", Card); -addIcon("listCheck", ListCheck); -addIcon("histogram", Histogram); -addIcon("ppt", Ppt); -addIcon("checkboxCircleLine", CheckboxCircleLine); -addIcon("ri:admin-line", FlUser); -addIcon("ri:admin-fill", Role); -addIcon("ri:settings-3-line", Setting); -addIcon("ri:git-branch-line", Dept); -addIcon("search", Search); -addIcon("ep:lollipop", Lollipop); +addIcon("ep:edit", Edit); +addIcon("ep:set-up", SetUp); +addIcon("ep:guide", Guide); addIcon("ep:monitor", Monitor); +addIcon("ep:lollipop", Lollipop); +addIcon("ep:histogram", Histogram); +addIcon("ep:home-filled", HomeFilled); +// @iconify-icons/ri +import Tag from "@iconify-icons/ri/bookmark-2-line"; +import Ppt from "@iconify-icons/ri/file-ppt-2-line"; +import Card from "@iconify-icons/ri/bank-card-line"; +import Role from "@iconify-icons/ri/admin-fill"; +import Info from "@iconify-icons/ri/file-info-line"; +import Dept from "@iconify-icons/ri/git-branch-line"; +import Table from "@iconify-icons/ri/table-line"; +import Search from "@iconify-icons/ri/search-line"; +import FlUser from "@iconify-icons/ri/admin-line"; +import Setting from "@iconify-icons/ri/settings-3-line"; +import Artboard from "@iconify-icons/ri/artboard-line"; +import ListCheck from "@iconify-icons/ri/list-check"; +import UbuntuFill from "@iconify-icons/ri/ubuntu-fill"; +import InformationLine from "@iconify-icons/ri/information-line"; +import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line"; +import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line"; addIcon("ri:bookmark-2-line", Tag); -addIcon("table", Table); -addIcon("info", Info); -addIcon("artboard", Artboard); +addIcon("ri:file-ppt-2-line", Ppt); +addIcon("ri:bank-card-line", Card); +addIcon("ri:admin-fill", Role); +addIcon("ri:file-info-line", Info); +addIcon("ri:git-branch-line", Dept); +addIcon("ri:table-line", Table); +addIcon("ri:search-line", Search); +addIcon("ri:admin-line", FlUser); +addIcon("ri:settings-3-line", Setting); +addIcon("ri:artboard-line", Artboard); +addIcon("ri:list-check", ListCheck); +addIcon("ri:ubuntu-fill", UbuntuFill); +addIcon("ri:information-line", InformationLine); +addIcon("ri:terminal-window-line", TerminalWindowLine); +addIcon("ri:checkbox-circle-line", CheckboxCircleLine); diff --git a/src/layout/components/search/index.vue b/src/layout/components/search/index.vue index a4755819c..2a13dae8e 100644 --- a/src/layout/components/search/index.vue +++ b/src/layout/components/search/index.vue @@ -14,7 +14,7 @@ function handleSearch() { class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover" @click="handleSearch" > - + diff --git a/src/layout/types.ts b/src/layout/types.ts index 16e818941..69489d183 100644 --- a/src/layout/types.ts +++ b/src/layout/types.ts @@ -8,7 +8,7 @@ export const routerArrays: Array = path: "/welcome", meta: { title: "menus.hshome", - icon: "homeFilled" + icon: "ep:home-filled" } } ] diff --git a/src/router/modules/able.ts b/src/router/modules/able.ts index 488b9e62c..a162bd730 100644 --- a/src/router/modules/able.ts +++ b/src/router/modules/able.ts @@ -5,7 +5,7 @@ export default { path: "/able", redirect: "/able/watermark", meta: { - icon: "ubuntuFill", + icon: "ri:ubuntu-fill", title: $t("menus.hsAble"), rank: able }, diff --git a/src/router/modules/about.ts b/src/router/modules/about.ts index 0ef9cb6cc..d7ab1b0c6 100644 --- a/src/router/modules/about.ts +++ b/src/router/modules/about.ts @@ -5,7 +5,7 @@ export default { path: "/about", redirect: "/about/index", meta: { - icon: "info", + icon: "ri:file-info-line", title: $t("menus.hsAbout"), rank: about }, diff --git a/src/router/modules/board.ts b/src/router/modules/board.ts index 6e9378e6b..26df2724a 100644 --- a/src/router/modules/board.ts +++ b/src/router/modules/board.ts @@ -6,7 +6,7 @@ export default { path: "/board", redirect: "/board/index", meta: { - icon: "artboard", + icon: "ri:artboard-line", title: $t("menus.hsboard"), rank: board }, diff --git a/src/router/modules/editor.ts b/src/router/modules/editor.ts index a66029b62..ea3f372b9 100644 --- a/src/router/modules/editor.ts +++ b/src/router/modules/editor.ts @@ -5,7 +5,7 @@ export default { path: "/editor", redirect: "/editor/index", meta: { - icon: "edit", + icon: "ep:edit", title: $t("menus.hseditor"), rank: editor }, diff --git a/src/router/modules/error.ts b/src/router/modules/error.ts index edc563351..99d0a95aa 100644 --- a/src/router/modules/error.ts +++ b/src/router/modules/error.ts @@ -5,7 +5,7 @@ export default { path: "/error", redirect: "/error/403", meta: { - icon: "informationLine", + icon: "ri:information-line", // showLink: false, title: $t("menus.hsabnormal"), rank: error diff --git a/src/router/modules/flowchart.ts b/src/router/modules/flowchart.ts index db83ad1a0..868cd3866 100644 --- a/src/router/modules/flowchart.ts +++ b/src/router/modules/flowchart.ts @@ -5,7 +5,7 @@ export default { path: "/flow-chart", redirect: "/flow-chart/index", meta: { - icon: "setUp", + icon: "ep:set-up", title: $t("menus.hsflowChart"), rank: flowchart }, diff --git a/src/router/modules/formdesign.ts b/src/router/modules/formdesign.ts index 64a204440..2e7959531 100644 --- a/src/router/modules/formdesign.ts +++ b/src/router/modules/formdesign.ts @@ -6,7 +6,7 @@ export default { path: "/form-design", redirect: "/form-design/index", meta: { - icon: "terminalWindowLine", + icon: "ri:terminal-window-line", title: $t("menus.hsFormDesign"), rank: formdesign }, diff --git a/src/router/modules/guide.ts b/src/router/modules/guide.ts index b456ab69c..b244fcfb1 100644 --- a/src/router/modules/guide.ts +++ b/src/router/modules/guide.ts @@ -5,7 +5,7 @@ export default { path: "/guide", redirect: "/guide/index", meta: { - icon: "guide", + icon: "ep:guide", title: $t("menus.hsguide"), rank: guide }, diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts index a80705b9a..ea10e8b9c 100644 --- a/src/router/modules/home.ts +++ b/src/router/modules/home.ts @@ -9,7 +9,7 @@ export default { component: Layout, redirect: "/welcome", meta: { - icon: "homeFilled", + icon: "ep:home-filled", title: $t("menus.hshome"), rank: home }, diff --git a/src/router/modules/list.ts b/src/router/modules/list.ts index 4bae99dce..d6db1e6fa 100644 --- a/src/router/modules/list.ts +++ b/src/router/modules/list.ts @@ -5,7 +5,7 @@ export default { path: "/list", redirect: "/list/card", meta: { - icon: "listCheck", + icon: "ri:list-check", title: $t("menus.hsList"), rank: list }, @@ -15,7 +15,7 @@ export default { name: "ListCard", component: () => import("@/views/list/card/index.vue"), meta: { - icon: "card", + icon: "ri:bank-card-line", title: $t("menus.hsListCard"), showParent: true } diff --git a/src/router/modules/nested.ts b/src/router/modules/nested.ts index 623f60421..ab9316d5c 100644 --- a/src/router/modules/nested.ts +++ b/src/router/modules/nested.ts @@ -6,7 +6,7 @@ export default { redirect: "/nested/menu1/menu1-1", meta: { title: $t("menus.hsmenus"), - icon: "histogram", + icon: "ep:histogram", rank: nested }, children: [ diff --git a/src/router/modules/ppt.ts b/src/router/modules/ppt.ts index fa640c64e..ba137220f 100644 --- a/src/router/modules/ppt.ts +++ b/src/router/modules/ppt.ts @@ -5,7 +5,7 @@ export default { path: "/ppt", redirect: "/ppt/index", meta: { - icon: "ppt", + icon: "ri:file-ppt-2-line", title: "PPT", rank: ppt }, diff --git a/src/router/modules/result.ts b/src/router/modules/result.ts index fa4db6655..deb87c99e 100644 --- a/src/router/modules/result.ts +++ b/src/router/modules/result.ts @@ -5,7 +5,7 @@ export default { path: "/result", redirect: "/result/success", meta: { - icon: "checkboxCircleLine", + icon: "ri:checkbox-circle-line", title: $t("menus.hsResult"), rank: result }, diff --git a/src/router/modules/table.ts b/src/router/modules/table.ts index 9ea81a7cd..b02329606 100644 --- a/src/router/modules/table.ts +++ b/src/router/modules/table.ts @@ -5,7 +5,7 @@ export default { path: "/pure-table", redirect: "/pure-table/index", meta: { - icon: "table", + icon: "ri:table-line", title: "pure-admin-table", rank: table }, diff --git a/src/views/components/segmented.vue b/src/views/components/segmented.vue index c89376df9..5df2416ce 100644 --- a/src/views/components/segmented.vue +++ b/src/views/components/segmented.vue @@ -86,7 +86,7 @@ const optionsIcon: Array = [ }, { label: "周三", - icon: "terminalWindowLine" + icon: "ri:terminal-window-line" }, { label: "周四" @@ -103,7 +103,7 @@ const optionsOnlyIcon: Array = [ icon: HomeFilled }, { - icon: "terminalWindowLine" + icon: "ri:terminal-window-line" }, { icon: "streamline-emojis:cow-face" @@ -131,7 +131,7 @@ const optionsLabel: Array = [ { label: () => (
- {h(useRenderIcon("terminalWindowLine"), { + {h(useRenderIcon("ri:terminal-window-line"), { class: "m-auto mt-1 w-[18px] h-[18px]" })}

周二

diff --git a/src/views/list/card/index.vue b/src/views/list/card/index.vue index c6961e63e..568176256 100644 --- a/src/views/list/card/index.vue +++ b/src/views/list/card/index.vue @@ -110,7 +110,7 @@ const handleManageProduct = product => { diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 1df7d9115..d9d3e2e7a 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -58,7 +58,7 @@ const { diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index e072cad2c..fe40f7038 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -48,7 +48,7 @@ const { diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index f9baf102f..c5926d194 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -74,7 +74,7 @@ const { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 9b2786ee9..8b97a28c1 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -95,7 +95,7 @@ const { diff --git a/src/views/system/user/tree.vue b/src/views/system/user/tree.vue index 78c3b7cf8..adcb76843 100644 --- a/src/views/system/user/tree.vue +++ b/src/views/system/user/tree.vue @@ -110,7 +110,7 @@ defineExpose({ onTreeReset }); diff --git a/src/views/welcome/components/table/index.vue b/src/views/welcome/components/table/index.vue index 9e334383d..ab8c1799e 100644 --- a/src/views/welcome/components/table/index.vue +++ b/src/views/welcome/components/table/index.vue @@ -36,7 +36,7 @@ const { loading, columns, dataList, pagination, Empty, onCurrentChange } = circle size="small" :title="`查看序号为${row.id}的详情`" - :icon="useRenderIcon('search')" + :icon="useRenderIcon('ri:search-line')" />