mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f13faf0788 | ||
|
|
8e2b174e09 | ||
|
|
b5839d6398 | ||
|
|
b14f41c8d7 | ||
|
|
9ab3fd19ef | ||
|
|
fa5c97ffa4 | ||
|
|
b4a566b2bf | ||
|
|
c84c447f3e | ||
|
|
53c715873c | ||
|
|
c80818d792 | ||
|
|
17936d476c | ||
|
|
1ef6ce70db | ||
|
|
d5d7dd8e57 | ||
|
|
1a39d0962e | ||
|
|
86b77c2877 | ||
|
|
cf8e5897fb | ||
|
|
f1e6ddff18 | ||
|
|
059a704f53 | ||
|
|
4c29bcc49a | ||
|
|
47960bbaf9 | ||
|
|
b2ec77275d |
@@ -1,3 +1,41 @@
|
|||||||
|
# 3.9.3 (2022-12-04)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- Add `@pureadmin/table` pagination and loading animation example
|
||||||
|
|
||||||
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- Fixed the problem that the refresh page would be blank due to changes in dynamic routes stored in local storage after enabling `CachingAsyncRoutes`
|
||||||
|
- Fixed `Tooltip` displayed abnormally after the menu is collapsed
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Expand the use of local icons, the first launch of the full version reduces `13` requests again
|
||||||
|
- When the menu loading is slow, add `loading` animation to optimize user experience
|
||||||
|
- Theme initialization is placed in `onBeforeMount` to avoid flashing of the initialization page
|
||||||
|
|
||||||
|
# 3.9.2 (2022-12-03)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Global coverage of `el-dialog`, `el-drawer`, `el-message-box`, `el-notification` components of `element-plus`The style of the close icon in the upper right corner makes it more vivid [specific modification Code record](https://github.com/xiaoxian521/vue-pure-admin/commit/c80818d792276666aaea4b18413a0f08777f2ed1)
|
||||||
|
- The packaging output information is compatible with different packaging output paths
|
||||||
|
- Optimize some animations
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
38
CHANGELOG.md
38
CHANGELOG.md
@@ -1,3 +1,41 @@
|
|||||||
|
# 3.9.3 (2022-12-04)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- Add `@pureadmin/table` pagination and loading animation example
|
||||||
|
|
||||||
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- Fixed the problem that the refresh page would be blank due to changes in dynamic routes stored in local storage after enabling `CachingAsyncRoutes`
|
||||||
|
- Fixed `Tooltip` displayed abnormally after the menu is collapsed
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Expand the use of local icons, the first launch of the full version reduces `13` requests again
|
||||||
|
- When the menu loading is slow, add `loading` animation to optimize user experience
|
||||||
|
- Theme initialization is placed in `onBeforeMount` to avoid flashing of the initialization page
|
||||||
|
|
||||||
|
# 3.9.2 (2022-12-03)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Global coverage of `el-dialog`, `el-drawer`, `el-message-box`, `el-notification` components of `element-plus`The style of the close icon in the upper right corner makes it more vivid [specific modification Code record](https://github.com/xiaoxian521/vue-pure-admin/commit/c80818d792276666aaea4b18413a0f08777f2ed1)
|
||||||
|
- The packaging output information is compatible with different packaging output paths
|
||||||
|
- Optimize some animations
|
||||||
|
|
||||||
|
# 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,41 @@
|
|||||||
|
# 3.9.3 (2022-12-04)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- 添加 `@pureadmin/table` 分页和加载动画示例
|
||||||
|
|
||||||
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- 修复开启 `CachingAsyncRoutes` 后,存入本地存储的动态路由改变造成刷新页面空白的问题
|
||||||
|
- 修复菜单折叠后 `Tooltip` 显示异常
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- 扩展本地图标使用方式,完整版首启动再次减少 `13` 个请求
|
||||||
|
- 当菜单加载慢时,添加 `loading` 动画,优化用户体验
|
||||||
|
- 主题初始化放在 `onBeforeMount` 里,避免初始化页面闪烁
|
||||||
|
|
||||||
|
# 3.9.2 (2022-12-03)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- 全局覆盖 `element-plus` 的 `el-dialog`、`el-drawer`、`el-message-box`、`el-notification` 组件右上角关闭图标的样式,使其表现更鲜明 [具体代码修改记录](https://github.com/xiaoxian521/vue-pure-admin/commit/c80818d792276666aaea4b18413a0f08777f2ed1)
|
||||||
|
- 打包输出信息兼容不同打包输出路径
|
||||||
|
- 优化一些动画
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ export function viteBuildInfo(): Plugin {
|
|||||||
let config: { command: string };
|
let config: { command: string };
|
||||||
let startTime: Dayjs;
|
let startTime: Dayjs;
|
||||||
let endTime: Dayjs;
|
let endTime: Dayjs;
|
||||||
|
let outDir: string;
|
||||||
return {
|
return {
|
||||||
name: "vite:buildInfo",
|
name: "vite:buildInfo",
|
||||||
configResolved(resolvedConfig: { command: string }) {
|
configResolved(resolvedConfig) {
|
||||||
config = resolvedConfig;
|
config = resolvedConfig;
|
||||||
|
outDir = resolvedConfig.build?.outDir ?? "dist";
|
||||||
},
|
},
|
||||||
buildStart() {
|
buildStart() {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -32,6 +34,7 @@ export function viteBuildInfo(): Plugin {
|
|||||||
if (config.command === "build") {
|
if (config.command === "build") {
|
||||||
endTime = dayjs(new Date());
|
endTime = dayjs(new Date());
|
||||||
getPackageSize({
|
getPackageSize({
|
||||||
|
folder: outDir,
|
||||||
callback: (size: string) => {
|
callback: (size: string) => {
|
||||||
console.log(
|
console.log(
|
||||||
bold(
|
bold(
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -99,8 +99,10 @@ menus:
|
|||||||
hsInfiniteScroll: 表格无限滚动
|
hsInfiniteScroll: 表格无限滚动
|
||||||
hsdanmaku: 弹幕组件
|
hsdanmaku: 弹幕组件
|
||||||
hsPureTableBase: 基础用法(23个示例)
|
hsPureTableBase: 基础用法(23个示例)
|
||||||
hsPureTableHigh: 高级用法(8个示例)
|
hsPureTableHigh: 高级用法(9个示例)
|
||||||
hsTree: 大数据树业务组件
|
hsTree: 大数据树业务组件
|
||||||
|
hsMenuoverflow: 目录超出显示 Tooltip 文字提示
|
||||||
|
hsChildMenuoverflow: 菜单超出显示 Tooltip 文字提示
|
||||||
status:
|
status:
|
||||||
hsLoad: 加载中...
|
hsLoad: 加载中...
|
||||||
login:
|
login:
|
||||||
|
|||||||
@@ -2,14 +2,6 @@
|
|||||||
import { MockMethod } from "vite-plugin-mock";
|
import { MockMethod } from "vite-plugin-mock";
|
||||||
import { system, permission, frame, tabs } from "@/router/enums";
|
import { system, permission, frame, tabs } from "@/router/enums";
|
||||||
|
|
||||||
import FlUser from "@iconify-icons/ri/admin-line";
|
|
||||||
import Role from "@iconify-icons/ri/admin-fill";
|
|
||||||
import Dict from "@iconify-icons/ri/git-repository-line";
|
|
||||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
|
||||||
import Dept from "@iconify-icons/ri/git-branch-line";
|
|
||||||
import Lollipop from "@iconify-icons/ep/lollipop";
|
|
||||||
import Monitor from "@iconify-icons/ep/monitor";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* roles:页面级别权限,这里模拟二种 "admin"、"common"
|
* roles:页面级别权限,这里模拟二种 "admin"、"common"
|
||||||
* admin:管理员角色
|
* admin:管理员角色
|
||||||
@@ -19,7 +11,7 @@ import Monitor from "@iconify-icons/ep/monitor";
|
|||||||
const systemRouter = {
|
const systemRouter = {
|
||||||
path: "/system",
|
path: "/system",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Setting,
|
icon: "setting",
|
||||||
title: "menus.hssysManagement",
|
title: "menus.hssysManagement",
|
||||||
rank: system
|
rank: system
|
||||||
},
|
},
|
||||||
@@ -28,7 +20,7 @@ const systemRouter = {
|
|||||||
path: "/system/user/index",
|
path: "/system/user/index",
|
||||||
name: "User",
|
name: "User",
|
||||||
meta: {
|
meta: {
|
||||||
icon: FlUser,
|
icon: "flUser",
|
||||||
title: "menus.hsUser",
|
title: "menus.hsUser",
|
||||||
roles: ["admin"]
|
roles: ["admin"]
|
||||||
}
|
}
|
||||||
@@ -37,7 +29,7 @@ const systemRouter = {
|
|||||||
path: "/system/role/index",
|
path: "/system/role/index",
|
||||||
name: "Role",
|
name: "Role",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Role,
|
icon: "role",
|
||||||
title: "menus.hsRole",
|
title: "menus.hsRole",
|
||||||
roles: ["admin"]
|
roles: ["admin"]
|
||||||
}
|
}
|
||||||
@@ -46,7 +38,7 @@ const systemRouter = {
|
|||||||
path: "/system/dept/index",
|
path: "/system/dept/index",
|
||||||
name: "Dept",
|
name: "Dept",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Dept,
|
icon: "dept",
|
||||||
title: "menus.hsDept",
|
title: "menus.hsDept",
|
||||||
roles: ["admin"]
|
roles: ["admin"]
|
||||||
}
|
}
|
||||||
@@ -56,7 +48,7 @@ const systemRouter = {
|
|||||||
component: "/system/dict/index",
|
component: "/system/dict/index",
|
||||||
name: "Dict",
|
name: "Dict",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Dict,
|
icon: "dict",
|
||||||
title: "menus.hsDict",
|
title: "menus.hsDict",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
roles: ["admin"]
|
roles: ["admin"]
|
||||||
@@ -69,7 +61,7 @@ const permissionRouter = {
|
|||||||
path: "/permission",
|
path: "/permission",
|
||||||
meta: {
|
meta: {
|
||||||
title: "menus.permission",
|
title: "menus.permission",
|
||||||
icon: Lollipop,
|
icon: "lollipop",
|
||||||
rank: permission
|
rank: permission
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
@@ -96,7 +88,7 @@ const permissionRouter = {
|
|||||||
const frameRouter = {
|
const frameRouter = {
|
||||||
path: "/iframe",
|
path: "/iframe",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Monitor,
|
icon: "monitor",
|
||||||
title: "menus.hsExternalPage",
|
title: "menus.hsExternalPage",
|
||||||
rank: frame
|
rank: frame
|
||||||
},
|
},
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-pure-admin",
|
"name": "vue-pure-admin",
|
||||||
"version": "3.9.0",
|
"version": "3.9.3",
|
||||||
"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,8 +35,8 @@
|
|||||||
"@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.3",
|
||||||
"@pureadmin/utils": "^1.7.1",
|
"@pureadmin/utils": "^1.7.4",
|
||||||
"@vueuse/core": "^9.6.0",
|
"@vueuse/core": "^9.6.0",
|
||||||
"@vueuse/motion": "2.0.0-beta.12",
|
"@vueuse/motion": "2.0.0-beta.12",
|
||||||
"@wangeditor/editor": "^5.1.21",
|
"@wangeditor/editor": "^5.1.21",
|
||||||
@@ -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",
|
||||||
@@ -56,27 +56,27 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"lodash-unified": "^1.0.2",
|
"lodash-unified": "^1.0.2",
|
||||||
"md-editor-v3": "^2.4.2",
|
"md-editor-v3": "^2.5.0",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"pinia": "^2.0.26",
|
"pinia": "^2.0.27",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
"responsive-storage": "^2.1.0",
|
"responsive-storage": "^2.1.0",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"swiper": "^8.4.4",
|
"swiper": "^8.4.5",
|
||||||
"typeit": "^8.7.0",
|
"typeit": "^8.7.0",
|
||||||
"v-contextmenu": "3.0.0",
|
"v-contextmenu": "3.0.0",
|
||||||
"vue": "^3.2.45",
|
"vue": "^3.2.45",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"vue-json-pretty": "^2.2.2",
|
"vue-json-pretty": "^2.2.3",
|
||||||
"vue-pdf-embed": "^1.1.4",
|
"vue-pdf-embed": "^1.1.5",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"vue-types": "^4.2.1",
|
"vue-types": "^4.2.1",
|
||||||
"vue-virtual-scroller": "^2.0.0-alpha.1",
|
"vue-virtual-scroller": "^2.0.0-alpha.1",
|
||||||
"vue3-danmaku": "^1.0.0",
|
"vue3-danmaku": "^1.1.0",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vxe-table": "^4.3.6",
|
"vxe-table": "^4.3.6",
|
||||||
"xe-utils": "^3.5.7",
|
"xe-utils": "^3.5.7",
|
||||||
|
|||||||
6172
pnpm-lock.yaml
generated
6172
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "3.9.0",
|
"Version": "3.9.3",
|
||||||
"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": {
|
||||||
|
|||||||
51
src/components/ReIcon/src/offlineIcon.ts
Normal file
51
src/components/ReIcon/src/offlineIcon.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import { addIcon } from "@iconify/vue/dist/offline";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 这里存放本地图标,在 src/layout/index.vue 文件中加载,避免在首启动加载
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 本地菜单图标,后端在路由的icon中返回对应的图标字符串并且前端在此处使用addIcon添加即可渲染菜单图标
|
||||||
|
import UbuntuFill from "@iconify-icons/ri/ubuntu-fill";
|
||||||
|
import Menu from "@iconify-icons/ep/menu";
|
||||||
|
import Edit from "@iconify-icons/ep/edit";
|
||||||
|
import InformationLine from "@iconify-icons/ri/information-line";
|
||||||
|
import SetUp from "@iconify-icons/ep/set-up";
|
||||||
|
import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line";
|
||||||
|
import Guide from "@iconify-icons/ep/guide";
|
||||||
|
import HomeFilled from "@iconify-icons/ep/home-filled";
|
||||||
|
import Card from "@iconify-icons/ri/bank-card-line";
|
||||||
|
import ListCheck from "@iconify-icons/ri/list-check";
|
||||||
|
import Histogram from "@iconify-icons/ep/histogram";
|
||||||
|
import Ppt from "@iconify-icons/ri/file-ppt-2-line";
|
||||||
|
import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line";
|
||||||
|
import FlUser from "@iconify-icons/ri/admin-line";
|
||||||
|
import Role from "@iconify-icons/ri/admin-fill";
|
||||||
|
import Dict from "@iconify-icons/ri/git-repository-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
import Dept from "@iconify-icons/ri/git-branch-line";
|
||||||
|
import Lollipop from "@iconify-icons/ep/lollipop";
|
||||||
|
import Monitor from "@iconify-icons/ep/monitor";
|
||||||
|
addIcon("ubuntuFill", UbuntuFill);
|
||||||
|
addIcon("menu", Menu);
|
||||||
|
addIcon("edit", Edit);
|
||||||
|
addIcon("informationLine", InformationLine);
|
||||||
|
addIcon("setUp", SetUp);
|
||||||
|
addIcon("terminalWindowLine", TerminalWindowLine);
|
||||||
|
addIcon("guide", Guide);
|
||||||
|
addIcon("homeFilled", HomeFilled);
|
||||||
|
addIcon("card", Card);
|
||||||
|
addIcon("listCheck", ListCheck);
|
||||||
|
addIcon("histogram", Histogram);
|
||||||
|
addIcon("ppt", Ppt);
|
||||||
|
addIcon("checkboxCircleLine", CheckboxCircleLine);
|
||||||
|
addIcon("flUser", FlUser);
|
||||||
|
addIcon("role", Role);
|
||||||
|
addIcon("dict", Dict);
|
||||||
|
addIcon("setting", Setting);
|
||||||
|
addIcon("dept", Dept);
|
||||||
|
addIcon("lollipop", Lollipop);
|
||||||
|
addIcon("monitor", Monitor);
|
||||||
|
|
||||||
|
// 非菜单图标
|
||||||
|
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
||||||
|
addIcon("refreshRight", RefreshRight);
|
||||||
@@ -13,7 +13,6 @@ import { isString } from "@pureadmin/utils";
|
|||||||
import { propTypes } from "@/utils/propTypes";
|
import { propTypes } from "@/utils/propTypes";
|
||||||
import { IconifyIconOffline } from "../../ReIcon";
|
import { IconifyIconOffline } from "../../ReIcon";
|
||||||
import QRCode, { QRCodeRenderersOptions } from "qrcode";
|
import QRCode, { QRCodeRenderersOptions } from "qrcode";
|
||||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
|
||||||
|
|
||||||
interface QrcodeLogo {
|
interface QrcodeLogo {
|
||||||
src?: string;
|
src?: string;
|
||||||
@@ -248,7 +247,7 @@ export default defineComponent({
|
|||||||
<div class="absolute top-[50%] left-[50%] font-bold">
|
<div class="absolute top-[50%] left-[50%] font-bold">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
icon={RefreshRight}
|
icon="refreshRight"
|
||||||
width="30"
|
width="30"
|
||||||
color="var(--el-color-primary)"
|
color="var(--el-color-primary)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { IconifyIconOffline } from "../../ReIcon";
|
|||||||
import Expand from "@iconify-icons/mdi/arrow-expand-down";
|
import Expand from "@iconify-icons/mdi/arrow-expand-down";
|
||||||
import ArrowCollapse from "@iconify-icons/mdi/arrow-collapse-vertical";
|
import ArrowCollapse from "@iconify-icons/mdi/arrow-collapse-vertical";
|
||||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
|
||||||
|
|
||||||
export const loadingSvg = `
|
export const loadingSvg = `
|
||||||
<path class="path" d="
|
<path class="path" d="
|
||||||
@@ -153,7 +152,7 @@ export default defineComponent({
|
|||||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
icon={RefreshRight}
|
icon="refreshRight"
|
||||||
width="16"
|
width="16"
|
||||||
color="text_color_regular"
|
color="text_color_regular"
|
||||||
onClick={() => emit("refresh")}
|
onClick={() => emit("refresh")}
|
||||||
|
|||||||
@@ -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,11 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { onClickOutside } from "@vueuse/core";
|
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
|
import { onClickOutside } from "@vueuse/core";
|
||||||
import Close from "@iconify-icons/ep/close";
|
import Close from "@iconify-icons/ep/close";
|
||||||
|
|
||||||
const show = ref<Boolean>(false);
|
|
||||||
const target = ref(null);
|
const target = ref(null);
|
||||||
|
const show = ref<Boolean>(false);
|
||||||
|
|
||||||
|
const iconClass = computed(() => {
|
||||||
|
return [
|
||||||
|
"mr-[20px]",
|
||||||
|
"outline-none",
|
||||||
|
"width-[20px]",
|
||||||
|
"height-[20px]",
|
||||||
|
"rounded-[4px]",
|
||||||
|
"cursor-pointer",
|
||||||
|
"transition-colors",
|
||||||
|
"hover:bg-[#0000000f]",
|
||||||
|
"dark:hover:bg-[#ffffff1f]",
|
||||||
|
"dark:hover:text-[#ffffffd9]"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
onClickOutside(target, (event: any) => {
|
onClickOutside(target, (event: any) => {
|
||||||
if (event.clientX > target.value.offsetLeft) return;
|
if (event.clientX > target.value.offsetLeft) return;
|
||||||
show.value = false;
|
show.value = false;
|
||||||
@@ -23,9 +39,11 @@ emitter.on("openPanel", () => {
|
|||||||
<div class="right-panel-items">
|
<div class="right-panel-items">
|
||||||
<div class="project-configuration">
|
<div class="project-configuration">
|
||||||
<h4 class="dark:text-white">项目配置</h4>
|
<h4 class="dark:text-white">项目配置</h4>
|
||||||
<span title="关闭配置">
|
<span title="关闭配置" :class="iconClass">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="dark:text-white"
|
class="dark:text-white"
|
||||||
|
width="20px"
|
||||||
|
height="20px"
|
||||||
:icon="Close"
|
:icon="Close"
|
||||||
@click="show = !show"
|
@click="show = !show"
|
||||||
/>
|
/>
|
||||||
@@ -69,7 +87,6 @@ emitter.on("openPanel", () => {
|
|||||||
box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.05);
|
box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.05);
|
||||||
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
|
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
|
||||||
transform: translate(100%);
|
transform: translate(100%);
|
||||||
// background: #fff;
|
|
||||||
z-index: 40000;
|
z-index: 40000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,16 +142,6 @@ emitter.on("openPanel", () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|
||||||
svg {
|
|
||||||
font-size: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
color: var(--el-color-primary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-divider--horizontal) {
|
:deep(.el-divider--horizontal) {
|
||||||
|
|||||||
@@ -6,8 +6,15 @@ import {
|
|||||||
reactive,
|
reactive,
|
||||||
computed,
|
computed,
|
||||||
nextTick,
|
nextTick,
|
||||||
useCssModule
|
onBeforeMount
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
import {
|
||||||
|
useDark,
|
||||||
|
debounce,
|
||||||
|
useGlobal,
|
||||||
|
storageLocal,
|
||||||
|
storageSession
|
||||||
|
} from "@pureadmin/utils";
|
||||||
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 +24,9 @@ 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 { toggleTheme } from "@pureadmin/theme/dist/browser-utils";
|
||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||||
import {
|
|
||||||
useDark,
|
|
||||||
debounce,
|
|
||||||
useGlobal,
|
|
||||||
storageLocal,
|
|
||||||
storageSession
|
|
||||||
} from "@pureadmin/utils";
|
|
||||||
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";
|
||||||
@@ -34,9 +34,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 +160,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 => {
|
||||||
@@ -218,14 +197,36 @@ function setLayoutModel(layout: string) {
|
|||||||
useAppStoreHook().setLayout(layout);
|
useAppStoreHook().setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 初始化项目配置 */
|
watch($storage, ({ layout }) => {
|
||||||
nextTick(() => {
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
dataThemeChange();
|
||||||
|
/* 初始化项目配置 */
|
||||||
|
nextTick(() => {
|
||||||
settings.greyVal &&
|
settings.greyVal &&
|
||||||
document.querySelector("html")?.setAttribute("class", "html-grey");
|
document.querySelector("html")?.setAttribute("class", "html-grey");
|
||||||
settings.weakVal &&
|
settings.weakVal &&
|
||||||
document.querySelector("html")?.setAttribute("class", "html-weakness");
|
document.querySelector("html")?.setAttribute("class", "html-weakness");
|
||||||
settings.tabsVal && tagsChange();
|
settings.tabsVal && tagsChange();
|
||||||
dataThemeChange();
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -243,9 +244,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 +263,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 +281,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 +403,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 +424,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>
|
||||||
|
|||||||
@@ -41,7 +41,10 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="horizontal-header">
|
<div
|
||||||
|
v-loading="usePermissionStoreHook().wholeMenus.length === 0"
|
||||||
|
class="horizontal-header"
|
||||||
|
>
|
||||||
<div class="horizontal-header-left" @click="backHome">
|
<div class="horizontal-header-left" @click="backHome">
|
||||||
<FontIcon icon="team-iconlogo" svg style="width: 35px; height: 35px" />
|
<FontIcon icon="team-iconlogo" svg style="width: 35px; height: 35px" />
|
||||||
<h4>{{ title }}</h4>
|
<h4>{{ title }}</h4>
|
||||||
@@ -129,6 +132,10 @@ watch(
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-loading-mask) {
|
||||||
|
opacity: 0.45;
|
||||||
|
}
|
||||||
|
|
||||||
.translation {
|
.translation {
|
||||||
::v-deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
padding: 5px 40px;
|
padding: 5px 40px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useDark } from "@pureadmin/utils";
|
import { ref, computed } 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";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
@@ -10,7 +10,25 @@ 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 iconClass = computed(() => {
|
||||||
|
return [
|
||||||
|
"ml-4",
|
||||||
|
"mb-1",
|
||||||
|
"w-[16px]",
|
||||||
|
"h-[16px]",
|
||||||
|
"inline-block",
|
||||||
|
"align-middle",
|
||||||
|
"text-primary",
|
||||||
|
"cursor-pointer",
|
||||||
|
"duration-[360ms]",
|
||||||
|
"hover:text-primary",
|
||||||
|
"dark:hover:!text-white"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "toggleClick"): void;
|
(e: "toggleClick"): void;
|
||||||
@@ -25,13 +43,17 @@ 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="MenuFold"
|
||||||
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="iconClass"
|
||||||
|
:style="{ transform: props.isActive ? 'none' : 'rotateY(180deg)' }"
|
||||||
@click="toggleClick"
|
@click="toggleClick"
|
||||||
|
@mouseenter="visible = true"
|
||||||
|
@mouseleave="visible = false"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,7 +58,11 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="device !== 'mobile'" class="horizontal-header">
|
<div
|
||||||
|
v-if="device !== 'mobile'"
|
||||||
|
class="horizontal-header"
|
||||||
|
v-loading="usePermissionStoreHook().wholeMenus.length === 0"
|
||||||
|
>
|
||||||
<el-menu
|
<el-menu
|
||||||
router
|
router
|
||||||
ref="menuRef"
|
ref="menuRef"
|
||||||
@@ -161,6 +165,10 @@ watch(
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-loading-mask) {
|
||||||
|
opacity: 0.45;
|
||||||
|
}
|
||||||
|
|
||||||
.translation {
|
.translation {
|
||||||
::v-deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
padding: 5px 40px;
|
padding: 5px 40px;
|
||||||
|
|||||||
@@ -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,6 +201,7 @@ 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="!onlyOneChild.showTooltip"
|
||||||
>
|
>
|
||||||
@@ -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) }}
|
||||||
|
|||||||
@@ -59,7 +59,10 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="['sidebar-container', showLogo ? 'has-logo' : '']">
|
<div
|
||||||
|
v-loading="menuData.length === 0"
|
||||||
|
:class="['sidebar-container', showLogo ? 'has-logo' : '']"
|
||||||
|
>
|
||||||
<Logo v-if="showLogo" :collapse="isCollapse" />
|
<Logo v-if="showLogo" :collapse="isCollapse" />
|
||||||
<el-scrollbar
|
<el-scrollbar
|
||||||
wrap-class="scrollbar-wrapper"
|
wrap-class="scrollbar-wrapper"
|
||||||
@@ -91,3 +94,9 @@ watch(
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.el-loading-mask) {
|
||||||
|
opacity: 0.45;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -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,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import "animate.css";
|
import "animate.css";
|
||||||
|
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
||||||
|
import "@/components/ReIcon/src/offlineIcon";
|
||||||
|
// 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";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { IconifyIcon } from "@iconify/vue";
|
import type { IconifyIcon } from "@iconify/vue";
|
||||||
import HomeFilled from "@iconify-icons/ep/home-filled";
|
|
||||||
|
|
||||||
export const routerArrays: Array<RouteConfigs> = [
|
export const routerArrays: Array<RouteConfigs> = [
|
||||||
{
|
{
|
||||||
@@ -7,7 +6,7 @@ export const routerArrays: Array<RouteConfigs> = [
|
|||||||
parentPath: "/",
|
parentPath: "/",
|
||||||
meta: {
|
meta: {
|
||||||
title: "menus.hshome",
|
title: "menus.hshome",
|
||||||
icon: HomeFilled
|
icon: "homeFilled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { able } from "@/router/enums";
|
import { able } from "@/router/enums";
|
||||||
import UbuntuFill from "@iconify-icons/ri/ubuntu-fill";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/able",
|
path: "/able",
|
||||||
redirect: "/able/watermark",
|
redirect: "/able/watermark",
|
||||||
meta: {
|
meta: {
|
||||||
icon: UbuntuFill,
|
icon: "ubuntuFill",
|
||||||
title: $t("menus.hsAble"),
|
title: $t("menus.hsAble"),
|
||||||
rank: able
|
rank: able
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { components } from "@/router/enums";
|
import { components } from "@/router/enums";
|
||||||
import Menu from "@iconify-icons/ep/menu";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/components",
|
path: "/components",
|
||||||
redirect: "/components/video",
|
redirect: "/components/video",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Menu,
|
icon: "menu",
|
||||||
title: $t("menus.hscomponents"),
|
title: $t("menus.hscomponents"),
|
||||||
rank: components
|
rank: components
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { editor } from "@/router/enums";
|
import { editor } from "@/router/enums";
|
||||||
import Edit from "@iconify-icons/ep/edit";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/editor",
|
path: "/editor",
|
||||||
redirect: "/editor/index",
|
redirect: "/editor/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Edit,
|
icon: "edit",
|
||||||
title: $t("menus.hseditor"),
|
title: $t("menus.hseditor"),
|
||||||
rank: editor
|
rank: editor
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { error } from "@/router/enums";
|
import { error } from "@/router/enums";
|
||||||
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: InformationLine,
|
icon: "informationLine",
|
||||||
title: $t("menus.hsabnormal"),
|
title: $t("menus.hsabnormal"),
|
||||||
rank: error
|
rank: error
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { flowchart } from "@/router/enums";
|
import { flowchart } from "@/router/enums";
|
||||||
import SetUp from "@iconify-icons/ep/set-up";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/flowChart",
|
path: "/flowChart",
|
||||||
redirect: "/flowChart/index",
|
redirect: "/flowChart/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: SetUp,
|
icon: "setUp",
|
||||||
title: $t("menus.hsflowChart"),
|
title: $t("menus.hsflowChart"),
|
||||||
rank: flowchart
|
rank: flowchart
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ import { $t } from "@/plugins/i18n";
|
|||||||
import { formdesign } from "@/router/enums";
|
import { formdesign } from "@/router/enums";
|
||||||
const IFrame = () => import("@/layout/frameView.vue");
|
const IFrame = () => import("@/layout/frameView.vue");
|
||||||
|
|
||||||
import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/formDesign",
|
path: "/formDesign",
|
||||||
redirect: "/formDesign/index",
|
redirect: "/formDesign/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: TerminalWindowLine,
|
icon: "terminalWindowLine",
|
||||||
title: $t("menus.hsFormDesign"),
|
title: $t("menus.hsFormDesign"),
|
||||||
rank: formdesign
|
rank: formdesign
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { guide } from "@/router/enums";
|
import { guide } from "@/router/enums";
|
||||||
import Guide from "@iconify-icons/ep/guide";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/guide",
|
path: "/guide",
|
||||||
redirect: "/guide/index",
|
redirect: "/guide/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Guide,
|
icon: "guide",
|
||||||
title: $t("menus.hsguide"),
|
title: $t("menus.hsguide"),
|
||||||
rank: guide
|
rank: guide
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { home } from "@/router/enums";
|
import { home } from "@/router/enums";
|
||||||
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: "/",
|
||||||
@@ -9,7 +8,7 @@ export default {
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/welcome",
|
redirect: "/welcome",
|
||||||
meta: {
|
meta: {
|
||||||
icon: HomeFilled,
|
icon: "homeFilled",
|
||||||
title: $t("menus.hshome"),
|
title: $t("menus.hshome"),
|
||||||
rank: home
|
rank: home
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { list } from "@/router/enums";
|
import { list } from "@/router/enums";
|
||||||
import ListCheck from "@iconify-icons/ri/list-check";
|
|
||||||
import Card from "@iconify-icons/ri/bank-card-line";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/list",
|
path: "/list",
|
||||||
redirect: "/list/card",
|
redirect: "/list/card",
|
||||||
meta: {
|
meta: {
|
||||||
icon: ListCheck,
|
icon: "listCheck",
|
||||||
title: $t("menus.hsList"),
|
title: $t("menus.hsList"),
|
||||||
rank: list
|
rank: list
|
||||||
},
|
},
|
||||||
@@ -17,7 +15,7 @@ export default {
|
|||||||
name: "ListCard",
|
name: "ListCard",
|
||||||
component: () => import("@/views/list/card/index.vue"),
|
component: () => import("@/views/list/card/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
icon: Card,
|
icon: "card",
|
||||||
title: $t("menus.hsListCard"),
|
title: $t("menus.hsListCard"),
|
||||||
showParent: true
|
showParent: true
|
||||||
}
|
}
|
||||||
|
|||||||
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,13 +1,12 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { nested } from "@/router/enums";
|
import { nested } from "@/router/enums";
|
||||||
import Histogram from "@iconify-icons/ep/histogram";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/nested",
|
path: "/nested",
|
||||||
redirect: "/nested/menu1/menu1-1",
|
redirect: "/nested/menu1/menu1-1",
|
||||||
meta: {
|
meta: {
|
||||||
title: $t("menus.hsmenus"),
|
title: $t("menus.hsmenus"),
|
||||||
icon: Histogram,
|
icon: "histogram",
|
||||||
rank: nested
|
rank: nested
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { ppt } from "@/router/enums";
|
import { ppt } from "@/router/enums";
|
||||||
const IFrame = () => import("@/layout/frameView.vue");
|
const IFrame = () => import("@/layout/frameView.vue");
|
||||||
import Ppt from "@iconify-icons/ri/file-ppt-2-line";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/ppt",
|
path: "/ppt",
|
||||||
redirect: "/ppt/index",
|
redirect: "/ppt/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: Ppt,
|
icon: "ppt",
|
||||||
title: "PPT",
|
title: "PPT",
|
||||||
rank: ppt
|
rank: ppt
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
const Layout = () => import("@/layout/index.vue");
|
const Layout = () => import("@/layout/index.vue");
|
||||||
import HomeFilled from "@iconify-icons/ep/home-filled";
|
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -17,7 +16,7 @@ export default [
|
|||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
icon: HomeFilled,
|
icon: "homeFilled",
|
||||||
title: $t("menus.hshome"),
|
title: $t("menus.hshome"),
|
||||||
showLink: false,
|
showLink: false,
|
||||||
rank: 102
|
rank: 102
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
import { result } from "@/router/enums";
|
import { result } from "@/router/enums";
|
||||||
import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/result",
|
path: "/result",
|
||||||
redirect: "/result/success",
|
redirect: "/result/success",
|
||||||
meta: {
|
meta: {
|
||||||
icon: CheckboxCircleLine,
|
icon: "checkboxCircleLine",
|
||||||
title: $t("menus.hsResult"),
|
title: $t("menus.hsResult"),
|
||||||
rank: result
|
rank: result
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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,15 +152,12 @@ 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) {
|
|
||||||
usePermissionStoreHook().handleWholeMenus(data);
|
|
||||||
resolve(router);
|
|
||||||
} else {
|
} else {
|
||||||
formatFlatteningRoutes(addAsyncRoutes(data)).map(
|
formatFlatteningRoutes(addAsyncRoutes(routeList)).map(
|
||||||
(v: RouteRecordRaw) => {
|
(v: RouteRecordRaw) => {
|
||||||
// 防止重复添加路由
|
// 防止重复添加路由
|
||||||
if (
|
if (
|
||||||
@@ -179,14 +177,41 @@ function initRouter() {
|
|||||||
.find(n => n.path === "/");
|
.find(n => n.path === "/");
|
||||||
router.addRoute(flattenRouters);
|
router.addRoute(flattenRouters);
|
||||||
}
|
}
|
||||||
resolve(router);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
usePermissionStoreHook().handleWholeMenus(data);
|
usePermissionStoreHook().handleWholeMenus(routeList);
|
||||||
}
|
}
|
||||||
addPathMatch();
|
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(cloneDeep(data));
|
||||||
|
storageSession.setItem(key, data);
|
||||||
|
resolve(router);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
getAsyncRoutes().then(({ data }) => {
|
||||||
|
handleAsyncRoutes(cloneDeep(data));
|
||||||
|
resolve(router);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -187,6 +187,19 @@ html.dark {
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 全局覆盖element-plus的el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标的样式,表现更鲜明 */
|
||||||
|
.el-icon {
|
||||||
|
&.el-dialog__close,
|
||||||
|
&.el-drawer__close,
|
||||||
|
&.el-message-box__close,
|
||||||
|
&.el-notification__closeBtn {
|
||||||
|
&:hover {
|
||||||
|
color: rgba(255, 255, 255, 0.85) !important;
|
||||||
|
background-color: rgba(255, 255, 255, 0.12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,非暗黑模式在 src/style/element-plus.scss 文件进行了适配 */
|
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,非暗黑模式在 src/style/element-plus.scss 文件进行了适配 */
|
||||||
.pure-message {
|
.pure-message {
|
||||||
background-image: initial !important;
|
background-image: initial !important;
|
||||||
|
|||||||
@@ -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 {
|
||||||
@@ -63,6 +69,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 全局覆盖element-plus的el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标的样式,表现更鲜明 */
|
||||||
|
.el-dialog__headerbtn,
|
||||||
|
.el-message-box__headerbtn {
|
||||||
|
&:hover {
|
||||||
|
.el-dialog__close {
|
||||||
|
color: var(--el-color-info) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-icon {
|
||||||
|
&.el-dialog__close,
|
||||||
|
&.el-drawer__close,
|
||||||
|
&.el-message-box__close,
|
||||||
|
&.el-notification__closeBtn {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
outline: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: background-color 0.2s, color 0.2s;
|
||||||
|
&:hover {
|
||||||
|
color: rgba(0, 0, 0, 0.88) !important;
|
||||||
|
background-color: rgba(0, 0, 0, 0.06);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,暗黑模式在 src/style/dark.scss 文件进行了适配 */
|
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,暗黑模式在 src/style/dark.scss 文件进行了适配 */
|
||||||
.pure-message {
|
.pure-message {
|
||||||
border-width: 0 !important;
|
border-width: 0 !important;
|
||||||
|
|||||||
@@ -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,3 +1,4 @@
|
|||||||
|
import Page from "./page/index.vue";
|
||||||
import RowDrag from "./drag/row/index.vue";
|
import RowDrag from "./drag/row/index.vue";
|
||||||
import ColumnDrag from "./drag/column/index.vue";
|
import ColumnDrag from "./drag/column/index.vue";
|
||||||
import Contextmenu from "./contextmenu/index.vue";
|
import Contextmenu from "./contextmenu/index.vue";
|
||||||
@@ -11,6 +12,12 @@ const rendContent = (val: string) =>
|
|||||||
`代码位置:src/views/pure-table/high/${val}/index.vue`;
|
`代码位置:src/views/pure-table/high/${val}/index.vue`;
|
||||||
|
|
||||||
export const list = [
|
export const list = [
|
||||||
|
{
|
||||||
|
key: "page",
|
||||||
|
content: rendContent("page"),
|
||||||
|
title: "分页、加载动画",
|
||||||
|
component: Page
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "rowDrag",
|
key: "rowDrag",
|
||||||
content: rendContent("drag/row"),
|
content: rendContent("drag/row"),
|
||||||
|
|||||||
91
src/views/pure-table/high/page/columns.tsx
Normal file
91
src/views/pure-table/high/page/columns.tsx
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
import { tableData } from "../data";
|
||||||
|
import { clone, delay } from "@pureadmin/utils";
|
||||||
|
import { ref, onMounted, reactive, watchEffect } from "vue";
|
||||||
|
import type { PaginationProps, LoadingConfig, Align } from "@pureadmin/table";
|
||||||
|
|
||||||
|
export function useColumns() {
|
||||||
|
const dataList = ref([]);
|
||||||
|
const loading = ref(true);
|
||||||
|
const paginationAlign = ref("right");
|
||||||
|
const columns: TableColumnList = [
|
||||||
|
{
|
||||||
|
label: "日期",
|
||||||
|
prop: "date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "姓名",
|
||||||
|
prop: "name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "地址",
|
||||||
|
prop: "address"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
/** 分页配置 */
|
||||||
|
const pagination = reactive<PaginationProps>({
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
pageSizes: [10, 15, 20],
|
||||||
|
total: 0,
|
||||||
|
align: "right",
|
||||||
|
background: true
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 加载动画配置 */
|
||||||
|
const loadingConfig = reactive<LoadingConfig>({
|
||||||
|
text: "正在加载第一页...",
|
||||||
|
viewBox: "-10, -10, 50, 50",
|
||||||
|
spinner: `
|
||||||
|
<path class="path" d="
|
||||||
|
M 30 15
|
||||||
|
L 28 17
|
||||||
|
M 25.61 25.61
|
||||||
|
A 15 15, 0, 0, 1, 15 30
|
||||||
|
A 15 15, 0, 1, 1, 27.99 7.5
|
||||||
|
L 15 15
|
||||||
|
" style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/>
|
||||||
|
`
|
||||||
|
// svg: "",
|
||||||
|
// background: rgba()
|
||||||
|
});
|
||||||
|
|
||||||
|
function onSizeChange(val) {
|
||||||
|
console.log("onSizeChange", val);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCurrentChange(val) {
|
||||||
|
loadingConfig.text = `正在加载第${val}页...`;
|
||||||
|
loading.value = true;
|
||||||
|
delay(600).then(() => {
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
pagination.align = paginationAlign.value as Align;
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
delay(600).then(() => {
|
||||||
|
const newList = [];
|
||||||
|
Array.from({ length: 6 }).forEach(() => {
|
||||||
|
newList.push(clone(tableData, true));
|
||||||
|
});
|
||||||
|
dataList.value = newList.flat(Infinity);
|
||||||
|
pagination.total = dataList.value.length;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
loading,
|
||||||
|
columns,
|
||||||
|
dataList,
|
||||||
|
pagination,
|
||||||
|
loadingConfig,
|
||||||
|
paginationAlign,
|
||||||
|
onSizeChange,
|
||||||
|
onCurrentChange
|
||||||
|
};
|
||||||
|
}
|
||||||
46
src/views/pure-table/high/page/index.vue
Normal file
46
src/views/pure-table/high/page/index.vue
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { useColumns } from "./columns";
|
||||||
|
|
||||||
|
const {
|
||||||
|
loading,
|
||||||
|
columns,
|
||||||
|
dataList,
|
||||||
|
pagination,
|
||||||
|
loadingConfig,
|
||||||
|
paginationAlign,
|
||||||
|
onSizeChange,
|
||||||
|
onCurrentChange
|
||||||
|
} = useColumns();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-space class="float-right mb-2">
|
||||||
|
<p>分页的对齐方式:</p>
|
||||||
|
<el-radio-group v-model="paginationAlign">
|
||||||
|
<el-radio-button label="right">right</el-radio-button>
|
||||||
|
<el-radio-button label="center">center</el-radio-button>
|
||||||
|
<el-radio-button label="left">left</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-space>
|
||||||
|
<pure-table
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
alignWhole="center"
|
||||||
|
showOverflowTooltip
|
||||||
|
:loading="loading"
|
||||||
|
:loading-config="loadingConfig"
|
||||||
|
:height="440"
|
||||||
|
:data="
|
||||||
|
dataList.slice(
|
||||||
|
(pagination.currentPage - 1) * pagination.pageSize,
|
||||||
|
pagination.currentPage * pagination.pageSize
|
||||||
|
)
|
||||||
|
"
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="pagination"
|
||||||
|
@size-change="onSizeChange"
|
||||||
|
@current-change="onCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -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