Browse Source

perf: update

i18n
xiaoxian521 3 years ago
parent
commit
0a9eb30549
  1. 36
      src/components/ReIcon/src/iconifyIconOffline.ts
  2. 4
      src/layout/components/panel/index.vue
  3. 2
      src/layout/components/search/components/SearchResult.vue
  4. 17
      vite.config.ts

36
src/components/ReIcon/src/iconifyIconOffline.ts

@ -3,49 +3,41 @@ import { Icon as IconifyIcon, addIcon } from "@iconify/vue/dist/offline";
// element-plus icon
import Check from "@iconify-icons/ep/check";
import Menu from "@iconify-icons/ep/menu";
import HomeFilled from "@iconify-icons/ep/home-filled";
import Setting from "@iconify-icons/ep/setting";
import Lollipop from "@iconify-icons/ep/lollipop";
import Link from "@iconify-icons/ep/link";
import RefreshRight from "@iconify-icons/ep/refresh-right";
import ArrowDown from "@iconify-icons/ep/arrow-down";
import Close from "@iconify-icons/ep/close";
import CloseBold from "@iconify-icons/ep/close-bold";
import Bell from "@iconify-icons/ep/bell";
import Iphone from "@iconify-icons/ep/iphone";
import Search from "@iconify-icons/ep/search";
addIcon("check", Check);
addIcon("menu", Menu);
addIcon("home-filled", HomeFilled);
addIcon("setting", Setting);
addIcon("lollipop", Lollipop);
addIcon("link", Link);
addIcon("refresh-right", RefreshRight);
addIcon("arrow-down", ArrowDown);
addIcon("close", Close);
addIcon("close-bold", CloseBold);
addIcon("bell", Bell);
addIcon("iphone", Iphone);
addIcon("search", Search);
// remixicon
import arrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
import arrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
import logoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
import informationLine from "@iconify-icons/ri/information-line";
import arrowUpLine from "@iconify-icons/ri/arrow-up-line";
import arrowDownLine from "@iconify-icons/ri/arrow-down-line";
import bookmark2Line from "@iconify-icons/ri/bookmark-2-line";
import ArrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
import ArrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
import InformationLine from "@iconify-icons/ri/information-line";
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
import ArrowDownLine from "@iconify-icons/ri/arrow-down-line";
import Bookmark from "@iconify-icons/ri/bookmark-2-line";
import User from "@iconify-icons/ri/user-3-fill";
import Lock from "@iconify-icons/ri/lock-fill";
addIcon("arrow-right-s-line", arrowRightSLine);
addIcon("arrow-left-s-line", arrowLeftSLine);
addIcon("logout-circle-r-line", logoutCircleRLine);
addIcon("information-line", informationLine);
addIcon("arrow-up-line", arrowUpLine);
addIcon("arrow-down-line", arrowDownLine);
addIcon("bookmark-2-line", bookmark2Line);
addIcon("arrow-right-s-line", ArrowRightSLine);
addIcon("arrow-left-s-line", ArrowLeftSLine);
addIcon("logout-circle-r-line", LogoutCircleRLine);
addIcon("information-line", InformationLine);
addIcon("arrow-up-line", ArrowUpLine);
addIcon("arrow-down-line", ArrowDownLine);
addIcon("bookmark", Bookmark);
addIcon("user", User);
addIcon("lock", Lock);

4
src/layout/components/panel/index.vue

@ -23,7 +23,7 @@ emitter.on("openPanel", () => {
<div class="project-configuration">
<h3>项目配置</h3>
<el-icon title="关闭配置" class="el-icon-close" @click="show = !show">
<IconifyIconOffline icon="close" />
<IconifyIconOffline icon="close-bold" />
</el-icon>
</div>
<div style="border-bottom: 1px solid #dcdfe6" />
@ -120,7 +120,7 @@ emitter.on("openPanel", () => {
margin-left: 10px;
i {
font-size: 20px;
font-size: 16px;
margin-right: 20px;
&:hover {

2
src/layout/components/search/components/SearchResult.vue

@ -11,7 +11,7 @@
@click="handleTo"
@mouseenter="handleMouse(item)"
>
<component :is="useRenderIcon(item.meta?.icon ?? 'bookmark-2-line')" />
<component :is="useRenderIcon(item.meta?.icon ?? 'bookmark')" />
<span class="result-item-title">{{ t(item.meta?.title) }}</span>
<enterOutlined />
</div>

17
vite.config.ts

@ -39,23 +39,6 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
resolve: {
alias
},
css: {
// https://github.com/vitejs/vite/issues/5833
postcss: {
plugins: [
{
postcssPlugin: "internal:charset-removal",
AtRule: {
charset: atRule => {
if (atRule.name === "charset") {
atRule.remove();
}
}
}
}
]
}
},
// 服务端渲染
server: {
// 是否开启 https

Loading…
Cancel
Save