mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-08-11 10:34:45 +08:00
Merge branch 'main' into pages
This commit is contained in:
commit
51e9dfc717
@ -31,7 +31,7 @@
|
||||
|
||||
### ✔️Refactor
|
||||
|
||||
- Upgrade `vite` to `v6` version, upgrade `sass` to the latest version, reconstruct the theme writing method, and deprecate [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme) , click to view [Related optimization point details](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115). For users who have the [Max version](https://pure-admin.cn/pages/max/), it is strongly recommended to upgrade. Subsequent Max version users will enjoy a more modern, beautiful and highly customized theme color
|
||||
- Upgrade `vite` to `v6` version, upgrade `sass` to the latest version, reconstruct the theme writing method, and deprecate [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme) , click to view [Related optimization point details](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115). For users who have the [Max version](https://pure-admin.cn/pages/service/#max-%E7%89%88%E6%9C%AC), it is strongly recommended to upgrade. Subsequent Max version users will enjoy a more modern, beautiful and highly customized theme color
|
||||
- Use [code-inspector-plugin](https://www.npmjs.com/package/code-inspector-plugin) to replace [vite-plugin-vue-inspector](https://www.npmjs.com/package/vite-plugin-vue-inspector)
|
||||
|
||||
### 🎫Feat
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
### ✔️Refactor
|
||||
|
||||
- Upgrade `vite` to `v6` version, upgrade `sass` to the latest version, reconstruct the theme writing method, and deprecate [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme) , click to view [Related optimization point details](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115). For users who have the [Max version](https://pure-admin.cn/pages/max/), it is strongly recommended to upgrade. Subsequent Max version users will enjoy a more modern, beautiful and highly customized theme color
|
||||
- Upgrade `vite` to `v6` version, upgrade `sass` to the latest version, reconstruct the theme writing method, and deprecate [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme) , click to view [Related optimization point details](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115). For users who have the [Max version](https://pure-admin.cn/pages/service/#max-%E7%89%88%E6%9C%AC), it is strongly recommended to upgrade. Subsequent Max version users will enjoy a more modern, beautiful and highly customized theme color
|
||||
- Use [code-inspector-plugin](https://www.npmjs.com/package/code-inspector-plugin) to replace [vite-plugin-vue-inspector](https://www.npmjs.com/package/vite-plugin-vue-inspector)
|
||||
|
||||
### 🎫Feat
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- 升级`vite`至`v6`版本,升级`sass`至最新版,重构主题写法,弃用 [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme),点击查看 [相关优化点细节](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115)。对于拥有 [Max版本](https://pure-admin.cn/pages/max/) 的用户平台强烈建议升级,后续`Max版本用户`会享有一套更现代、美观且自定义程度高的主题色
|
||||
- 升级`vite`至`v6`版本,升级`sass`至最新版,重构主题写法,弃用 [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme),点击查看 [相关优化点细节](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115)。对于拥有 [Max版本](https://pure-admin.cn/pages/service/#max-%E7%89%88%E6%9C%AC) 的用户平台强烈建议升级,后续`Max版本用户`会享有一套更现代、美观且自定义程度高的主题色
|
||||
- 使用 [code-inspector-plugin](https://www.npmjs.com/package/code-inspector-plugin) 替换 [vite-plugin-vue-inspector](https://www.npmjs.com/package/vite-plugin-vue-inspector)
|
||||
|
||||
### 🎫 Feat
|
||||
|
@ -31,18 +31,10 @@ The simplified version is based on the shelf extracted from [vue-pure-admin](htt
|
||||
[Click me to view vue-pure-admin documentation](https://pure-admin.cn/)
|
||||
[Click me to view @pureadmin/utils documentation](https://pure-admin-utils.netlify.app)
|
||||
|
||||
## Quality service, software outsourcing, sponsorship support
|
||||
## Premium service
|
||||
|
||||
[Click me for details](https://pure-admin.cn/pages/service/)
|
||||
|
||||
## `js` version
|
||||
|
||||
[Click me to view js version](https://pure-admin.cn/pages/js/)
|
||||
|
||||
## `max` version
|
||||
|
||||
[Click me to view the max version](https://pure-admin.cn/pages/max/)
|
||||
|
||||
## Tauri
|
||||
|
||||
[Click Watch Tauri](https://github.com/pure-admin/tauri-pure-admin)
|
||||
@ -192,6 +184,7 @@ Thank you very much for your in-depth understanding of the source code and your
|
||||
| [edgexie](https://github.com/edgexie) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=edgexie) |
|
||||
| [way-jm](https://github.com/way-jm) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=way-jm) |
|
||||
| [simple-hui](https://github.com/simple-hui) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=simple-hui) |
|
||||
| [tinysimple](https://github.com/tinysimple) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=tinysimple) |
|
||||
|
||||
## Git Contribution submission specification
|
||||
|
||||
|
11
README.md
11
README.md
@ -32,18 +32,10 @@
|
||||
[点我查看 vue-pure-admin 文档](https://pure-admin.cn/)
|
||||
[点我查看 @pureadmin/utils 文档](https://pure-admin-utils.netlify.app)
|
||||
|
||||
## 优质服务、软件外包、赞助支持
|
||||
## 高级服务
|
||||
|
||||
[点我查看详情](https://pure-admin.cn/pages/service/)
|
||||
|
||||
## `js` 版本
|
||||
|
||||
[点我查看 js 版本](https://pure-admin.cn/pages/js/)
|
||||
|
||||
## `max` 版本
|
||||
|
||||
[点我查看 max 版本](https://pure-admin.cn/pages/max/)
|
||||
|
||||
## `Tauri` 版本
|
||||
|
||||
[点我查看 Tauri 版本](https://github.com/pure-admin/tauri-pure-admin)
|
||||
@ -193,6 +185,7 @@ docker run -dp 8080:80 --name pure-admin vue-pure-admin
|
||||
| [edgexie](https://github.com/edgexie) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=edgexie) |
|
||||
| [way-jm](https://github.com/way-jm) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=way-jm) |
|
||||
| [simple-hui](https://github.com/simple-hui) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=simple-hui) |
|
||||
| [tinysimple](https://github.com/tinysimple) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=tinysimple) |
|
||||
|
||||
## `Git` 贡献提交规范
|
||||
|
||||
|
118
package.json
118
package.json
@ -48,134 +48,134 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@howdyjs/mouse-menu": "^2.1.6",
|
||||
"@howdyjs/mouse-menu": "^2.1.7",
|
||||
"@infectoone/vue-ganttastic": "^2.3.2",
|
||||
"@logicflow/core": "^1.2.28",
|
||||
"@logicflow/extension": "^1.2.28",
|
||||
"@pureadmin/descriptions": "^1.2.1",
|
||||
"@pureadmin/table": "^3.2.1",
|
||||
"@pureadmin/utils": "^2.6.0",
|
||||
"@pureadmin/utils": "^2.6.2",
|
||||
"@vue-flow/background": "^1.3.2",
|
||||
"@vue-flow/core": "^1.42.5",
|
||||
"@vueuse/core": "^13.1.0",
|
||||
"@vue-flow/core": "^1.45.0",
|
||||
"@vueuse/core": "^13.5.0",
|
||||
"@vueuse/motion": "^3.0.3",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.8.4",
|
||||
"axios": "^1.11.0",
|
||||
"china-area-data": "^5.0.1",
|
||||
"codemirror": "^5.65.19",
|
||||
"codemirror-editor-vue3": "^2.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"dayjs": "^1.11.13",
|
||||
"deep-chat": "^2.1.1",
|
||||
"deep-chat": "^2.2.2",
|
||||
"echarts": "^5.6.0",
|
||||
"el-table-infinite-scroll": "^3.0.6",
|
||||
"element-plus": "^2.9.7",
|
||||
"element-plus": "^2.10.4",
|
||||
"highlight.js": "^11.11.1",
|
||||
"intro.js": "^7.2.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jsbarcode": "^3.11.6",
|
||||
"jsbarcode": "^3.12.1",
|
||||
"localforage": "^1.10.0",
|
||||
"mint-filter": "^4.0.3",
|
||||
"mitt": "^3.0.1",
|
||||
"mqtt": "4.3.7",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pinia": "^3.0.2",
|
||||
"pinia": "^3.0.3",
|
||||
"pinyin-pro": "^3.26.0",
|
||||
"plus-pro-components": "^0.1.22",
|
||||
"plus-pro-components": "^0.1.26",
|
||||
"qrcode": "^1.5.4",
|
||||
"qs": "^6.14.0",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.6",
|
||||
"swiper": "^11.2.6",
|
||||
"swiper": "^11.2.10",
|
||||
"typeit": "^8.8.7",
|
||||
"v-contextmenu": "^3.2.0",
|
||||
"v3-infinite-loading": "^1.3.2",
|
||||
"vditor": "^3.11.0",
|
||||
"vditor": "^3.11.1",
|
||||
"version-rocket": "^1.7.4",
|
||||
"vue": "^3.5.13",
|
||||
"vue-i18n": "^11.1.3",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-pdf-embed": "^2.1.2",
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-tippy": "^6.7.0",
|
||||
"vue": "^3.5.18",
|
||||
"vue-i18n": "^11.1.11",
|
||||
"vue-json-pretty": "^2.5.0",
|
||||
"vue-pdf-embed": "^2.1.3",
|
||||
"vue-router": "^4.5.1",
|
||||
"vue-tippy": "^6.7.1",
|
||||
"vue-types": "^6.0.0",
|
||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||
"vue-waterfall-plugin-next": "^2.6.5",
|
||||
"vue3-danmaku": "^1.6.1",
|
||||
"vue-waterfall-plugin-next": "^2.6.7",
|
||||
"vue3-danmaku": "^1.6.6",
|
||||
"vue3-puzzle-vcode": "^1.1.7",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "4.6.25",
|
||||
"wavesurfer.js": "^7.9.4",
|
||||
"xgplayer": "^3.0.21",
|
||||
"wavesurfer.js": "^7.10.1",
|
||||
"xgplayer": "^3.0.22",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.8.0",
|
||||
"@commitlint/config-conventional": "^19.8.0",
|
||||
"@commitlint/types": "^19.8.0",
|
||||
"@eslint/js": "^9.24.0",
|
||||
"@faker-js/faker": "^9.7.0",
|
||||
"@iconify/json": "^2.2.329",
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@commitlint/types": "^19.8.1",
|
||||
"@eslint/js": "^9.31.0",
|
||||
"@faker-js/faker": "^9.9.0",
|
||||
"@iconify/json": "^2.2.362",
|
||||
"@iconify/vue": "4.2.0",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.5",
|
||||
"@tailwindcss/vite": "^4.1.4",
|
||||
"@types/codemirror": "^5.60.15",
|
||||
"@types/dagre": "^0.7.52",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"@types/codemirror": "^5.60.16",
|
||||
"@types/dagre": "^0.7.53",
|
||||
"@types/intro.js": "^5.1.5",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^20.17.30",
|
||||
"@types/node": "^20.19.9",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qs": "^6.9.18",
|
||||
"@types/qs": "^6.14.0",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "^5.0.1",
|
||||
"boxen": "^8.0.1",
|
||||
"code-inspector-plugin": "^0.20.9",
|
||||
"cssnano": "^7.0.6",
|
||||
"code-inspector-plugin": "^0.20.17",
|
||||
"cssnano": "^7.1.0",
|
||||
"dagre": "^0.8.5",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-prettier": "^10.1.2",
|
||||
"eslint-plugin-prettier": "^5.2.6",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"eslint": "^9.31.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.3",
|
||||
"eslint-plugin-vue": "^10.3.0",
|
||||
"gradient-string": "^3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.5.1",
|
||||
"postcss": "^8.5.3",
|
||||
"lint-staged": "^16.1.2",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-html": "^1.8.0",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier": "^3.6.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"rollup-plugin-visualizer": "^5.14.0",
|
||||
"sass": "^1.86.3",
|
||||
"stylelint": "^16.18.0",
|
||||
"stylelint-config-recess-order": "^6.0.0",
|
||||
"stylelint-config-recommended-vue": "^1.6.0",
|
||||
"rollup-plugin-visualizer": "^6.0.3",
|
||||
"sass": "^1.89.2",
|
||||
"stylelint": "^16.22.0",
|
||||
"stylelint-config-recess-order": "^7.1.0",
|
||||
"stylelint-config-recommended-vue": "^1.6.1",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"svgo": "^3.3.2",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"svgo": "^4.0.0",
|
||||
"tailwindcss": "^4.1.11",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.30.1",
|
||||
"typescript-eslint": "^8.38.0",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"vite": "^6.3.2",
|
||||
"vite": "^7.0.5",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-tsc": "^2.2.8"
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^3.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=22.0.0",
|
||||
"node": "^20.19.0 || >=22.12.0",
|
||||
"pnpm": ">=9"
|
||||
},
|
||||
"pnpm": {
|
||||
@ -200,6 +200,10 @@
|
||||
"esbuild",
|
||||
"typeit",
|
||||
"vue-demi"
|
||||
],
|
||||
"ignoredBuiltDependencies": [
|
||||
"@tailwindcss/oxide",
|
||||
"vue3-danmaku"
|
||||
]
|
||||
}
|
||||
}
|
4351
pnpm-lock.yaml
generated
4351
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -23,9 +23,9 @@
|
||||
function h() {
|
||||
n || ((n = !0), o());
|
||||
}
|
||||
(t = function () {
|
||||
((t = function () {
|
||||
var c, t, e, o;
|
||||
((o = document.createElement("div")).innerHTML = i),
|
||||
(((o = document.createElement("div")).innerHTML = i),
|
||||
(i = null),
|
||||
(e = o.getElementsByTagName("svg")[0]) &&
|
||||
((e.style.position = "absolute"),
|
||||
@ -35,13 +35,13 @@
|
||||
(c = e),
|
||||
(t = document.body).firstChild
|
||||
? ((o = c), (e = t.firstChild).parentNode.insertBefore(o, e))
|
||||
: t.appendChild(c));
|
||||
: t.appendChild(c)));
|
||||
}),
|
||||
document.addEventListener
|
||||
? ~["complete", "loaded", "interactive"].indexOf(document.readyState)
|
||||
? setTimeout(t, 0)
|
||||
: ((e = function () {
|
||||
document.removeEventListener("DOMContentLoaded", e, !1), t();
|
||||
(document.removeEventListener("DOMContentLoaded", e, !1), t());
|
||||
}),
|
||||
document.addEventListener("DOMContentLoaded", e, !1))
|
||||
: document.attachEvent &&
|
||||
@ -58,5 +58,5 @@
|
||||
})(),
|
||||
(a.onreadystatechange = function () {
|
||||
"complete" == a.readyState && ((a.onreadystatechange = null), h());
|
||||
}));
|
||||
})));
|
||||
})(window);
|
||||
|
@ -33,10 +33,10 @@
|
||||
}
|
||||
l();
|
||||
}
|
||||
(t = function () {
|
||||
((t = function () {
|
||||
var e,
|
||||
t = document.createElement("div");
|
||||
(t.innerHTML = i),
|
||||
((t.innerHTML = i),
|
||||
(i = null),
|
||||
(t = t.getElementsByTagName("svg")[0]) &&
|
||||
((t.style.position = "absolute"),
|
||||
@ -44,13 +44,15 @@
|
||||
(t.style.height = 0),
|
||||
(t.style.overflow = "hidden"),
|
||||
(t = t),
|
||||
(e = document.body).firstChild ? m(t, e.firstChild) : e.appendChild(t));
|
||||
(e = document.body).firstChild
|
||||
? m(t, e.firstChild)
|
||||
: e.appendChild(t)));
|
||||
}),
|
||||
document.addEventListener
|
||||
? ~["complete", "loaded", "interactive"].indexOf(document.readyState)
|
||||
? setTimeout(t, 0)
|
||||
: ((n = function () {
|
||||
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
||||
(document.removeEventListener("DOMContentLoaded", n, !1), t());
|
||||
}),
|
||||
document.addEventListener("DOMContentLoaded", n, !1))
|
||||
: document.attachEvent &&
|
||||
@ -60,5 +62,5 @@
|
||||
a(),
|
||||
(o.onreadystatechange = function () {
|
||||
"complete" == o.readyState && ((o.onreadystatechange = null), l());
|
||||
}));
|
||||
})));
|
||||
})(window);
|
||||
|
@ -13,10 +13,10 @@ $ripple-animation-visible-opacity: 0.25 !default;
|
||||
z-index: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
contain: strict;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
border-radius: inherit;
|
||||
contain: strict;
|
||||
}
|
||||
|
||||
&__animation {
|
||||
|
@ -10,7 +10,7 @@ const TITLE = getConfig("Title");
|
||||
>
|
||||
Copyright © 2020-2025
|
||||
<a
|
||||
class="hover:text-primary"
|
||||
class="hover:text-primary!"
|
||||
href="https://github.com/pure-admin"
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -6,8 +6,8 @@ import { useRouter } from "vue-router";
|
||||
import SearchResult from "./SearchResult.vue";
|
||||
import SearchFooter from "./SearchFooter.vue";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import SearchHistory from "./SearchHistory.vue";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import type { optionsItem, dragItem } from "../types";
|
||||
import { ref, computed, shallowRef, watch } from "vue";
|
||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||
|
@ -254,7 +254,7 @@ function deleteDynamicTag(obj: any, current: any, tag?: string) {
|
||||
if (tag === "other") {
|
||||
spliceRoute(1, 1, true);
|
||||
} else if (tag === "left") {
|
||||
spliceRoute(fixedTags.length, valueIndex - 1, true);
|
||||
spliceRoute(fixedTags.length, valueIndex - fixedTags.length);
|
||||
} else if (tag === "right") {
|
||||
spliceRoute(valueIndex + 1, multiTags.value.length);
|
||||
} else {
|
||||
|
@ -7,7 +7,13 @@ import { buildHierarchyTree } from "@/utils/tree";
|
||||
import remainingRouter from "./modules/remaining";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import { isUrl, openLink, storageLocal, isAllEmpty } from "@pureadmin/utils";
|
||||
import {
|
||||
isUrl,
|
||||
openLink,
|
||||
cloneDeep,
|
||||
isAllEmpty,
|
||||
storageLocal
|
||||
} from "@pureadmin/utils";
|
||||
import {
|
||||
ascending,
|
||||
getTopMenu,
|
||||
@ -21,9 +27,9 @@ import {
|
||||
} from "./utils";
|
||||
import {
|
||||
type Router,
|
||||
createRouter,
|
||||
type RouteRecordRaw,
|
||||
type RouteComponent
|
||||
type RouteComponent,
|
||||
createRouter
|
||||
} from "vue-router";
|
||||
import {
|
||||
type DataInfo,
|
||||
@ -55,6 +61,9 @@ export const constantRoutes: Array<RouteRecordRaw> = formatTwoStageRoutes(
|
||||
formatFlatteningRoutes(buildHierarchyTree(ascending(routes.flat(Infinity))))
|
||||
);
|
||||
|
||||
/** 初始的静态路由,用于退出登录时重置路由 */
|
||||
const initConstantRoutes: Array<RouteRecordRaw> = cloneDeep(constantRoutes);
|
||||
|
||||
/** 用于渲染菜单,保持原始层级 */
|
||||
export const constantMenus: Array<RouteComponent> = ascending(
|
||||
routes.flat(Infinity)
|
||||
@ -87,17 +96,13 @@ export const router: Router = createRouter({
|
||||
|
||||
/** 重置路由 */
|
||||
export function resetRouter() {
|
||||
router.getRoutes().forEach(route => {
|
||||
const { name, meta } = route;
|
||||
if (name && router.hasRoute(name) && meta?.backstage) {
|
||||
router.removeRoute(name);
|
||||
router.options.routes = formatTwoStageRoutes(
|
||||
formatFlatteningRoutes(
|
||||
buildHierarchyTree(ascending(routes.flat(Infinity)))
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
router.clearRoutes();
|
||||
for (const route of initConstantRoutes.concat(...(remainingRouter as any))) {
|
||||
router.addRoute(route);
|
||||
}
|
||||
router.options.routes = formatTwoStageRoutes(
|
||||
formatFlatteningRoutes(buildHierarchyTree(ascending(routes.flat(Infinity))))
|
||||
);
|
||||
usePermissionStoreHook().clearAllCachePage();
|
||||
}
|
||||
|
||||
|
@ -172,6 +172,8 @@ function handleAsyncRoutes(routeList) {
|
||||
const flattenRouters: any = router
|
||||
.getRoutes()
|
||||
.find(n => n.path === "/");
|
||||
// 保持router.options.routes[0].children与path为"/"的children一致,防止数据不一致导致异常
|
||||
flattenRouters.children = router.options.routes[0].children;
|
||||
router.addRoute(flattenRouters);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ type messageTypes = "info" | "success" | "warning" | "error";
|
||||
interface MessageParams {
|
||||
/** 消息类型,可选 `info` 、`success` 、`warning` 、`error` ,默认 `info` */
|
||||
type?: messageTypes;
|
||||
/** 是否纯色,默认 `false` */
|
||||
plain?: boolean;
|
||||
/** 自定义图标,该属性会覆盖 `type` 的图标 */
|
||||
icon?: any;
|
||||
/** 是否将 `message` 属性作为 `HTML` 片段处理,默认 `false` */
|
||||
@ -18,14 +20,14 @@ interface MessageParams {
|
||||
duration?: number;
|
||||
/** 是否显示关闭按钮,默认值 `false` */
|
||||
showClose?: boolean;
|
||||
/** 文字是否居中,默认值 `false` */
|
||||
center?: boolean;
|
||||
/** `Message` 距离窗口顶部的偏移量,默认 `20` */
|
||||
/** `Message` 距离窗口顶部的偏移量,默认 `16` */
|
||||
offset?: number;
|
||||
/** 设置组件的根元素,默认 `document.body` */
|
||||
appendTo?: string | HTMLElement;
|
||||
/** 合并内容相同的消息,不支持 `VNode` 类型的消息,默认值 `false` */
|
||||
grouping?: boolean;
|
||||
/** 重复次数,类似于 `Badge` 。当和 `grouping` 属性一起使用时作为初始数量使用,默认值 `1` */
|
||||
repeatNum?: number;
|
||||
/** 关闭时的回调函数, 参数为被关闭的 `message` 实例 */
|
||||
onClose?: Function | null;
|
||||
}
|
||||
@ -48,28 +50,30 @@ const message = (
|
||||
const {
|
||||
icon,
|
||||
type = "info",
|
||||
plain = false,
|
||||
dangerouslyUseHTMLString = false,
|
||||
customClass = "antd",
|
||||
duration = 2000,
|
||||
showClose = false,
|
||||
center = false,
|
||||
offset = 20,
|
||||
offset = 16,
|
||||
appendTo = document.body,
|
||||
grouping = false,
|
||||
repeatNum = 1,
|
||||
onClose
|
||||
} = params;
|
||||
|
||||
return ElMessage({
|
||||
message,
|
||||
type,
|
||||
icon,
|
||||
type,
|
||||
plain,
|
||||
dangerouslyUseHTMLString,
|
||||
duration,
|
||||
showClose,
|
||||
center,
|
||||
offset,
|
||||
appendTo,
|
||||
grouping,
|
||||
repeatNum,
|
||||
// 全局搜 pure-message 即可知道该类的样式位置
|
||||
customClass: customClass === "antd" ? "pure-message" : "",
|
||||
onClose: () => (isFunction(onClose) ? onClose() : null)
|
||||
|
@ -194,7 +194,7 @@ onUnmounted(() => {
|
||||
基于
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
underline="never"
|
||||
href="https://github.com/mqttjs/MQTT.js"
|
||||
target="_blank"
|
||||
>
|
||||
@ -203,7 +203,7 @@ onUnmounted(() => {
|
||||
和 免费的公共MQTT代理
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
underline="never"
|
||||
href="broker.emqx.io"
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -74,15 +74,17 @@ getMine().then(res => {
|
||||
:width="deviceDetection() ? '180px' : '240px'"
|
||||
>
|
||||
<el-menu :default-active="witchPane" class="pure-account-settings-menu">
|
||||
<el-menu-item
|
||||
class="hover:transition-all! hover:duration-200! hover:text-base! h-[50px]!"
|
||||
<div
|
||||
class="h-[50px]! text-[var(--pure-theme-menu-text)] cursor-pointer text-sm transition-all duration-300 ease-in-out hover:scale-105 will-change-transform transform-gpu origin-center hover:text-base! hover:text-[var(--pure-theme-menu-title-hover)]!"
|
||||
@click="router.go(-1)"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<div
|
||||
class="h-full flex items-center px-[var(--el-menu-base-level-padding)]"
|
||||
>
|
||||
<IconifyIconOffline :icon="leftLine" />
|
||||
<span class="ml-2">返回</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
</div>
|
||||
<div class="flex items-center ml-8 mt-4 mb-4">
|
||||
<el-avatar :size="48" :src="userInfo.avatar" />
|
||||
<div class="ml-4 flex flex-col max-w-[130px]">
|
||||
|
@ -4,7 +4,7 @@ import intro from "intro.js";
|
||||
import "intro.js/minified/introjs.min.css";
|
||||
|
||||
type GuideStep = {
|
||||
element: string | HTMLElement;
|
||||
element: HTMLElement;
|
||||
title: string;
|
||||
intro: string;
|
||||
position: "left" | "right" | "top" | "bottom";
|
||||
@ -16,47 +16,43 @@ defineOptions({
|
||||
|
||||
const GUIDE_STEPS = [
|
||||
{
|
||||
element: document.querySelector(".sidebar-logo-container") as
|
||||
| string
|
||||
| HTMLElement,
|
||||
element: document.querySelector(".sidebar-logo-container"),
|
||||
title: "项目名称和Logo",
|
||||
intro: "您可以在这里设置项目名称和Logo",
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: document.querySelector("#header-search") as string | HTMLElement,
|
||||
element: document.querySelector("#header-search"),
|
||||
title: "搜索菜单",
|
||||
intro: "您可以在这里搜索想要查看的菜单",
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: document.querySelector("#header-translation") as
|
||||
| string
|
||||
| HTMLElement,
|
||||
element: document.querySelector("#header-translation"),
|
||||
title: "国际化",
|
||||
intro: "您可以在这里进行语言切换",
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: document.querySelector("#full-screen") as string | HTMLElement,
|
||||
element: document.querySelector("#full-screen"),
|
||||
title: "全屏",
|
||||
intro: "您可以在这里进行全屏切换",
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: document.querySelector("#header-notice") as string | HTMLElement,
|
||||
element: document.querySelector("#header-notice"),
|
||||
title: "消息通知",
|
||||
intro: "您可以在这里查看管理员发送的消息",
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: document.querySelector(".set-icon") as string | HTMLElement,
|
||||
element: document.querySelector(".set-icon"),
|
||||
title: "系统配置",
|
||||
intro: "您可以在这里查看系统配置",
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: document.querySelector(".tags-view") as string | HTMLElement,
|
||||
element: document.querySelector(".tags-view"),
|
||||
title: "多标签页",
|
||||
intro: "这里是您访问过的页面的历史",
|
||||
position: "bottom"
|
||||
|
@ -340,7 +340,7 @@ watch(loginDay, value => {
|
||||
>
|
||||
Copyright © 2020-2025
|
||||
<a
|
||||
class="hover:text-primary"
|
||||
class="hover:text-primary!"
|
||||
href="https://github.com/pure-admin"
|
||||
target="_blank"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user