mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ef6ce70db | ||
|
|
d5d7dd8e57 | ||
|
|
1a39d0962e | ||
|
|
86b77c2877 | ||
|
|
cf8e5897fb | ||
|
|
f1e6ddff18 | ||
|
|
059a704f53 | ||
|
|
4c29bcc49a | ||
|
|
47960bbaf9 | ||
|
|
b2ec77275d |
@@ -1,3 +1,16 @@
|
|||||||
|
# 3.9.1 (2022-12-02)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- Add `CachingAsyncRoutes` whether to enable dynamic route cache local global configuration, default `true`
|
||||||
|
- Add `TooltipEffect` global configuration, you can configure the `effect` attribute of all `el-tooltip` on the platform body, the default `light`, does not affect the business code
|
||||||
|
- Add directory, menu text exceeds display `Tooltip` text prompt demo
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Optimize `initRouter` method, compatible with `sso` scenario
|
||||||
|
- Breadcrumb animation style optimization
|
||||||
|
|
||||||
# 3.9.0 (2022-11-30)
|
# 3.9.0 (2022-11-30)
|
||||||
|
|
||||||
### 🐞 Bug fixes
|
### 🐞 Bug fixes
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
|||||||
|
# 3.9.1 (2022-12-02)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- Add `CachingAsyncRoutes` whether to enable dynamic route cache local global configuration, default `true`
|
||||||
|
- Add `TooltipEffect` global configuration, you can configure the `effect` attribute of all `el-tooltip` on the platform body, the default `light`, does not affect the business code
|
||||||
|
- Add directory, menu text exceeds display `Tooltip` text prompt demo
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Optimize `initRouter` method, compatible with `sso` scenario
|
||||||
|
- Breadcrumb animation style optimization
|
||||||
|
|
||||||
# 3.9.0 (2022-11-30)
|
# 3.9.0 (2022-11-30)
|
||||||
|
|
||||||
### 🐞 Bug fixes
|
### 🐞 Bug fixes
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# 3.9.1 (2022-12-02)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- 添加 `CachingAsyncRoutes` 是否开启动态路由缓存本地的全局配置,默认 `true`
|
||||||
|
- 添加 `TooltipEffect` 全局配置,可配置平台主体所有 `el-tooltip` 的 `effect` 属性,默认 `light`,不影响业务代码
|
||||||
|
- 添加目录、菜单文字超出显示 `Tooltip` 文字提示演示
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- 优化 `initRouter` 方法,兼容 `sso` 场景
|
||||||
|
- 面包屑动画样式优化
|
||||||
|
|
||||||
# 3.9.0 (2022-11-30)
|
# 3.9.0 (2022-11-30)
|
||||||
|
|
||||||
### 🐞 Bug fixes
|
### 🐞 Bug fixes
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ menus:
|
|||||||
hsPureTableBase: Base Usage
|
hsPureTableBase: Base Usage
|
||||||
hsPureTableHigh: High Usage
|
hsPureTableHigh: High Usage
|
||||||
hsTree: Big Data Tree
|
hsTree: Big Data Tree
|
||||||
|
hsMenuoverflow: Menu Overflow Show Tooltip Text
|
||||||
|
hsChildMenuoverflow: Child Menu Overflow Show Tooltip Text
|
||||||
status:
|
status:
|
||||||
hsLoad: Loading...
|
hsLoad: Loading...
|
||||||
login:
|
login:
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ menus:
|
|||||||
hsPureTableBase: 基础用法(23个示例)
|
hsPureTableBase: 基础用法(23个示例)
|
||||||
hsPureTableHigh: 高级用法(8个示例)
|
hsPureTableHigh: 高级用法(8个示例)
|
||||||
hsTree: 大数据树业务组件
|
hsTree: 大数据树业务组件
|
||||||
|
hsMenuoverflow: 目录超出显示 Tooltip 文字提示
|
||||||
|
hsChildMenuoverflow: 菜单超出显示 Tooltip 文字提示
|
||||||
status:
|
status:
|
||||||
hsLoad: 加载中...
|
hsLoad: 加载中...
|
||||||
login:
|
login:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-pure-admin",
|
"name": "vue-pure-admin",
|
||||||
"version": "3.9.0",
|
"version": "3.9.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"@logicflow/core": "^1.1.30",
|
"@logicflow/core": "^1.1.30",
|
||||||
"@logicflow/extension": "^1.1.30",
|
"@logicflow/extension": "^1.1.30",
|
||||||
"@pureadmin/descriptions": "^1.1.0",
|
"@pureadmin/descriptions": "^1.1.0",
|
||||||
"@pureadmin/table": "^1.8.0",
|
"@pureadmin/table": "^1.8.1",
|
||||||
"@pureadmin/utils": "^1.7.1",
|
"@pureadmin/utils": "^1.7.1",
|
||||||
"@vueuse/core": "^9.6.0",
|
"@vueuse/core": "^9.6.0",
|
||||||
"@vueuse/motion": "2.0.0-beta.12",
|
"@vueuse/motion": "2.0.0-beta.12",
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
"dayjs": "^1.11.6",
|
"dayjs": "^1.11.6",
|
||||||
"echarts": "^5.4.0",
|
"echarts": "^5.4.0",
|
||||||
"el-table-infinite-scroll": "^3.0.1",
|
"el-table-infinite-scroll": "^3.0.1",
|
||||||
"element-plus": "^2.2.25",
|
"element-plus": "^2.2.26",
|
||||||
"element-resize-detector": "^1.2.4",
|
"element-resize-detector": "^1.2.4",
|
||||||
"intro.js": "^6.0.0",
|
"intro.js": "^6.0.0",
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
|
|||||||
24
pnpm-lock.yaml
generated
24
pnpm-lock.yaml
generated
@@ -14,7 +14,7 @@ specifiers:
|
|||||||
"@logicflow/core": ^1.1.30
|
"@logicflow/core": ^1.1.30
|
||||||
"@logicflow/extension": ^1.1.30
|
"@logicflow/extension": ^1.1.30
|
||||||
"@pureadmin/descriptions": ^1.1.0
|
"@pureadmin/descriptions": ^1.1.0
|
||||||
"@pureadmin/table": ^1.8.0
|
"@pureadmin/table": ^1.8.1
|
||||||
"@pureadmin/theme": ^2.4.0
|
"@pureadmin/theme": ^2.4.0
|
||||||
"@pureadmin/utils": ^1.7.1
|
"@pureadmin/utils": ^1.7.1
|
||||||
"@types/element-resize-detector": 1.1.3
|
"@types/element-resize-detector": 1.1.3
|
||||||
@@ -48,7 +48,7 @@ specifiers:
|
|||||||
dayjs: ^1.11.6
|
dayjs: ^1.11.6
|
||||||
echarts: ^5.4.0
|
echarts: ^5.4.0
|
||||||
el-table-infinite-scroll: ^3.0.1
|
el-table-infinite-scroll: ^3.0.1
|
||||||
element-plus: ^2.2.25
|
element-plus: ^2.2.26
|
||||||
element-resize-detector: ^1.2.4
|
element-resize-detector: ^1.2.4
|
||||||
eslint: ^8.8.0
|
eslint: ^8.8.0
|
||||||
eslint-plugin-prettier: ^4.0.0
|
eslint-plugin-prettier: ^4.0.0
|
||||||
@@ -125,8 +125,8 @@ dependencies:
|
|||||||
"@howdyjs/mouse-menu": 2.0.5_vue@3.2.45
|
"@howdyjs/mouse-menu": 2.0.5_vue@3.2.45
|
||||||
"@logicflow/core": 1.1.31
|
"@logicflow/core": 1.1.31
|
||||||
"@logicflow/extension": 1.1.31
|
"@logicflow/extension": 1.1.31
|
||||||
"@pureadmin/descriptions": 1.1.1_element-plus@2.2.25
|
"@pureadmin/descriptions": 1.1.1_element-plus@2.2.26
|
||||||
"@pureadmin/table": 1.8.1_element-plus@2.2.25
|
"@pureadmin/table": 1.8.1_element-plus@2.2.26
|
||||||
"@pureadmin/utils": 1.7.1_aotapuqn7htzdjltsyimavekky
|
"@pureadmin/utils": 1.7.1_aotapuqn7htzdjltsyimavekky
|
||||||
"@vueuse/core": 9.6.0_vue@3.2.45
|
"@vueuse/core": 9.6.0_vue@3.2.45
|
||||||
"@vueuse/motion": 2.0.0-beta.12_vue@3.2.45
|
"@vueuse/motion": 2.0.0-beta.12_vue@3.2.45
|
||||||
@@ -139,7 +139,7 @@ dependencies:
|
|||||||
dayjs: 1.11.6
|
dayjs: 1.11.6
|
||||||
echarts: 5.4.0
|
echarts: 5.4.0
|
||||||
el-table-infinite-scroll: 3.0.1
|
el-table-infinite-scroll: 3.0.1
|
||||||
element-plus: 2.2.25_vue@3.2.45
|
element-plus: 2.2.26_vue@3.2.45
|
||||||
element-resize-detector: 1.2.4
|
element-resize-detector: 1.2.4
|
||||||
intro.js: 6.0.0
|
intro.js: 6.0.0
|
||||||
js-cookie: 3.0.1
|
js-cookie: 3.0.1
|
||||||
@@ -1264,7 +1264,7 @@ packages:
|
|||||||
fastq: 1.13.0
|
fastq: 1.13.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@pureadmin/descriptions/1.1.1_element-plus@2.2.25:
|
/@pureadmin/descriptions/1.1.1_element-plus@2.2.26:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-4BHLKomLU/LxGs5EUA+h+aKNrJEkhrU6+QE8VoWfJZ8VTU6ddvFLT/Pi4WuO5CWNXM9ZjqvHLFFVwEPlKntqtg==
|
integrity: sha512-4BHLKomLU/LxGs5EUA+h+aKNrJEkhrU6+QE8VoWfJZ8VTU6ddvFLT/Pi4WuO5CWNXM9ZjqvHLFFVwEPlKntqtg==
|
||||||
@@ -1273,11 +1273,11 @@ packages:
|
|||||||
element-plus: ^2.0.0
|
element-plus: ^2.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
"@element-plus/icons-vue": 2.0.10_vue@3.2.45
|
"@element-plus/icons-vue": 2.0.10_vue@3.2.45
|
||||||
element-plus: 2.2.25_vue@3.2.45
|
element-plus: 2.2.26_vue@3.2.45
|
||||||
vue: 3.2.45
|
vue: 3.2.45
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@pureadmin/table/1.8.1_element-plus@2.2.25:
|
/@pureadmin/table/1.8.1_element-plus@2.2.26:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-oZ5GYmLTDgQ64U6+yKFjvpZG2Seuudk3hOWnUogMvKxhIvaRQsGBHbvyg47asMmXxUyeilq+nRumyuiuV7WJTg==
|
integrity: sha512-oZ5GYmLTDgQ64U6+yKFjvpZG2Seuudk3hOWnUogMvKxhIvaRQsGBHbvyg47asMmXxUyeilq+nRumyuiuV7WJTg==
|
||||||
@@ -1285,7 +1285,7 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
element-plus: ^2.0.0
|
element-plus: ^2.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
element-plus: 2.2.25_vue@3.2.45
|
element-plus: 2.2.26_vue@3.2.45
|
||||||
vue: 3.2.45
|
vue: 3.2.45
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -3758,7 +3758,7 @@ packages:
|
|||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
core-js: 3.26.1
|
core-js: 3.26.1
|
||||||
element-plus: 2.2.25_vue@3.2.45
|
element-plus: 2.2.26_vue@3.2.45
|
||||||
vue: 3.2.45
|
vue: 3.2.45
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- "@vue/composition-api"
|
- "@vue/composition-api"
|
||||||
@@ -3771,10 +3771,10 @@ packages:
|
|||||||
}
|
}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/element-plus/2.2.25_vue@3.2.45:
|
/element-plus/2.2.26_vue@3.2.45:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-HC8CWY31e6pPyBpgqI0QnWkBgs0vRzdYnEw3mpdM/NlKfp0PtNFX7NESQLomqoIulH5ftL09hjQmJNvZBQpthQ==
|
integrity: sha512-O/rdY5m9DkclpVg8r3GynyqCunm7MxSR142xSsjrZA77bi7bcwA3SIy6SPEDqHi5R4KqgkGYgKSp4Q4e3irbYg==
|
||||||
}
|
}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "3.9.0",
|
"Version": "3.9.1",
|
||||||
"Title": "PureAdmin",
|
"Title": "PureAdmin",
|
||||||
"FixedHeader": true,
|
"FixedHeader": true,
|
||||||
"HiddenSideBar": false,
|
"HiddenSideBar": false,
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
"ShowLogo": true,
|
"ShowLogo": true,
|
||||||
"ShowModel": "smart",
|
"ShowModel": "smart",
|
||||||
"MenuArrowIconNoTransition": true,
|
"MenuArrowIconNoTransition": true,
|
||||||
|
"CachingAsyncRoutes": true,
|
||||||
|
"TooltipEffect": "light",
|
||||||
"MapConfigure": {
|
"MapConfigure": {
|
||||||
"amapKey": "97b3248d1553172e81f168cf94ea667e",
|
"amapKey": "97b3248d1553172e81f168cf94ea667e",
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ListItem } from "./data";
|
import { ListItem } from "./data";
|
||||||
import { ref, PropType, nextTick } from "vue";
|
import { ref, PropType, nextTick } from "vue";
|
||||||
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
noticeItem: {
|
noticeItem: {
|
||||||
@@ -13,6 +14,7 @@ const titleRef = ref(null);
|
|||||||
const titleTooltip = ref(false);
|
const titleTooltip = ref(false);
|
||||||
const descriptionRef = ref(null);
|
const descriptionRef = ref(null);
|
||||||
const descriptionTooltip = ref(false);
|
const descriptionTooltip = ref(false);
|
||||||
|
const { tooltipEffect } = useNav();
|
||||||
|
|
||||||
function hoverTitle() {
|
function hoverTitle() {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -57,6 +59,7 @@ function hoverDescription(event, description) {
|
|||||||
<div class="notice-text-title text-[#000000d9] dark:text-white">
|
<div class="notice-text-title text-[#000000d9] dark:text-white">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
popper-class="notice-title-popper"
|
popper-class="notice-title-popper"
|
||||||
|
:effect="tooltipEffect"
|
||||||
:disabled="!titleTooltip"
|
:disabled="!titleTooltip"
|
||||||
:content="props.noticeItem.title"
|
:content="props.noticeItem.title"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
@@ -81,6 +84,7 @@ function hoverDescription(event, description) {
|
|||||||
|
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
popper-class="notice-title-popper"
|
popper-class="notice-title-popper"
|
||||||
|
:effect="tooltipEffect"
|
||||||
:disabled="!descriptionTooltip"
|
:disabled="!descriptionTooltip"
|
||||||
:content="props.noticeItem.description"
|
:content="props.noticeItem.description"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import {
|
||||||
ref,
|
useDark,
|
||||||
unref,
|
debounce,
|
||||||
watch,
|
useGlobal,
|
||||||
reactive,
|
storageLocal,
|
||||||
computed,
|
storageSession
|
||||||
nextTick,
|
} from "@pureadmin/utils";
|
||||||
useCssModule
|
|
||||||
} from "vue";
|
|
||||||
import { getConfig } from "@/config";
|
import { getConfig } from "@/config";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import panel from "../panel/index.vue";
|
import panel from "../panel/index.vue";
|
||||||
@@ -17,16 +15,10 @@ import { removeToken } from "@/utils/auth";
|
|||||||
import { routerArrays } from "@/layout/types";
|
import { routerArrays } from "@/layout/types";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import { useAppStoreHook } from "@/store/modules/app";
|
import { useAppStoreHook } from "@/store/modules/app";
|
||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
|
||||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
|
||||||
import {
|
|
||||||
useDark,
|
|
||||||
debounce,
|
|
||||||
useGlobal,
|
|
||||||
storageLocal,
|
|
||||||
storageSession
|
|
||||||
} from "@pureadmin/utils";
|
|
||||||
import { toggleTheme } from "@pureadmin/theme/dist/browser-utils";
|
import { toggleTheme } from "@pureadmin/theme/dist/browser-utils";
|
||||||
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
|
import { ref, unref, watch, reactive, computed, nextTick } from "vue";
|
||||||
|
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";
|
||||||
@@ -34,9 +26,8 @@ import Check from "@iconify-icons/ep/check";
|
|||||||
import Logout from "@iconify-icons/ri/logout-circle-r-line";
|
import Logout from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { device } = useNav();
|
|
||||||
const { isDark } = useDark();
|
const { isDark } = useDark();
|
||||||
const { isSelect } = useCssModule();
|
const { device, tooltipEffect } = useNav();
|
||||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||||
|
|
||||||
const mixRef = ref();
|
const mixRef = ref();
|
||||||
@@ -161,30 +152,10 @@ function logoChange() {
|
|||||||
|
|
||||||
function setFalse(Doms): any {
|
function setFalse(Doms): any {
|
||||||
Doms.forEach(v => {
|
Doms.forEach(v => {
|
||||||
toggleClass(false, isSelect, unref(v));
|
toggleClass(false, "is-select", unref(v));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
watch($storage, ({ layout }) => {
|
|
||||||
switch (layout["layout"]) {
|
|
||||||
case "vertical":
|
|
||||||
toggleClass(true, isSelect, unref(verticalRef));
|
|
||||||
debounce(setFalse([horizontalRef]), 50);
|
|
||||||
debounce(setFalse([mixRef]), 50);
|
|
||||||
break;
|
|
||||||
case "horizontal":
|
|
||||||
toggleClass(true, isSelect, unref(horizontalRef));
|
|
||||||
debounce(setFalse([verticalRef]), 50);
|
|
||||||
debounce(setFalse([mixRef]), 50);
|
|
||||||
break;
|
|
||||||
case "mix":
|
|
||||||
toggleClass(true, isSelect, unref(mixRef));
|
|
||||||
debounce(setFalse([verticalRef]), 50);
|
|
||||||
debounce(setFalse([horizontalRef]), 50);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/** 主题色 激活选择项 */
|
/** 主题色 激活选择项 */
|
||||||
const getThemeColor = computed(() => {
|
const getThemeColor = computed(() => {
|
||||||
return current => {
|
return current => {
|
||||||
@@ -227,6 +198,26 @@ nextTick(() => {
|
|||||||
settings.tabsVal && tagsChange();
|
settings.tabsVal && tagsChange();
|
||||||
dataThemeChange();
|
dataThemeChange();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch($storage, ({ layout }) => {
|
||||||
|
switch (layout["layout"]) {
|
||||||
|
case "vertical":
|
||||||
|
toggleClass(true, "is-select", unref(verticalRef));
|
||||||
|
debounce(setFalse([horizontalRef]), 50);
|
||||||
|
debounce(setFalse([mixRef]), 50);
|
||||||
|
break;
|
||||||
|
case "horizontal":
|
||||||
|
toggleClass(true, "is-select", unref(horizontalRef));
|
||||||
|
debounce(setFalse([verticalRef]), 50);
|
||||||
|
debounce(setFalse([mixRef]), 50);
|
||||||
|
break;
|
||||||
|
case "mix":
|
||||||
|
toggleClass(true, "is-select", unref(mixRef));
|
||||||
|
debounce(setFalse([verticalRef]), 50);
|
||||||
|
debounce(setFalse([horizontalRef]), 50);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -243,9 +234,15 @@ nextTick(() => {
|
|||||||
|
|
||||||
<el-divider>导航栏模式</el-divider>
|
<el-divider>导航栏模式</el-divider>
|
||||||
<ul class="pure-theme">
|
<ul class="pure-theme">
|
||||||
<el-tooltip class="item" content="左侧模式" placement="bottom">
|
<el-tooltip
|
||||||
|
:effect="tooltipEffect"
|
||||||
|
class="item"
|
||||||
|
content="左侧模式"
|
||||||
|
placement="bottom"
|
||||||
|
popper-class="pure-tooltip"
|
||||||
|
>
|
||||||
<li
|
<li
|
||||||
:class="layoutTheme.layout === 'vertical' ? $style.isSelect : ''"
|
:class="layoutTheme.layout === 'vertical' ? 'is-select' : ''"
|
||||||
ref="verticalRef"
|
ref="verticalRef"
|
||||||
@click="setLayoutModel('vertical')"
|
@click="setLayoutModel('vertical')"
|
||||||
>
|
>
|
||||||
@@ -256,12 +253,14 @@ nextTick(() => {
|
|||||||
|
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="device !== 'mobile'"
|
v-if="device !== 'mobile'"
|
||||||
|
:effect="tooltipEffect"
|
||||||
class="item"
|
class="item"
|
||||||
content="顶部模式"
|
content="顶部模式"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
|
popper-class="pure-tooltip"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="layoutTheme.layout === 'horizontal' ? $style.isSelect : ''"
|
:class="layoutTheme.layout === 'horizontal' ? 'is-select' : ''"
|
||||||
ref="horizontalRef"
|
ref="horizontalRef"
|
||||||
@click="setLayoutModel('horizontal')"
|
@click="setLayoutModel('horizontal')"
|
||||||
>
|
>
|
||||||
@@ -272,12 +271,14 @@ nextTick(() => {
|
|||||||
|
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="device !== 'mobile'"
|
v-if="device !== 'mobile'"
|
||||||
|
:effect="tooltipEffect"
|
||||||
class="item"
|
class="item"
|
||||||
content="混合模式"
|
content="混合模式"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
|
popper-class="pure-tooltip"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="layoutTheme.layout === 'mix' ? $style.isSelect : ''"
|
:class="layoutTheme.layout === 'mix' ? 'is-select' : ''"
|
||||||
ref="mixRef"
|
ref="mixRef"
|
||||||
@click="setLayoutModel('mix')"
|
@click="setLayoutModel('mix')"
|
||||||
>
|
>
|
||||||
@@ -392,13 +393,16 @@ nextTick(() => {
|
|||||||
</panel>
|
</panel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped module>
|
<style lang="scss" scoped>
|
||||||
.isSelect {
|
:deep(.el-divider__text) {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-select {
|
||||||
border: 2px solid var(--el-color-primary);
|
border: 2px solid var(--el-color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.setting {
|
.setting {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@@ -410,11 +414,6 @@ nextTick(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-divider__text) {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pure-datatheme {
|
.pure-datatheme {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|||||||
@@ -97,8 +97,12 @@ watch(
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-breadcrumb class="!leading-[50px] select-none" separator="/">
|
<el-breadcrumb class="!leading-[50px] select-none" separator="/">
|
||||||
<transition-group appear name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="item in levelList" :key="item.path">
|
<el-breadcrumb-item
|
||||||
|
class="!inline !items-stretch"
|
||||||
|
v-for="item in levelList"
|
||||||
|
:key="item.path"
|
||||||
|
>
|
||||||
<a @click.prevent="handleLink(item)">
|
<a @click.prevent="handleLink(item)">
|
||||||
{{ transformI18n(item.meta.title) }}
|
{{ transformI18n(item.meta.title) }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useDark } from "@pureadmin/utils";
|
import { ref } from "vue";
|
||||||
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||||
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
||||||
|
|
||||||
@@ -10,7 +11,9 @@ interface Props {
|
|||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
isActive: false
|
isActive: false
|
||||||
});
|
});
|
||||||
const { isDark } = useDark();
|
|
||||||
|
const visible = ref(false);
|
||||||
|
const { tooltipEffect } = useNav();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "toggleClick"): void;
|
(e: "toggleClick"): void;
|
||||||
@@ -25,13 +28,16 @@ const toggleClick = () => {
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
placement="right"
|
placement="right"
|
||||||
:effect="isDark ? 'dark' : 'light'"
|
:visible="visible"
|
||||||
|
:effect="tooltipEffect"
|
||||||
:content="props.isActive ? '点击折叠' : '点击展开'"
|
:content="props.isActive ? '点击折叠' : '点击展开'"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
:icon="props.isActive ? MenuFold : MenuUnfold"
|
: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"
|
||||||
|
@mouseenter="visible = true"
|
||||||
|
@mouseleave="visible = false"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import EpArrowDown from "@iconify-icons/ep/arrow-down";
|
|||||||
import ArrowLeft from "@iconify-icons/ep/arrow-left";
|
import ArrowLeft from "@iconify-icons/ep/arrow-left";
|
||||||
import ArrowRight from "@iconify-icons/ep/arrow-right";
|
import ArrowRight from "@iconify-icons/ep/arrow-right";
|
||||||
|
|
||||||
const { layout, isCollapse } = useNav();
|
const { layout, isCollapse, tooltipEffect } = useNav();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
@@ -201,8 +201,9 @@ function resolvePath(routePath) {
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-else
|
v-else
|
||||||
placement="top"
|
placement="top"
|
||||||
|
:effect="tooltipEffect"
|
||||||
:offset="-10"
|
:offset="-10"
|
||||||
:disabled="!onlyOneChild.showTooltip"
|
:disabled="!isCollapse && !onlyOneChild.showTooltip"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ transformI18n(onlyOneChild.meta.title) }}
|
{{ transformI18n(onlyOneChild.meta.title) }}
|
||||||
@@ -246,8 +247,9 @@ function resolvePath(routePath) {
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-else
|
v-else
|
||||||
placement="top"
|
placement="top"
|
||||||
|
:effect="tooltipEffect"
|
||||||
:offset="-10"
|
:offset="-10"
|
||||||
:disabled="!isCollapse || !props.item.showTooltip"
|
:disabled="!props.item.showTooltip"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ transformI18n(props.item.meta.title) }}
|
{{ transformI18n(props.item.meta.title) }}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export function useNav() {
|
|||||||
const pureApp = useAppStoreHook();
|
const pureApp = useAppStoreHook();
|
||||||
const routers = useRouter().options.routes;
|
const routers = useRouter().options.routes;
|
||||||
const { wholeMenus } = storeToRefs(usePermissionStoreHook());
|
const { wholeMenus } = storeToRefs(usePermissionStoreHook());
|
||||||
|
/** 平台`layout`中所有`el-tooltip`的`effect`配置,默认`light` */
|
||||||
|
const tooltipEffect = getConfig()?.TooltipEffect ?? "light";
|
||||||
|
|
||||||
/** 用户名 */
|
/** 用户名 */
|
||||||
const username = computed(() => {
|
const username = computed(() => {
|
||||||
@@ -153,6 +155,7 @@ export function useNav() {
|
|||||||
pureApp,
|
pureApp,
|
||||||
username,
|
username,
|
||||||
avatarsStyle,
|
avatarsStyle,
|
||||||
|
tooltipEffect,
|
||||||
getDropdownItemStyle,
|
getDropdownItemStyle,
|
||||||
getDropdownItemClass
|
getDropdownItemClass
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import "animate.css";
|
import "animate.css";
|
||||||
|
// vxe-table的所有icon不支持component模式,间接依赖了font-awesome
|
||||||
|
import "font-awesome/css/font-awesome.min.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";
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import "./index.scss";
|
|||||||
import XEUtils from "xe-utils";
|
import XEUtils from "xe-utils";
|
||||||
import { App, unref } from "vue";
|
import { App, unref } from "vue";
|
||||||
import { i18n } from "@/plugins/i18n";
|
import { i18n } from "@/plugins/i18n";
|
||||||
import "font-awesome/css/font-awesome.min.css";
|
|
||||||
import zh from "vxe-table/lib/locale/lang/zh-CN";
|
import zh from "vxe-table/lib/locale/lang/zh-CN";
|
||||||
import en from "vxe-table/lib/locale/lang/en-US";
|
import en from "vxe-table/lib/locale/lang/en-US";
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以
|
|||||||
doc = 1,
|
doc = 1,
|
||||||
utils = 2,
|
utils = 2,
|
||||||
table = 3,
|
table = 3,
|
||||||
tree = 4,
|
components = 4,
|
||||||
components = 5,
|
able = 5,
|
||||||
able = 6,
|
frame = 6,
|
||||||
frame = 7,
|
nested = 7,
|
||||||
nested = 8,
|
result = 8,
|
||||||
result = 9,
|
error = 9,
|
||||||
error = 10,
|
list = 10,
|
||||||
list = 11,
|
permission = 11,
|
||||||
permission = 12,
|
system = 12,
|
||||||
system = 13,
|
menuoverflow = 13,
|
||||||
tabs = 14,
|
tabs = 14,
|
||||||
formdesign = 15,
|
formdesign = 15,
|
||||||
flowchart = 16,
|
flowchart = 16,
|
||||||
@@ -27,7 +27,6 @@ export {
|
|||||||
doc,
|
doc,
|
||||||
utils,
|
utils,
|
||||||
table,
|
table,
|
||||||
tree,
|
|
||||||
components,
|
components,
|
||||||
able,
|
able,
|
||||||
frame,
|
frame,
|
||||||
@@ -37,6 +36,7 @@ export {
|
|||||||
list,
|
list,
|
||||||
permission,
|
permission,
|
||||||
system,
|
system,
|
||||||
|
menuoverflow,
|
||||||
tabs,
|
tabs,
|
||||||
formdesign,
|
formdesign,
|
||||||
flowchart,
|
flowchart,
|
||||||
|
|||||||
22
src/router/modules/menuoverflow.ts
Normal file
22
src/router/modules/menuoverflow.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import { $t } from "@/plugins/i18n";
|
||||||
|
import { menuoverflow } from "@/router/enums";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
path: "/menuoverflow",
|
||||||
|
redirect: "/menuoverflow/index",
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.hsMenuoverflow"),
|
||||||
|
rank: menuoverflow
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/menuoverflow/index",
|
||||||
|
name: "MenuOverflow",
|
||||||
|
component: () => import("@/views/menuoverflow/index.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.hsChildMenuoverflow"),
|
||||||
|
showParent: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} as RouteConfigsTable;
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
|
||||||
import { tree } from "@/router/enums";
|
|
||||||
import hot from "@/assets/svg/hot.svg?component";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
path: "/tree",
|
|
||||||
redirect: "/tree/index",
|
|
||||||
meta: {
|
|
||||||
icon: hot,
|
|
||||||
title: $t("menus.hsTree"),
|
|
||||||
rank: tree
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: "/tree/index",
|
|
||||||
name: "Tree",
|
|
||||||
component: () => import("@/views/tree/index.vue"),
|
|
||||||
meta: {
|
|
||||||
title: $t("menus.hsTree")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} as RouteConfigsTable;
|
|
||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
storageSession,
|
storageSession,
|
||||||
isIncludeAllChildren
|
isIncludeAllChildren
|
||||||
} from "@pureadmin/utils";
|
} from "@pureadmin/utils";
|
||||||
|
import { getConfig } from "@/config";
|
||||||
import { buildHierarchyTree } from "@/utils/tree";
|
import { buildHierarchyTree } from "@/utils/tree";
|
||||||
import { cloneDeep, intersection } from "lodash-unified";
|
import { cloneDeep, intersection } from "lodash-unified";
|
||||||
import { sessionKey, type DataInfo } from "@/utils/auth";
|
import { sessionKey, type DataInfo } from "@/utils/auth";
|
||||||
@@ -151,42 +152,66 @@ function addPathMatch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化路由 */
|
/** 处理动态路由(后端返回的路由) */
|
||||||
function initRouter() {
|
function handleAsyncRoutes(routeList) {
|
||||||
return new Promise(resolve => {
|
if (routeList.length === 0) {
|
||||||
getAsyncRoutes().then(({ data }) => {
|
usePermissionStoreHook().handleWholeMenus(routeList);
|
||||||
if (data.length === 0) {
|
} else {
|
||||||
usePermissionStoreHook().handleWholeMenus(data);
|
formatFlatteningRoutes(addAsyncRoutes(routeList)).map(
|
||||||
resolve(router);
|
(v: RouteRecordRaw) => {
|
||||||
} else {
|
// 防止重复添加路由
|
||||||
formatFlatteningRoutes(addAsyncRoutes(data)).map(
|
if (
|
||||||
(v: RouteRecordRaw) => {
|
router.options.routes[0].children.findIndex(
|
||||||
// 防止重复添加路由
|
value => value.path === v.path
|
||||||
if (
|
) !== -1
|
||||||
router.options.routes[0].children.findIndex(
|
) {
|
||||||
value => value.path === v.path
|
return;
|
||||||
) !== -1
|
} else {
|
||||||
) {
|
// 切记将路由push到routes后还需要使用addRoute,这样路由才能正常跳转
|
||||||
return;
|
router.options.routes[0].children.push(v);
|
||||||
} else {
|
// 最终路由进行升序
|
||||||
// 切记将路由push到routes后还需要使用addRoute,这样路由才能正常跳转
|
ascending(router.options.routes[0].children);
|
||||||
router.options.routes[0].children.push(v);
|
if (!router.hasRoute(v?.name)) router.addRoute(v);
|
||||||
// 最终路由进行升序
|
const flattenRouters: any = router
|
||||||
ascending(router.options.routes[0].children);
|
.getRoutes()
|
||||||
if (!router.hasRoute(v?.name)) router.addRoute(v);
|
.find(n => n.path === "/");
|
||||||
const flattenRouters: any = router
|
router.addRoute(flattenRouters);
|
||||||
.getRoutes()
|
}
|
||||||
.find(n => n.path === "/");
|
|
||||||
router.addRoute(flattenRouters);
|
|
||||||
}
|
|
||||||
resolve(router);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
usePermissionStoreHook().handleWholeMenus(data);
|
|
||||||
}
|
}
|
||||||
addPathMatch();
|
);
|
||||||
|
usePermissionStoreHook().handleWholeMenus(routeList);
|
||||||
|
}
|
||||||
|
addPathMatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 初始化路由(`new Promise` 写法防止在异步请求中造成无限循环)*/
|
||||||
|
function initRouter() {
|
||||||
|
if (getConfig()?.CachingAsyncRoutes) {
|
||||||
|
// 开启动态路由缓存本地sessionStorage
|
||||||
|
const key = "async-routes";
|
||||||
|
const asyncRouteList = storageSession.getItem(key) as any;
|
||||||
|
if (asyncRouteList && asyncRouteList?.length > 0) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
handleAsyncRoutes(asyncRouteList);
|
||||||
|
resolve(router);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
getAsyncRoutes().then(({ data }) => {
|
||||||
|
handleAsyncRoutes(data);
|
||||||
|
storageSession.setItem(key, data);
|
||||||
|
resolve(router);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
getAsyncRoutes().then(({ data }) => {
|
||||||
|
handleAsyncRoutes(data);
|
||||||
|
resolve(router);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -46,6 +46,12 @@
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 自定义 tooltip 的类名 */
|
||||||
|
.pure-tooltip {
|
||||||
|
// 右侧操作面板right-panel类名的z-index为40000,tooltip需要大于它才能显示
|
||||||
|
z-index: 41000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* nprogress 适配 element-plus 的主题色 */
|
/* nprogress 适配 element-plus 的主题色 */
|
||||||
#nprogress {
|
#nprogress {
|
||||||
& .bar {
|
& .bar {
|
||||||
|
|||||||
@@ -26,9 +26,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* breadcrumb transition */
|
/* breadcrumb transition */
|
||||||
.breadcrumb-enter-active,
|
.breadcrumb-enter-active {
|
||||||
|
transition: all 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrumb-leave-active {
|
.breadcrumb-leave-active {
|
||||||
transition: all 0.5s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb-enter-from,
|
.breadcrumb-enter-from,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export function setToken(data: DataInfo<Date>) {
|
|||||||
/** 删除`token`以及key值为`user-info`的session信息 */
|
/** 删除`token`以及key值为`user-info`的session信息 */
|
||||||
export function removeToken() {
|
export function removeToken() {
|
||||||
Cookies.remove(TokenKey);
|
Cookies.remove(TokenKey);
|
||||||
sessionStorage.removeItem(sessionKey);
|
sessionStorage.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 格式化token(jwt格式) */
|
/** 格式化token(jwt格式) */
|
||||||
|
|||||||
@@ -21,9 +21,3 @@ const url = ref(`${VITE_PUBLIC_PATH}html/button.html`);
|
|||||||
<iframe :src="url" frameborder="0" class="iframe w-full h-[60vh]" />
|
<iframe :src="url" frameborder="0" class="iframe w-full h-[60vh]" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.iframe {
|
|
||||||
filter: invert(0.9) hue-rotate(180deg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
9
src/views/menuoverflow/index.vue
Normal file
9
src/views/menuoverflow/index.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
defineOptions({
|
||||||
|
name: "MenuOverflow"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>目录、菜单文字超出显示 Tooltip 文字提示</div>
|
||||||
|
</template>
|
||||||
@@ -33,6 +33,7 @@ function onChange() {
|
|||||||
.loginByUsername({ username: username.value, password: "admin123" })
|
.loginByUsername({ username: username.value, password: "admin123" })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
sessionStorage.removeItem("async-routes");
|
||||||
usePermissionStoreHook().clearAllCachePage();
|
usePermissionStoreHook().clearAllCachePage();
|
||||||
initRouter();
|
initRouter();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
<script setup lang="ts"></script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>即将发布</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
4
types/global.d.ts
vendored
4
types/global.d.ts
vendored
@@ -4,9 +4,7 @@ import type {
|
|||||||
PropType as VuePropType,
|
PropType as VuePropType,
|
||||||
ComponentPublicInstance
|
ComponentPublicInstance
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import type { ECharts } from "echarts";
|
|
||||||
import type { IconifyIcon } from "@iconify/vue";
|
import type { IconifyIcon } from "@iconify/vue";
|
||||||
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";
|
||||||
|
|
||||||
@@ -95,6 +93,8 @@ declare global {
|
|||||||
ShowLogo?: boolean;
|
ShowLogo?: boolean;
|
||||||
ShowModel?: string;
|
ShowModel?: string;
|
||||||
MenuArrowIconNoTransition?: boolean;
|
MenuArrowIconNoTransition?: boolean;
|
||||||
|
CachingAsyncRoutes?: boolean;
|
||||||
|
TooltipEffect?: Effect;
|
||||||
MapConfigure?: {
|
MapConfigure?: {
|
||||||
amapKey?: string;
|
amapKey?: string;
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
2
types/index.d.ts
vendored
2
types/index.d.ts
vendored
@@ -45,6 +45,8 @@ type TimeoutHandle = ReturnType<typeof setTimeout>;
|
|||||||
|
|
||||||
type IntervalHandle = ReturnType<typeof setInterval>;
|
type IntervalHandle = ReturnType<typeof setInterval>;
|
||||||
|
|
||||||
|
type Effect = "light" | "dark";
|
||||||
|
|
||||||
interface ChangeEvent extends Event {
|
interface ChangeEvent extends Event {
|
||||||
target: HTMLInputElement;
|
target: HTMLInputElement;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user