mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-24 23:47:17 +08:00
release: update 3.9.0
This commit is contained in:
parent
bbe23ce0a2
commit
2b67efe771
@ -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",
|
||||||
@ -23,3 +23,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 };
|
||||||
|
@ -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: "权限管理",
|
title: "权限管理",
|
||||||
icon: "lollipop",
|
icon: Lollipop,
|
||||||
rank: 10
|
rank: 10
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -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",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "3.8.7",
|
"Version": "3.9.0",
|
||||||
"Title": "PureAdmin",
|
"Title": "PureAdmin",
|
||||||
"FixedHeader": true,
|
"FixedHeader": true,
|
||||||
"HiddenSideBar": false,
|
"HiddenSideBar": false,
|
||||||
|
@ -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({
|
||||||
|
@ -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: null
|
||||||
default: ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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" },
|
||||||
|
@ -5,6 +5,8 @@ import mixNav from "./sidebar/mixNav.vue";
|
|||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import Breadcrumb from "./sidebar/breadCrumb.vue";
|
import Breadcrumb from "./sidebar/breadCrumb.vue";
|
||||||
import topCollapse from "./sidebar/topCollapse.vue";
|
import topCollapse from "./sidebar/topCollapse.vue";
|
||||||
|
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
layout,
|
layout,
|
||||||
@ -54,7 +56,7 @@ const {
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
退出系统
|
退出系统
|
||||||
@ -67,7 +69,7 @@ const {
|
|||||||
title="打开项目配置"
|
title="打开项目配置"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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="ArrowUpLine" class="icon" />
|
||||||
<IconifyIconOffline icon="arrow-down-line" 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>
|
||||||
|
@ -8,6 +8,7 @@ import { useNav } from "@/layout/hooks/useNav";
|
|||||||
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 {
|
||||||
/** 弹窗显隐 */
|
/** 弹窗显隐 */
|
||||||
@ -147,7 +148,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,6 +3,7 @@ import { computed } from "vue";
|
|||||||
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";
|
||||||
|
|
||||||
interface optionsItem {
|
interface optionsItem {
|
||||||
path: string;
|
path: string;
|
||||||
@ -64,7 +65,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">{{ item.meta?.title }}</span>
|
<span class="result-item-title">{{ item.meta?.title }}</span>
|
||||||
<enterOutlined />
|
<enterOutlined />
|
||||||
</div>
|
</div>
|
||||||
|
@ -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>
|
||||||
|
@ -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"
|
||||||
|
@ -5,6 +5,8 @@ import { ref, watch, nextTick } from "vue";
|
|||||||
import SidebarItem from "./sidebarItem.vue";
|
import SidebarItem from "./sidebarItem.vue";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
|
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
|
|
||||||
@ -71,7 +73,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"
|
||||||
/>
|
/>
|
||||||
退出系统
|
退出系统
|
||||||
@ -84,7 +86,7 @@ watch(
|
|||||||
title="打开项目配置"
|
title="打开项目配置"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
@ -6,6 +6,8 @@ import { ref, toRaw, watch, onMounted, nextTick } from "vue";
|
|||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
|
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
const defaultActive = ref(null);
|
const defaultActive = ref(null);
|
||||||
@ -102,7 +104,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"
|
||||||
/>
|
/>
|
||||||
退出系统
|
退出系统
|
||||||
@ -115,7 +117,7 @@ watch(
|
|||||||
title="打开项目配置"
|
title="打开项目配置"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,11 @@ import { useNav } from "@/layout/hooks/useNav";
|
|||||||
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({
|
||||||
@ -77,7 +82,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);
|
||||||
@ -219,11 +230,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">
|
||||||
|
@ -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>
|
||||||
|
@ -10,6 +10,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,
|
||||||
@ -282,11 +289,11 @@ 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 = "整体页面退出全屏";
|
tagsViews[6].text = "退出全屏";
|
||||||
} else {
|
} else {
|
||||||
tagsViews[6].icon = "fullscreen";
|
tagsViews[6].icon = Fullscreen;
|
||||||
tagsViews[6].text = "整体页面全屏";
|
tagsViews[6].text = "全屏";
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
break;
|
break;
|
||||||
@ -295,10 +302,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 = "内容区退出全屏";
|
tagsViews[7].text = "内容区退出全屏";
|
||||||
} else {
|
} else {
|
||||||
tagsViews[7].icon = "fullscreen";
|
tagsViews[7].icon = Fullscreen;
|
||||||
tagsViews[7].text = "内容区全屏";
|
tagsViews[7].text = "内容区全屏";
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
@ -494,7 +501,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">
|
||||||
@ -528,7 +535,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"
|
||||||
@ -539,10 +546,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span v-show="isShowArrow" class="arrow-right">
|
<span v-show="isShowArrow" class="arrow-right">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline :icon="ArrowRightSLine" @click="handleScroll(-200)" />
|
||||||
icon="arrow-right-s-line"
|
|
||||||
@click="handleScroll(-200)"
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
<!-- 右键菜单按钮 -->
|
<!-- 右键菜单按钮 -->
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
@ -571,7 +575,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>
|
||||||
|
@ -16,6 +16,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();
|
||||||
@ -46,56 +54,56 @@ export function useTags() {
|
|||||||
|
|
||||||
const tagsViews = reactive<Array<tagsViewsType>>([
|
const tagsViews = reactive<Array<tagsViewsType>>([
|
||||||
{
|
{
|
||||||
icon: "refresh-right",
|
icon: RefreshRight,
|
||||||
text: "重新加载",
|
text: "重新加载",
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "close",
|
icon: Close,
|
||||||
text: "关闭当前标签页",
|
text: "关闭当前标签页",
|
||||||
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: "关闭左侧标签页",
|
text: "关闭左侧标签页",
|
||||||
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: "关闭右侧标签页",
|
text: "关闭右侧标签页",
|
||||||
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: "关闭其他标签页",
|
text: "关闭其他标签页",
|
||||||
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: "关闭全部标签页",
|
text: "关闭全部标签页",
|
||||||
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: "整体页面全屏",
|
text: "整体页面全屏",
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "fullscreen",
|
icon: Fullscreen,
|
||||||
text: "内容区全屏",
|
text: "内容区全屏",
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -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";
|
||||||
|
@ -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: "首页",
|
title: "首页",
|
||||||
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;
|
||||||
|
@ -12,13 +12,11 @@ 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";
|
||||||
// 导入公共样式
|
// 导入公共样式
|
||||||
import "./style/index.scss";
|
import "./style/index.scss";
|
||||||
import "element-plus/dist/index.css";
|
import "element-plus/dist/index.css";
|
||||||
|
|
||||||
// 导入字体图标
|
// 导入字体图标
|
||||||
import "./assets/iconfont/iconfont.js";
|
import "./assets/iconfont/iconfont.js";
|
||||||
import "./assets/iconfont/iconfont.css";
|
import "./assets/iconfont/iconfont.css";
|
||||||
|
@ -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;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
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: "异常页面",
|
title: "异常页面",
|
||||||
rank: 9
|
rank: 9
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
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: "/",
|
||||||
@ -6,7 +7,7 @@ export default {
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/welcome",
|
redirect: "/welcome",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "home-filled",
|
icon: HomeFilled,
|
||||||
title: "首页",
|
title: "首页",
|
||||||
rank: 0
|
rank: 0
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const Layout = () => import("@/layout/index.vue");
|
const Layout = () => import("@/layout/index.vue");
|
||||||
|
import HomeFilled from "@iconify-icons/ep/home-filled";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@ -15,7 +16,7 @@ export default [
|
|||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
icon: "home-filled",
|
icon: HomeFilled,
|
||||||
title: "首页",
|
title: "首页",
|
||||||
showLink: false,
|
showLink: false,
|
||||||
rank: 104
|
rank: 104
|
||||||
|
@ -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,
|
||||||
|
@ -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);
|
||||||
|
@ -15,6 +15,8 @@ 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 Lock from "@iconify-icons/ri/lock-fill";
|
||||||
|
import User from "@iconify-icons/ri/user-3-fill";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "Login"
|
name: "Login"
|
||||||
@ -119,7 +121,7 @@ onBeforeUnmount(() => {
|
|||||||
clearable
|
clearable
|
||||||
v-model="ruleForm.username"
|
v-model="ruleForm.username"
|
||||||
placeholder="账号"
|
placeholder="账号"
|
||||||
:prefix-icon="useRenderIcon('user')"
|
:prefix-icon="useRenderIcon(User)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</Motion>
|
</Motion>
|
||||||
@ -131,7 +133,7 @@ onBeforeUnmount(() => {
|
|||||||
show-password
|
show-password
|
||||||
v-model="ruleForm.password"
|
v-model="ruleForm.password"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
:prefix-icon="useRenderIcon('lock')"
|
:prefix-icon="useRenderIcon(Lock)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</Motion>
|
</Motion>
|
||||||
|
5
types/global.d.ts
vendored
5
types/global.d.ts
vendored
@ -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;
|
||||||
/** 菜单升序排序,值越高排的越后(只针对顶级路由)`可选` */
|
/** 菜单升序排序,值越高排的越后(只针对顶级路由)`可选` */
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user