Browse Source

release: update `3.9.0`

i18n
xiaoxian521 2 years ago
parent
commit
12a003a430
  1. 14
      build/optimize.ts
  2. 4
      locales/en.yaml
  3. 4
      locales/zh-CN.yaml
  4. 4
      mock/asyncRoutes.ts
  5. 2
      package.json
  6. 2
      public/serverConfig.json
  7. 10
      src/components/ReIcon/src/hooks.ts
  8. 72
      src/components/ReIcon/src/iconifyIconOffline.ts
  9. 11
      src/layout/components/navbar.vue
  10. 3
      src/layout/components/notice/index.vue
  11. 3
      src/layout/components/panel/index.vue
  12. 6
      src/layout/components/search/components/SearchFooter.vue
  13. 3
      src/layout/components/search/components/SearchModal.vue
  14. 3
      src/layout/components/search/components/SearchResult.vue
  15. 4
      src/layout/components/search/index.vue
  16. 9
      src/layout/components/setting/index.vue
  17. 11
      src/layout/components/sidebar/horizontal.vue
  18. 4
      src/layout/components/sidebar/leftCollapse.vue
  19. 11
      src/layout/components/sidebar/mixNav.vue
  20. 18
      src/layout/components/sidebar/sidebarItem.vue
  21. 5
      src/layout/components/sidebar/topCollapse.vue
  22. 26
      src/layout/components/tag/index.vue
  23. 24
      src/layout/hooks/useTag.ts
  24. 1
      src/layout/index.vue
  25. 9
      src/layout/types.ts
  26. 1
      src/main.ts
  27. 5
      src/plugins/echarts/index.ts
  28. 3
      src/router/modules/error.ts
  29. 3
      src/router/modules/home.ts
  30. 3
      src/router/modules/remaining.ts
  31. 8
      src/style/reset.scss
  32. 4
      src/utils/http/index.ts
  33. 11
      src/views/login/index.vue
  34. 5
      types/global.d.ts
  35. 4
      vite.config.ts

14
build/optimize.ts

@ -4,7 +4,7 @@
* include里vite 使 node_modules/.vite * include里vite 使 node_modules/.vite
* 使 src/main.ts include vite node_modules/.vite * 使 src/main.ts include vite node_modules/.vite
*/ */
export const include = [
const include = [
"qs", "qs",
"mitt", "mitt",
"dayjs", "dayjs",
@ -24,3 +24,15 @@ export const include = [
"responsive-storage", "responsive-storage",
"element-resize-detector" "element-resize-detector"
]; ];
/**
*
* `@iconify-icons/` `exclude` 使
*/
const exclude = [
"@iconify-icons/ep",
"@iconify-icons/ri",
"@pureadmin/theme/dist/browser-utils"
];
export { include, exclude };

4
locales/en.yaml

@ -18,8 +18,8 @@ buttons:
hscloseRightTabs: Close RightTabs hscloseRightTabs: Close RightTabs
hscloseOtherTabs: Close OtherTabs hscloseOtherTabs: Close OtherTabs
hscloseAllTabs: Close AllTabs hscloseAllTabs: Close AllTabs
hswholeFullScreen: Whole FullScreen
hswholeExitFullScreen: Whole ExitFullScreen
hswholeFullScreen: FullScreen
hswholeExitFullScreen: ExitFull
hscontentFullScreen: Content FullScreen hscontentFullScreen: Content FullScreen
hscontentExitFullScreen: Content ExitFullScreen hscontentExitFullScreen: Content ExitFullScreen
menus: menus:

4
locales/zh-CN.yaml

@ -18,8 +18,8 @@ buttons:
hscloseRightTabs: 关闭右侧标签页 hscloseRightTabs: 关闭右侧标签页
hscloseOtherTabs: 关闭其他标签页 hscloseOtherTabs: 关闭其他标签页
hscloseAllTabs: 关闭全部标签页 hscloseAllTabs: 关闭全部标签页
hswholeFullScreen: 整体页面全屏
hswholeExitFullScreen: 整体页面退出全屏
hswholeFullScreen: 全屏
hswholeExitFullScreen: 退出全屏
hscontentFullScreen: 内容区全屏 hscontentFullScreen: 内容区全屏
hscontentExitFullScreen: 内容区退出全屏 hscontentExitFullScreen: 内容区退出全屏
menus: menus:

4
mock/asyncRoutes.ts

@ -1,6 +1,8 @@
// 模拟后端动态生成路由 // 模拟后端动态生成路由
import { MockMethod } from "vite-plugin-mock"; import { MockMethod } from "vite-plugin-mock";
import Lollipop from "@iconify-icons/ep/lollipop";
/** /**
* roles "admin""common" * roles "admin""common"
* admin * admin
@ -11,7 +13,7 @@ const permissionRouter = {
path: "/permission", path: "/permission",
meta: { meta: {
title: "menus.permission", title: "menus.permission",
icon: "lollipop",
icon: Lollipop,
rank: 10 rank: 10
}, },
children: [ children: [

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pure-admin-thin", "name": "pure-admin-thin",
"version": "3.8.7",
"version": "3.9.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite", "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",

2
public/serverConfig.json

@ -1,5 +1,5 @@
{ {
"Version": "3.8.7",
"Version": "3.9.0",
"Title": "PureAdmin", "Title": "PureAdmin",
"FixedHeader": true, "FixedHeader": true,
"HiddenSideBar": false, "HiddenSideBar": false,

10
src/components/ReIcon/src/hooks.ts

@ -34,6 +34,16 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component {
} else if (typeof icon === "function" || typeof icon?.render === "function") { } else if (typeof icon === "function" || typeof icon?.render === "function") {
// svg // svg
return icon; return icon;
} else if (typeof icon === "object") {
return defineComponent({
name: "OfflineIcon",
render() {
return h(IconifyIconOffline, {
icon: icon,
...attrs
});
}
});
} else { } else {
// 通过是否存在 : 符号来判断是在线还是本地图标,存在即是在线图标,反之 // 通过是否存在 : 符号来判断是在线还是本地图标,存在即是在线图标,反之
return defineComponent({ return defineComponent({

72
src/components/ReIcon/src/iconifyIconOffline.ts

@ -1,88 +1,22 @@
import { h, defineComponent } from "vue"; import { h, defineComponent } from "vue";
import { Icon as IconifyIcon, addIcon } from "@iconify/vue/dist/offline"; import { Icon as IconifyIcon, addIcon } from "@iconify/vue/dist/offline";
// element-plus icon
import Check from "@iconify-icons/ep/check";
import HomeFilled from "@iconify-icons/ep/home-filled";
import Lollipop from "@iconify-icons/ep/lollipop";
import RefreshRight from "@iconify-icons/ep/refresh-right";
import Close from "@iconify-icons/ep/close";
import CloseBold from "@iconify-icons/ep/close-bold";
import Bell from "@iconify-icons/ep/bell";
import Search from "@iconify-icons/ep/search";
import EpArrowDown from "@iconify-icons/ep/arrow-down";
import ArrowUp from "@iconify-icons/ep/arrow-up";
import ArrowRight from "@iconify-icons/ep/arrow-right";
import ArrowLeft from "@iconify-icons/ep/arrow-left";
addIcon("check", Check);
addIcon("home-filled", HomeFilled);
addIcon("lollipop", Lollipop);
addIcon("refresh-right", RefreshRight);
addIcon("close", Close);
addIcon("close-bold", CloseBold);
addIcon("bell", Bell);
addIcon("search", Search);
addIcon("ep-arrow-down", EpArrowDown);
addIcon("ep-arrow-up", ArrowUp);
addIcon("ep-arrow-right", ArrowRight);
addIcon("ep-arrow-left", ArrowLeft);
// 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 User from "@iconify-icons/ri/user-3-fill";
import Lock from "@iconify-icons/ri/lock-fill";
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
import Setting from "@iconify-icons/ri/settings-3-line";
import ArrowDown from "@iconify-icons/ri/arrow-down-s-line";
import CloseLeftTags from "@iconify-icons/ri/text-direction-r";
import CloseRightTags from "@iconify-icons/ri/text-direction-l";
import CloseOtherTags from "@iconify-icons/ri/text-spacing";
import CloseAllTags from "@iconify-icons/ri/subtract-line";
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-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("user", User);
addIcon("lock", Lock);
addIcon("menu-unfold", MenuUnfold);
addIcon("menu-fold", MenuFold);
addIcon("setting", Setting);
addIcon("arrow-down", ArrowDown);
addIcon("close-left-tags", CloseLeftTags);
addIcon("close-right-tags", CloseRightTags);
addIcon("close-other-tags", CloseOtherTags);
addIcon("close-all-tags", CloseAllTags);
addIcon("fullscreen", Fullscreen);
addIcon("exit-fullscreen", ExitFullscreen);
// Iconify Icon在Vue里本地使用(用于内网环境)https://docs.iconify.design/icon-components/vue/offline.html // Iconify Icon在Vue里本地使用(用于内网环境)https://docs.iconify.design/icon-components/vue/offline.html
export default defineComponent({ export default defineComponent({
name: "IconifyIconOffline", name: "IconifyIconOffline",
components: { IconifyIcon }, components: { IconifyIcon },
props: { props: {
icon: { icon: {
type: String,
default: ""
default: null
} }
}, },
render() { render() {
if (typeof this.icon === "object") addIcon(this.icon, this.icon);
const attrs = this.$attrs; const attrs = this.$attrs;
return h( return h(
IconifyIcon, IconifyIcon,
{ {
icon: `${this.icon}`,
icon: this.icon,
style: attrs?.style style: attrs?.style
? Object.assign(attrs.style, { outline: "none" }) ? Object.assign(attrs.style, { outline: "none" })
: { outline: "none" }, : { outline: "none" },

11
src/layout/components/navbar.vue

@ -7,6 +7,9 @@ import Breadcrumb from "./sidebar/breadCrumb.vue";
import topCollapse from "./sidebar/topCollapse.vue"; import topCollapse from "./sidebar/topCollapse.vue";
import { useTranslationLang } from "../hooks/useTranslationLang"; import { useTranslationLang } from "../hooks/useTranslationLang";
import globalization from "@/assets/svg/globalization.svg?component"; import globalization from "@/assets/svg/globalization.svg?component";
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
import Setting from "@iconify-icons/ri/settings-3-line";
import Check from "@iconify-icons/ep/check";
const { const {
layout, layout,
@ -62,7 +65,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
<IconifyIconOffline <IconifyIconOffline
class="check-zh" class="check-zh"
v-show="locale === 'zh'" v-show="locale === 'zh'"
icon="check"
:icon="Check"
/> />
简体中文 简体中文
</el-dropdown-item> </el-dropdown-item>
@ -72,7 +75,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
@click="translationEn" @click="translationEn"
> >
<span class="check-en" v-show="locale === 'en'"> <span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</span> </span>
English English
</el-dropdown-item> </el-dropdown-item>
@ -92,7 +95,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
<el-dropdown-menu class="logout"> <el-dropdown-menu class="logout">
<el-dropdown-item @click="logout"> <el-dropdown-item @click="logout">
<IconifyIconOffline <IconifyIconOffline
icon="logout-circle-r-line"
:icon="LogoutCircleRLine"
style="margin: 5px" style="margin: 5px"
/> />
{{ t("buttons.hsLoginOut") }} {{ t("buttons.hsLoginOut") }}
@ -105,7 +108,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
:title="t('buttons.hssystemSet')" :title="t('buttons.hssystemSet')"
@click="onPanel" @click="onPanel"
> >
<IconifyIconOffline icon="setting" />
<IconifyIconOffline :icon="Setting" />
</span> </span>
</div> </div>
</div> </div>

3
src/layout/components/notice/index.vue

@ -2,6 +2,7 @@
import { ref } from "vue"; import { ref } from "vue";
import { noticesData } from "./data"; import { noticesData } from "./data";
import NoticeList from "./noticeList.vue"; import NoticeList from "./noticeList.vue";
import Bell from "@iconify-icons/ep/bell";
const noticesNum = ref(0); const noticesNum = ref(0);
const notices = ref(noticesData); const notices = ref(noticesData);
@ -15,7 +16,7 @@ notices.value.map(v => (noticesNum.value += v.list.length));
<span class="dropdown-badge navbar-bg-hover select-none"> <span class="dropdown-badge navbar-bg-hover select-none">
<el-badge :value="noticesNum" :max="99"> <el-badge :value="noticesNum" :max="99">
<span class="header-notice-icon"> <span class="header-notice-icon">
<IconifyIconOffline icon="bell" />
<IconifyIconOffline :icon="Bell" />
</span> </span>
</el-badge> </el-badge>
</span> </span>

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

@ -2,6 +2,7 @@
import { ref } from "vue"; import { ref } from "vue";
import { onClickOutside } from "@vueuse/core"; import { onClickOutside } from "@vueuse/core";
import { emitter } from "@/utils/mitt"; import { emitter } from "@/utils/mitt";
import Close from "@iconify-icons/ep/close";
const show = ref<Boolean>(false); const show = ref<Boolean>(false);
const target = ref(null); const target = ref(null);
@ -25,7 +26,7 @@ emitter.on("openPanel", () => {
<span title="关闭配置"> <span title="关闭配置">
<IconifyIconOffline <IconifyIconOffline
class="dark:text-white" class="dark:text-white"
icon="close"
:icon="Close"
@click="show = !show" @click="show = !show"
/> />
</span> </span>

6
src/layout/components/search/components/SearchFooter.vue

@ -5,8 +5,8 @@
确认 确认
</span> </span>
<span class="search-footer-item"> <span class="search-footer-item">
<IconifyIconOffline icon="arrow-up-line" class="icon" />
<IconifyIconOffline icon="arrow-down-line" class="icon" />
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
切换 切换
</span> </span>
<span class="search-footer-item"> <span class="search-footer-item">
@ -17,6 +17,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
import ArrowDownLine from "@iconify-icons/ri/arrow-down-line";
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component"; import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
import enterOutlined from "@/assets/svg/enter_outlined.svg?component"; import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
</script> </script>

3
src/layout/components/search/components/SearchModal.vue

@ -9,6 +9,7 @@ import { transformI18n } from "@/plugins/i18n";
import { useDebounceFn, onKeyStroke } from "@vueuse/core"; import { useDebounceFn, onKeyStroke } from "@vueuse/core";
import { ref, watch, computed, nextTick, shallowRef } from "vue"; import { ref, watch, computed, nextTick, shallowRef } from "vue";
import { usePermissionStoreHook } from "@/store/modules/permission"; import { usePermissionStoreHook } from "@/store/modules/permission";
import Search from "@iconify-icons/ep/search";
interface Props { interface Props {
/** 弹窗显隐 */ /** 弹窗显隐 */
@ -148,7 +149,7 @@ onKeyStroke("ArrowDown", handleDown);
> >
<template #prefix> <template #prefix>
<span class="el-input__icon"> <span class="el-input__icon">
<IconifyIconOffline icon="search" />
<IconifyIconOffline :icon="Search" />
</span> </span>
</template> </template>
</el-input> </el-input>

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

@ -4,6 +4,7 @@ import { useI18n } from "vue-i18n";
import { useEpThemeStoreHook } from "@/store/modules/epTheme"; import { useEpThemeStoreHook } from "@/store/modules/epTheme";
import { useRenderIcon } from "@/components/ReIcon/src/hooks"; import { useRenderIcon } from "@/components/ReIcon/src/hooks";
import enterOutlined from "@/assets/svg/enter_outlined.svg?component"; import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
import Bookmark2Line from "@iconify-icons/ri/bookmark-2-line";
const { t } = useI18n(); const { t } = useI18n();
@ -67,7 +68,7 @@ function handleTo() {
@click="handleTo" @click="handleTo"
@mouseenter="handleMouse(item)" @mouseenter="handleMouse(item)"
> >
<component :is="useRenderIcon(item.meta?.icon ?? 'bookmark-2-line')" />
<component :is="useRenderIcon(item.meta?.icon ?? Bookmark2Line)" />
<span class="result-item-title">{{ t(item.meta?.title) }}</span> <span class="result-item-title">{{ t(item.meta?.title) }}</span>
<enterOutlined /> <enterOutlined />
</div> </div>

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

@ -1,6 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { SearchModal } from "./components"; import { SearchModal } from "./components";
import { useBoolean } from "../../hooks/useBoolean"; import { useBoolean } from "../../hooks/useBoolean";
import Search from "@iconify-icons/ep/search";
const { bool: show, toggle } = useBoolean(); const { bool: show, toggle } = useBoolean();
function handleSearch() { function handleSearch() {
toggle(); toggle();
@ -12,7 +14,7 @@ function handleSearch() {
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover" class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
@click="handleSearch" @click="handleSearch"
> >
<IconifyIconOffline icon="search" />
<IconifyIconOffline :icon="Search" />
</div> </div>
<SearchModal v-model:value="show" /> <SearchModal v-model:value="show" />
</template> </template>

9
src/layout/components/setting/index.vue

@ -30,6 +30,8 @@ import { toggleTheme } from "@pureadmin/theme/dist/browser-utils";
import dayIcon from "@/assets/svg/day.svg?component"; import dayIcon from "@/assets/svg/day.svg?component";
import darkIcon from "@/assets/svg/dark.svg?component"; import darkIcon from "@/assets/svg/dark.svg?component";
import Check from "@iconify-icons/ep/check";
import Logout from "@iconify-icons/ri/logout-circle-r-line";
const router = useRouter(); const router = useRouter();
const { device } = useNav(); const { device } = useNav();
@ -42,7 +44,6 @@ const verticalRef = ref();
const horizontalRef = ref(); const horizontalRef = ref();
const { const {
body,
dataTheme, dataTheme,
layoutTheme, layoutTheme,
themeColors, themeColors,
@ -165,8 +166,6 @@ function setFalse(Doms): any {
} }
watch($storage, ({ layout }) => { watch($storage, ({ layout }) => {
/* 设置wangeditorV5主题色 */
body.style.setProperty("--w-e-toolbar-active-color", layout["epThemeColor"]);
switch (layout["layout"]) { switch (layout["layout"]) {
case "vertical": case "vertical":
toggleClass(true, isSelect, unref(verticalRef)); toggleClass(true, isSelect, unref(verticalRef));
@ -302,7 +301,7 @@ nextTick(() => {
:size="17" :size="17"
:color="getThemeColor(item.themeColor)" :color="getThemeColor(item.themeColor)"
> >
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</el-icon> </el-icon>
</li> </li>
</ul> </ul>
@ -383,7 +382,7 @@ nextTick(() => {
@click="onReset" @click="onReset"
> >
<IconifyIconOffline <IconifyIconOffline
icon="fa-sign-out"
:icon="Logout"
width="15" width="15"
height="15" height="15"
style="margin-right: 4px" style="margin-right: 4px"

11
src/layout/components/sidebar/horizontal.vue

@ -7,6 +7,9 @@ import { useNav } from "@/layout/hooks/useNav";
import { useTranslationLang } from "../../hooks/useTranslationLang"; import { useTranslationLang } from "../../hooks/useTranslationLang";
import { usePermissionStoreHook } from "@/store/modules/permission"; import { usePermissionStoreHook } from "@/store/modules/permission";
import globalization from "@/assets/svg/globalization.svg?component"; import globalization from "@/assets/svg/globalization.svg?component";
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
import Setting from "@iconify-icons/ri/settings-3-line";
import Check from "@iconify-icons/ep/check";
const menuRef = ref(); const menuRef = ref();
@ -76,7 +79,7 @@ watch(
@click="translationCh" @click="translationCh"
> >
<span class="check-zh" v-show="locale === 'zh'"> <span class="check-zh" v-show="locale === 'zh'">
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</span> </span>
简体中文 简体中文
</el-dropdown-item> </el-dropdown-item>
@ -86,7 +89,7 @@ watch(
@click="translationEn" @click="translationEn"
> >
<span class="check-en" v-show="locale === 'en'"> <span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</span> </span>
English English
</el-dropdown-item> </el-dropdown-item>
@ -106,7 +109,7 @@ watch(
<el-dropdown-menu class="logout"> <el-dropdown-menu class="logout">
<el-dropdown-item @click="logout"> <el-dropdown-item @click="logout">
<IconifyIconOffline <IconifyIconOffline
icon="logout-circle-r-line"
:icon="LogoutCircleRLine"
style="margin: 5px" style="margin: 5px"
/> />
{{ t("buttons.hsLoginOut") }} {{ t("buttons.hsLoginOut") }}
@ -119,7 +122,7 @@ watch(
:title="t('buttons.hssystemSet')" :title="t('buttons.hssystemSet')"
@click="onPanel" @click="onPanel"
> >
<IconifyIconOffline icon="setting" />
<IconifyIconOffline :icon="Setting" />
</span> </span>
</div> </div>
</div> </div>

4
src/layout/components/sidebar/leftCollapse.vue

@ -1,5 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useDark } from "@pureadmin/utils"; import { useDark } from "@pureadmin/utils";
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
interface Props { interface Props {
isActive: boolean; isActive: boolean;
@ -27,7 +29,7 @@ const toggleClick = () => {
:content="props.isActive ? '点击折叠' : '点击展开'" :content="props.isActive ? '点击折叠' : '点击展开'"
> >
<IconifyIconOffline <IconifyIconOffline
:icon="props.isActive ? 'menu-fold' : 'menu-unfold'"
:icon="props.isActive ? MenuFold : MenuUnfold"
class="cursor-pointer inline-block align-middle text-primary hover:text-primary dark:hover:!text-white w-[16px] h-[16px] ml-4 mb-1" class="cursor-pointer inline-block align-middle text-primary hover:text-primary dark:hover:!text-white w-[16px] h-[16px] ml-4 mb-1"
@click="toggleClick" @click="toggleClick"
/> />

11
src/layout/components/sidebar/mixNav.vue

@ -9,6 +9,9 @@ import { getParentPaths, findRouteByPath } from "@/router/utils";
import { useTranslationLang } from "../../hooks/useTranslationLang"; import { useTranslationLang } from "../../hooks/useTranslationLang";
import { usePermissionStoreHook } from "@/store/modules/permission"; import { usePermissionStoreHook } from "@/store/modules/permission";
import globalization from "@/assets/svg/globalization.svg?component"; import globalization from "@/assets/svg/globalization.svg?component";
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
import Setting from "@iconify-icons/ri/settings-3-line";
import Check from "@iconify-icons/ep/check";
const menuRef = ref(); const menuRef = ref();
const defaultActive = ref(null); const defaultActive = ref(null);
@ -108,7 +111,7 @@ watch(
@click="translationCh" @click="translationCh"
> >
<span class="check-zh" v-show="locale === 'zh'"> <span class="check-zh" v-show="locale === 'zh'">
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</span> </span>
简体中文 简体中文
</el-dropdown-item> </el-dropdown-item>
@ -118,7 +121,7 @@ watch(
@click="translationEn" @click="translationEn"
> >
<span class="check-en" v-show="locale === 'en'"> <span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</span> </span>
English English
</el-dropdown-item> </el-dropdown-item>
@ -138,7 +141,7 @@ watch(
<el-dropdown-menu class="logout"> <el-dropdown-menu class="logout">
<el-dropdown-item @click="logout"> <el-dropdown-item @click="logout">
<IconifyIconOffline <IconifyIconOffline
icon="logout-circle-r-line"
:icon="LogoutCircleRLine"
style="margin: 5px" style="margin: 5px"
/> />
{{ t("buttons.hsLoginOut") }} {{ t("buttons.hsLoginOut") }}
@ -151,7 +154,7 @@ watch(
:title="t('buttons.hssystemSet')" :title="t('buttons.hssystemSet')"
@click="onPanel" @click="onPanel"
> >
<IconifyIconOffline icon="setting" />
<IconifyIconOffline :icon="Setting" />
</span> </span>
</div> </div>
</div> </div>

18
src/layout/components/sidebar/sidebarItem.vue

@ -7,6 +7,11 @@ import { transformI18n } from "@/plugins/i18n";
import { useRenderIcon } from "@/components/ReIcon/src/hooks"; import { useRenderIcon } from "@/components/ReIcon/src/hooks";
import { ref, toRaw, PropType, nextTick, computed, CSSProperties } from "vue"; import { ref, toRaw, PropType, nextTick, computed, CSSProperties } from "vue";
import ArrowUp from "@iconify-icons/ep/arrow-up";
import EpArrowDown from "@iconify-icons/ep/arrow-down";
import ArrowLeft from "@iconify-icons/ep/arrow-left";
import ArrowRight from "@iconify-icons/ep/arrow-right";
const { layout, isCollapse } = useNav(); const { layout, isCollapse } = useNav();
const props = defineProps({ const props = defineProps({
@ -78,7 +83,13 @@ const getSpanStyle = computed(() => {
}); });
const expandCloseIcon = computed(() => { const expandCloseIcon = computed(() => {
return getConfig()?.MenuArrowIconNoTransition ? "expand-close-icon" : "";
if (!getConfig()?.MenuArrowIconNoTransition) return "";
return {
"expand-close-icon": useRenderIcon(EpArrowDown),
"expand-open-icon": useRenderIcon(ArrowUp),
"collapse-close-icon": useRenderIcon(ArrowRight),
"collapse-open-icon": useRenderIcon(ArrowLeft)
};
}); });
const onlyOneChild: childrenType = ref(null); const onlyOneChild: childrenType = ref(null);
@ -220,11 +231,8 @@ function resolvePath(routePath) {
<el-sub-menu <el-sub-menu
v-else v-else
ref="subMenu" ref="subMenu"
v-bind="expandCloseIcon"
:index="resolvePath(props.item.path)" :index="resolvePath(props.item.path)"
v-bind:[expandCloseIcon]="useRenderIcon('ep-arrow-down')"
:expand-open-icon="useRenderIcon('ep-arrow-up')"
:collapse-close-icon="useRenderIcon('ep-arrow-right')"
:collapse-open-icon="useRenderIcon('ep-arrow-left')"
> >
<template #title> <template #title>
<div v-if="toRaw(props.item.meta.icon)" class="sub-menu-icon"> <div v-if="toRaw(props.item.meta.icon)" class="sub-menu-icon">

5
src/layout/components/sidebar/topCollapse.vue

@ -1,4 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
interface Props { interface Props {
isActive: boolean; isActive: boolean;
} }
@ -23,7 +26,7 @@ const toggleClick = () => {
@click="toggleClick" @click="toggleClick"
> >
<IconifyIconOffline <IconifyIconOffline
:icon="props.isActive ? 'menu-fold' : 'menu-unfold'"
:icon="props.isActive ? MenuFold : MenuUnfold"
class="inline-block align-middle hover:text-primary dark:hover:!text-white" class="inline-block align-middle hover:text-primary dark:hover:!text-white"
/> />
</div> </div>

26
src/layout/components/tag/index.vue

@ -11,6 +11,13 @@ import { handleAliveRoute, delAliveRoutes } from "@/router/utils";
import { useMultiTagsStoreHook } from "@/store/modules/multiTags"; import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
import { useResizeObserver, useDebounceFn, useFullscreen } from "@vueuse/core"; import { useResizeObserver, useDebounceFn, useFullscreen } from "@vueuse/core";
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
import ArrowDown from "@iconify-icons/ri/arrow-down-s-line";
import ArrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
import ArrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
import CloseBold from "@iconify-icons/ep/close-bold";
const { const {
route, route,
router, router,
@ -284,10 +291,10 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
toggle(); toggle();
setTimeout(() => { setTimeout(() => {
if (isFullscreen.value) { if (isFullscreen.value) {
tagsViews[6].icon = "exit-fullscreen";
tagsViews[6].icon = ExitFullscreen;
tagsViews[6].text = $t("buttons.hswholeExitFullScreen"); tagsViews[6].text = $t("buttons.hswholeExitFullScreen");
} else { } else {
tagsViews[6].icon = "fullscreen";
tagsViews[6].icon = Fullscreen;
tagsViews[6].text = $t("buttons.hswholeFullScreen"); tagsViews[6].text = $t("buttons.hswholeFullScreen");
} }
}, 100); }, 100);
@ -297,10 +304,10 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
onContentFullScreen(); onContentFullScreen();
setTimeout(() => { setTimeout(() => {
if (pureSetting.hiddenSideBar) { if (pureSetting.hiddenSideBar) {
tagsViews[7].icon = "exit-fullscreen";
tagsViews[7].icon = ExitFullscreen;
tagsViews[7].text = $t("buttons.hscontentExitFullScreen"); tagsViews[7].text = $t("buttons.hscontentExitFullScreen");
} else { } else {
tagsViews[7].icon = "fullscreen";
tagsViews[7].icon = Fullscreen;
tagsViews[7].text = $t("buttons.hscontentFullScreen"); tagsViews[7].text = $t("buttons.hscontentFullScreen");
} }
}, 100); }, 100);
@ -496,7 +503,7 @@ onMounted(() => {
<template> <template>
<div ref="containerDom" class="tags-view" v-if="!showTags"> <div ref="containerDom" class="tags-view" v-if="!showTags">
<span v-show="isShowArrow" class="arrow-left"> <span v-show="isShowArrow" class="arrow-left">
<IconifyIconOffline icon="arrow-left-s-line" @click="handleScroll(200)" />
<IconifyIconOffline :icon="ArrowLeftSLine" @click="handleScroll(200)" />
</span> </span>
<div ref="scrollbarDom" class="scroll-container"> <div ref="scrollbarDom" class="scroll-container">
<div class="tab select-none" ref="tabDom" :style="getTabStyle"> <div class="tab select-none" ref="tabDom" :style="getTabStyle">
@ -530,7 +537,7 @@ onMounted(() => {
class="el-icon-close" class="el-icon-close"
@click.stop="deleteMenu(item)" @click.stop="deleteMenu(item)"
> >
<IconifyIconOffline icon="close-bold" />
<IconifyIconOffline :icon="CloseBold" />
</span> </span>
<div <div
:ref="'schedule' + index" :ref="'schedule' + index"
@ -541,10 +548,7 @@ onMounted(() => {
</div> </div>
</div> </div>
<span v-show="isShowArrow" class="arrow-right"> <span v-show="isShowArrow" class="arrow-right">
<IconifyIconOffline
icon="arrow-right-s-line"
@click="handleScroll(-200)"
/>
<IconifyIconOffline :icon="ArrowRightSLine" @click="handleScroll(-200)" />
</span> </span>
<!-- 右键菜单按钮 --> <!-- 右键菜单按钮 -->
<transition name="el-zoom-in-top"> <transition name="el-zoom-in-top">
@ -573,7 +577,7 @@ onMounted(() => {
@command="handleCommand" @command="handleCommand"
> >
<span class="arrow-down"> <span class="arrow-down">
<IconifyIconOffline icon="arrow-down" class="dark:text-white" />
<IconifyIconOffline :icon="ArrowDown" class="dark:text-white" />
</span> </span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>

24
src/layout/hooks/useTag.ts

@ -17,6 +17,14 @@ import { useSettingStoreHook } from "@/store/modules/settings";
import { useMultiTagsStoreHook } from "@/store/modules/multiTags"; import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
import { storageLocal, toggleClass, hasClass } from "@pureadmin/utils"; import { storageLocal, toggleClass, hasClass } from "@pureadmin/utils";
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
import CloseAllTags from "@iconify-icons/ri/subtract-line";
import CloseOtherTags from "@iconify-icons/ri/text-spacing";
import CloseRightTags from "@iconify-icons/ri/text-direction-l";
import CloseLeftTags from "@iconify-icons/ri/text-direction-r";
import RefreshRight from "@iconify-icons/ep/refresh-right";
import Close from "@iconify-icons/ep/close";
export function useTags() { export function useTags() {
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@ -47,56 +55,56 @@ export function useTags() {
const tagsViews = reactive<Array<tagsViewsType>>([ const tagsViews = reactive<Array<tagsViewsType>>([
{ {
icon: "refresh-right",
icon: RefreshRight,
text: $t("buttons.hsreload"), text: $t("buttons.hsreload"),
divided: false, divided: false,
disabled: false, disabled: false,
show: true show: true
}, },
{ {
icon: "close",
icon: Close,
text: $t("buttons.hscloseCurrentTab"), text: $t("buttons.hscloseCurrentTab"),
divided: false, divided: false,
disabled: multiTags.value.length > 1 ? false : true, disabled: multiTags.value.length > 1 ? false : true,
show: true show: true
}, },
{ {
icon: "close-left-tags",
icon: CloseLeftTags,
text: $t("buttons.hscloseLeftTabs"), text: $t("buttons.hscloseLeftTabs"),
divided: true, divided: true,
disabled: multiTags.value.length > 1 ? false : true, disabled: multiTags.value.length > 1 ? false : true,
show: true show: true
}, },
{ {
icon: "close-right-tags",
icon: CloseRightTags,
text: $t("buttons.hscloseRightTabs"), text: $t("buttons.hscloseRightTabs"),
divided: false, divided: false,
disabled: multiTags.value.length > 1 ? false : true, disabled: multiTags.value.length > 1 ? false : true,
show: true show: true
}, },
{ {
icon: "close-other-tags",
icon: CloseOtherTags,
text: $t("buttons.hscloseOtherTabs"), text: $t("buttons.hscloseOtherTabs"),
divided: true, divided: true,
disabled: multiTags.value.length > 2 ? false : true, disabled: multiTags.value.length > 2 ? false : true,
show: true show: true
}, },
{ {
icon: "close-all-tags",
icon: CloseAllTags,
text: $t("buttons.hscloseAllTabs"), text: $t("buttons.hscloseAllTabs"),
divided: false, divided: false,
disabled: multiTags.value.length > 1 ? false : true, disabled: multiTags.value.length > 1 ? false : true,
show: true show: true
}, },
{ {
icon: "fullscreen",
icon: Fullscreen,
text: $t("buttons.hswholeFullScreen"), text: $t("buttons.hswholeFullScreen"),
divided: true, divided: true,
disabled: false, disabled: false,
show: true show: true
}, },
{ {
icon: "fullscreen",
icon: Fullscreen,
text: $t("buttons.hscontentFullScreen"), text: $t("buttons.hscontentFullScreen"),
divided: false, divided: false,
disabled: false, disabled: false,

1
src/layout/index.vue

@ -1,4 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import "animate.css";
import { setType } from "./types"; import { setType } from "./types";
import { emitter } from "@/utils/mitt"; import { emitter } from "@/utils/mitt";
import { useLayout } from "./hooks/useLayout"; import { useLayout } from "./hooks/useLayout";

9
src/layout/types.ts

@ -1,17 +1,20 @@
import type { IconifyIcon } from "@iconify/vue";
import HomeFilled from "@iconify-icons/ep/home-filled";
export const routerArrays: Array<RouteConfigs> = [ export const routerArrays: Array<RouteConfigs> = [
{ {
path: "/welcome", path: "/welcome",
parentPath: "/", parentPath: "/",
meta: { meta: {
title: "menus.hshome", title: "menus.hshome",
icon: "home-filled"
icon: HomeFilled
} }
} }
]; ];
export type routeMetaType = { export type routeMetaType = {
title?: string; title?: string;
icon?: string;
icon?: string | IconifyIcon;
showLink?: boolean; showLink?: boolean;
savedPosition?: boolean; savedPosition?: boolean;
auths?: Array<string>; auths?: Array<string>;
@ -32,7 +35,7 @@ export type multiTagsType = {
}; };
export type tagsViewsType = { export type tagsViewsType = {
icon: string;
icon: string | IconifyIcon;
text: string; text: string;
divided: boolean; divided: boolean;
disabled: boolean; disabled: boolean;

1
src/main.ts

@ -13,7 +13,6 @@ import { injectResponsiveStorage } from "@/utils/responsive";
// import Table from "@pureadmin/table"; // import Table from "@pureadmin/table";
// import PureDescriptions from "@pureadmin/descriptions"; // import PureDescriptions from "@pureadmin/descriptions";
import "animate.css";
// 引入重置样式 // 引入重置样式
import "./style/reset.scss"; import "./style/reset.scss";
// 导入公共样式 // 导入公共样式

5
src/plugins/echarts/index.ts

@ -1,6 +1,6 @@
import type { App } from "vue"; import type { App } from "vue";
import * as echarts from "echarts/core"; import * as echarts from "echarts/core";
import { SVGRenderer } from "echarts/renderers";
import { CanvasRenderer } from "echarts/renderers";
import { PieChart, BarChart, LineChart } from "echarts/charts"; import { PieChart, BarChart, LineChart } from "echarts/charts";
import { import {
GridComponent, GridComponent,
@ -19,7 +19,7 @@ use([
PieChart, PieChart,
BarChart, BarChart,
LineChart, LineChart,
SVGRenderer,
CanvasRenderer,
GridComponent, GridComponent,
TitleComponent, TitleComponent,
LegendComponent, LegendComponent,
@ -33,6 +33,7 @@ use([
/** /**
* @description echarts * @description echarts
* @see {@link https://echarts.apache.org/handbook/zh/basics/import#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5-echarts-%E5%9B%BE%E8%A1%A8%E5%92%8C%E7%BB%84%E4%BB%B6} * @see {@link https://echarts.apache.org/handbook/zh/basics/import#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5-echarts-%E5%9B%BE%E8%A1%A8%E5%92%8C%E7%BB%84%E4%BB%B6}
* @see `$echarts` `globalProperties` https://pure-admin-utils.netlify.app/hooks/useEcharts/useEcharts.html 使用
*/ */
export function useEcharts(app: App) { export function useEcharts(app: App) {
app.config.globalProperties.$echarts = echarts; app.config.globalProperties.$echarts = echarts;

3
src/router/modules/error.ts

@ -1,10 +1,11 @@
import { $t } from "@/plugins/i18n"; import { $t } from "@/plugins/i18n";
import InformationLine from "@iconify-icons/ri/information-line";
export default { export default {
path: "/error", path: "/error",
redirect: "/error/403", redirect: "/error/403",
meta: { meta: {
icon: "information-line",
icon: InformationLine,
title: $t("menus.hsabnormal"), title: $t("menus.hsabnormal"),
rank: 9 rank: 9
}, },

3
src/router/modules/home.ts

@ -1,5 +1,6 @@
import { $t } from "@/plugins/i18n"; import { $t } from "@/plugins/i18n";
const Layout = () => import("@/layout/index.vue"); const Layout = () => import("@/layout/index.vue");
import HomeFilled from "@iconify-icons/ep/home-filled";
export default { export default {
path: "/", path: "/",
@ -7,7 +8,7 @@ export default {
component: Layout, component: Layout,
redirect: "/welcome", redirect: "/welcome",
meta: { meta: {
icon: "home-filled",
icon: HomeFilled,
title: $t("menus.hshome"), title: $t("menus.hshome"),
rank: 0 rank: 0
}, },

3
src/router/modules/remaining.ts

@ -1,5 +1,6 @@
import { $t } from "@/plugins/i18n"; import { $t } from "@/plugins/i18n";
const Layout = () => import("@/layout/index.vue"); const Layout = () => import("@/layout/index.vue");
import HomeFilled from "@iconify-icons/ep/home-filled";
export default [ export default [
{ {
@ -16,7 +17,7 @@ export default [
path: "/redirect", path: "/redirect",
component: Layout, component: Layout,
meta: { meta: {
icon: "home-filled",
icon: HomeFilled,
title: $t("menus.hshome"), title: $t("menus.hshome"),
showLink: false, showLink: false,
rank: 102 rank: 102

8
src/style/reset.scss

@ -111,7 +111,6 @@ button,
[type="button"], [type="button"],
[type="reset"], [type="reset"],
[type="submit"] { [type="submit"] {
-webkit-appearance: button;
background-image: none; background-image: none;
} }
@ -133,16 +132,10 @@ progress {
} }
[type="search"] { [type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px; outline-offset: -2px;
} }
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button { ::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit; font: inherit;
} }
@ -211,7 +204,6 @@ iframe,
embed, embed,
object { object {
display: block; display: block;
vertical-align: middle;
} }
img, img,

4
src/utils/http/index.ts

@ -175,7 +175,7 @@ class PureHttp {
/** 单独抽离的post工具函数 */ /** 单独抽离的post工具函数 */
public post<T, P>( public post<T, P>(
url: string, url: string,
params?: T,
params?: AxiosRequestConfig<T>,
config?: PureHttpRequestConfig config?: PureHttpRequestConfig
): Promise<P> { ): Promise<P> {
return this.request<P>("post", url, params, config); return this.request<P>("post", url, params, config);
@ -184,7 +184,7 @@ class PureHttp {
/** 单独抽离的get工具函数 */ /** 单独抽离的get工具函数 */
public get<T, P>( public get<T, P>(
url: string, url: string,
params?: T,
params?: AxiosRequestConfig<T>,
config?: PureHttpRequestConfig config?: PureHttpRequestConfig
): Promise<P> { ): Promise<P> {
return this.request<P>("get", url, params, config); return this.request<P>("get", url, params, config);

11
src/views/login/index.vue

@ -19,6 +19,9 @@ import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
import dayIcon from "@/assets/svg/day.svg?component"; import dayIcon from "@/assets/svg/day.svg?component";
import darkIcon from "@/assets/svg/dark.svg?component"; import darkIcon from "@/assets/svg/dark.svg?component";
import globalization from "@/assets/svg/globalization.svg?component"; import globalization from "@/assets/svg/globalization.svg?component";
import Lock from "@iconify-icons/ri/lock-fill";
import Check from "@iconify-icons/ep/check";
import User from "@iconify-icons/ri/user-3-fill";
defineOptions({ defineOptions({
name: "Login" name: "Login"
@ -107,7 +110,7 @@ onBeforeUnmount(() => {
<IconifyIconOffline <IconifyIconOffline
class="check-zh" class="check-zh"
v-show="locale === 'zh'" v-show="locale === 'zh'"
icon="check"
:icon="Check"
/> />
简体中文 简体中文
</el-dropdown-item> </el-dropdown-item>
@ -117,7 +120,7 @@ onBeforeUnmount(() => {
@click="translationEn" @click="translationEn"
> >
<span class="check-en" v-show="locale === 'en'"> <span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" />
<IconifyIconOffline :icon="Check" />
</span> </span>
English English
</el-dropdown-item> </el-dropdown-item>
@ -157,7 +160,7 @@ onBeforeUnmount(() => {
clearable clearable
v-model="ruleForm.username" v-model="ruleForm.username"
:placeholder="t('login.username')" :placeholder="t('login.username')"
:prefix-icon="useRenderIcon('user')"
:prefix-icon="useRenderIcon(User)"
/> />
</el-form-item> </el-form-item>
</Motion> </Motion>
@ -169,7 +172,7 @@ onBeforeUnmount(() => {
show-password show-password
v-model="ruleForm.password" v-model="ruleForm.password"
:placeholder="t('login.password')" :placeholder="t('login.password')"
:prefix-icon="useRenderIcon('lock')"
:prefix-icon="useRenderIcon(Lock)"
/> />
</el-form-item> </el-form-item>
</Motion> </Motion>

5
types/global.d.ts

@ -5,6 +5,7 @@ import type {
ComponentPublicInstance ComponentPublicInstance
} from "vue"; } from "vue";
import type { ECharts } from "echarts"; import type { ECharts } from "echarts";
import type { IconifyIcon } from "@iconify/vue";
import type { ResponsiveStorage } from "./index"; import type { ResponsiveStorage } from "./index";
import type { TableColumns } from "@pureadmin/table"; import type { TableColumns } from "@pureadmin/table";
import { type RouteComponent, type RouteLocationNormalized } from "vue-router"; import { type RouteComponent, type RouteLocationNormalized } from "vue-router";
@ -189,7 +190,7 @@ declare global {
/** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加) `必填` */ /** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加) `必填` */
title: string; title: string;
/** 菜单图标 `可选` */ /** 菜单图标 `可选` */
icon?: string | FunctionalComponent;
icon?: string | FunctionalComponent | IconifyIcon;
/** 菜单名称右侧的额外图标,支持`fontawesome`、`iconfont`、`element-plus-icon` `可选` */ /** 菜单名称右侧的额外图标,支持`fontawesome`、`iconfont`、`element-plus-icon` `可选` */
extraIcon?: { extraIcon?: {
svg?: boolean; svg?: boolean;
@ -247,7 +248,7 @@ declare global {
/** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加)`必填` */ /** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加)`必填` */
title: string; title: string;
/** 菜单图标 `可选` */ /** 菜单图标 `可选` */
icon?: string | FunctionalComponent;
icon?: string | FunctionalComponent | IconifyIcon;
/** 是否在菜单中显示(默认`true`)`可选` */ /** 是否在菜单中显示(默认`true`)`可选` */
showLink?: boolean; showLink?: boolean;
/** 菜单升序排序,值越高排的越后(只针对顶级路由)`可选` */ /** 菜单升序排序,值越高排的越后(只针对顶级路由)`可选` */

4
vite.config.ts

@ -2,8 +2,8 @@ import dayjs from "dayjs";
import { resolve } from "path"; import { resolve } from "path";
import pkg from "./package.json"; import pkg from "./package.json";
import { warpperEnv } from "./build"; import { warpperEnv } from "./build";
import { include } from "./build/optimize";
import { getPluginsList } from "./build/plugins"; import { getPluginsList } from "./build/plugins";
import { include, exclude } from "./build/optimize";
import { UserConfigExport, ConfigEnv, loadEnv } from "vite"; import { UserConfigExport, ConfigEnv, loadEnv } from "vite";
/** 当前执行node命令时文件夹的地址(工作目录) */ /** 当前执行node命令时文件夹的地址(工作目录) */
@ -49,7 +49,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
// https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options // https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options
optimizeDeps: { optimizeDeps: {
include, include,
exclude: ["@pureadmin/theme/dist/browser-utils"]
exclude
}, },
build: { build: {
sourcemap: false, sourcemap: false,

Loading…
Cancel
Save