Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98b97b9f88 | ||
|
|
3629a66535 | ||
|
|
95940312a9 | ||
|
|
f13faf0788 | ||
|
|
8e2b174e09 | ||
|
|
b5839d6398 | ||
|
|
b14f41c8d7 | ||
|
|
9ab3fd19ef | ||
|
|
fa5c97ffa4 | ||
|
|
b4a566b2bf | ||
|
|
c84c447f3e | ||
|
|
53c715873c | ||
|
|
c80818d792 | ||
|
|
17936d476c | ||
|
|
1ef6ce70db | ||
|
|
d5d7dd8e57 | ||
|
|
1a39d0962e | ||
|
|
86b77c2877 | ||
|
|
cf8e5897fb | ||
|
|
f1e6ddff18 | ||
|
|
059a704f53 | ||
|
|
4c29bcc49a | ||
|
|
47960bbaf9 | ||
|
|
b2ec77275d | ||
|
|
6fc12a2498 | ||
|
|
a72557f4e2 | ||
|
|
71d0ec8ba8 | ||
|
|
ee5d82c021 | ||
|
|
c7ab236e10 | ||
|
|
d2b1bd5b44 | ||
|
|
a22bc8622e | ||
|
|
fe9f6e5493 | ||
|
|
7f0354cd63 | ||
|
|
c437371db6 | ||
|
|
5734d0391f | ||
|
|
e81fb5bb10 | ||
|
|
0c5ecd0a4e | ||
|
|
1d76946968 | ||
|
|
297319f668 | ||
|
|
e23971b680 | ||
|
|
18927d4750 | ||
|
|
33bd64d9ff | ||
|
|
667ef918fc | ||
|
|
cc55de03ee | ||
|
|
4f786d6262 | ||
|
|
63f2540745 |
@@ -1,3 +1,81 @@
|
|||||||
|
# 3.9.4 (2022-12-05)
|
||||||
|
|
||||||
|
### ✔️ refactor
|
||||||
|
|
||||||
|
- Completely removed `vxe-table`, after removal, the overall package size of the full version is reduced by `1.82MB`, and the initial startup time is basically the same as the lite version 🐮
|
||||||
|
[Click here to see Why Removed? How to integrate it yourself?](https://xiaoxian521.github.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- Fixed the jitter problem caused by the scroll bar on the page when the text is too long when exiting the full screen
|
||||||
|
- Fix some type errors
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: Great optimization of the first screen loading. Compared with the version before `3.9.0`, the first screen requests are reduced by `71`, and the first screen loading resources are reduced by `4.1 MB`
|
||||||
|
|
||||||
|
# 3.8.7 (2022-11-28)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: Great package optimization, please be sure to upgrade! Use `unplugin-vue-define-options` to replace `unplugin-vue-macros`, the packaging speed is increased several times, use `unplugin-vue-macros` to take `mac` with moderate performance as an example, the packaging time of the full version is` 6` minutes😭, after replacing it with `unplugin-vue-define-options`, the packaging time on the same computer is `50` seconds☺️
|
||||||
|
|
||||||
|
# 3.8.6 (2022-11-27)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- Add `message` message prompt function, compatible with `Element Plus` and `Ant Design` two `Message` style styles, use and package size are extremely low cost and adapt to dark mode, really fragrant 😂
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: No need to install `@vue/runtime-core`, compatible with `volar` hints of all `element-plus` components
|
||||||
|
|
||||||
|
# 3.8.5 (2022-11-26)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Great optimization, remove `@pureadmin/components` and use compatible writing, the package size of the platform is reduced by `0.4` MB before compression is not enabled, and the resource of `2.3` MB is reduced for the first screen request, which is for the [lite version ](https://github.com/xiaoxian521/pure-admin-thin) is a very big optimization, the streamlined version has synchronized code
|
||||||
|
|
||||||
# 3.8.0 (2022-11-26)
|
# 3.8.0 (2022-11-26)
|
||||||
|
|
||||||
### 🎫 Feat
|
### 🎫 Feat
|
||||||
|
|||||||
78
CHANGELOG.md
@@ -1,3 +1,81 @@
|
|||||||
|
# 3.9.4 (2022-12-05)
|
||||||
|
|
||||||
|
### ✔️ refactor
|
||||||
|
|
||||||
|
- Completely removed `vxe-table`, after removal, the overall package size of the full version is reduced by `1.82MB`, and the initial startup time is basically the same as the lite version 🐮
|
||||||
|
[Click here to see Why Removed? How to integrate it yourself?](https://xiaoxian521.github.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- Fixed the jitter problem caused by the scroll bar on the page when the text is too long when exiting the full screen
|
||||||
|
- Fix some type errors
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: Great optimization of the first screen loading. Compared with the version before `3.9.0`, the first screen requests are reduced by `71`, and the first screen loading resources are reduced by `4.1 MB`
|
||||||
|
|
||||||
|
# 3.8.7 (2022-11-28)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: Great package optimization, please be sure to upgrade! Use `unplugin-vue-define-options` to replace `unplugin-vue-macros`, the packaging speed is increased several times, use `unplugin-vue-macros` to take `mac` with moderate performance as an example, the packaging time of the full version is` 6` minutes😭, after replacing it with `unplugin-vue-define-options`, the packaging time on the same computer is `50` seconds☺️
|
||||||
|
|
||||||
|
# 3.8.6 (2022-11-27)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- Add `message` message prompt function, compatible with `Element Plus` and `Ant Design` two `Message` style styles, use and package size are extremely low cost and adapt to dark mode, really fragrant 😂
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: No need to install `@vue/runtime-core`, compatible with `volar` hints of all `element-plus` components
|
||||||
|
|
||||||
|
# 3.8.5 (2022-11-26)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- Great optimization, remove `@pureadmin/components` and use compatible writing, the package size of the platform is reduced by `0.4` MB before compression is not enabled, and the resource of `2.3` MB is reduced for the first screen request, which is for the [lite version ](https://github.com/xiaoxian521/pure-admin-thin) is a very big optimization, the streamlined version has synchronized code
|
||||||
|
|
||||||
# 3.8.0 (2022-11-26)
|
# 3.8.0 (2022-11-26)
|
||||||
|
|
||||||
### 🎫 Feat
|
### 🎫 Feat
|
||||||
|
|||||||
@@ -1,3 +1,81 @@
|
|||||||
|
# 3.9.4 (2022-12-05)
|
||||||
|
|
||||||
|
### ✔️ refactor
|
||||||
|
|
||||||
|
- 完全移除了 `vxe-table`,移除后,完整版整体打包大小减少 `1.82MB`,首启动时长基本和精简版持平 🐮
|
||||||
|
[点击此处查看为什么移除?如何自行集成?](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- 修复退出全屏时文字过长导致页面出现滚动条后带来的抖动问题
|
||||||
|
- 修复一些类型错误
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: 首屏加载大优化,对比 `3.9.0` 之前版本,首屏请求减少 `71` 个,首屏加载资源减少 `4.1 MB`
|
||||||
|
|
||||||
|
# 3.8.7 (2022-11-28)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: 打包大优化,请务必升级!使用 `unplugin-vue-define-options` 替换 `unplugin-vue-macros` ,打包速度提升数倍,使用 `unplugin-vue-macros` 以性能中等偏上的 `mac` 为例完整版打包时长为 `6` 分钟 😭,使用 `unplugin-vue-define-options` 替换后,相同电脑下打包时长为 `50` 秒 ☺️
|
||||||
|
|
||||||
|
# 3.8.6 (2022-11-27)
|
||||||
|
|
||||||
|
### 🎫 Feat
|
||||||
|
|
||||||
|
- 添加 `message` 消息提示函数,兼容 `Element Plus` 和 `Ant Design` 两种 `Message` 样式风格,使用和打包大小成本极低并适配暗黑模式,真香 😂
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- perf: 无需安装 `@vue/runtime-core` ,兼容所有 `element-plus` 组件的 `volar` 提示
|
||||||
|
|
||||||
|
# 3.8.5 (2022-11-26)
|
||||||
|
|
||||||
|
### 🍏 Perf
|
||||||
|
|
||||||
|
- 大优化,移除 `@pureadmin/components` 并采用兼容写法,平台打包大小在未启用压缩前对比优化前减少 `0.4` MB , 首屏请求减少 `2.3` MB 的资源,这对于 [精简版](https://github.com/xiaoxian521/pure-admin-thin) 来说是非常大的优化,精简版已经同步代码
|
||||||
|
|
||||||
# 3.8.0 (2022-11-26)
|
# 3.8.0 (2022-11-26)
|
||||||
|
|
||||||
### 🎫 Feat
|
### 🎫 Feat
|
||||||
|
|||||||
@@ -10,6 +10,13 @@
|
|||||||
|
|
||||||
`vue-pure-admin` is an open source free and out-of-the-box middle and background management system template. Developed using the latest mainstream technologies such as `Vue3`, `Vite`, `Element-Plus`, `TypeScript`, `Pinia`, `Tailwindcss`
|
`vue-pure-admin` is an open source free and out-of-the-box middle and background management system template. Developed using the latest mainstream technologies such as `Vue3`, `Vite`, `Element-Plus`, `TypeScript`, `Pinia`, `Tailwindcss`
|
||||||
|
|
||||||
|
## Thin version (offering non-internationalized and internationalized versions)
|
||||||
|
|
||||||
|
The simplified version is based on the shelf extracted from [vue-pure-admin](https://github.com/xiaoxian521/vue-pure-admin), which contains main functions and is more suitable for actual project development. The packaged size is introduced globally [element-plus](https://element-plus.org) is still below `2.3MB`, and the full version of the code will be permanently synchronized. After enabling `brotli` compression and `cdn` to replace the local library mode, the package size is less than `350kb`
|
||||||
|
|
||||||
|
- [Click me to view the non-internationalized version](https://github.com/xiaoxian521/pure-admin-thin)
|
||||||
|
- [Click me to view Internationalization version](https://github.com/xiaoxian521/pure-admin-thin/tree/i18n)
|
||||||
|
|
||||||
## Supporting Video
|
## Supporting Video
|
||||||
|
|
||||||
- [Click Watch Tutorial](https://www.bilibili.com/video/BV1kg411v7QT)
|
- [Click Watch Tutorial](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||||
@@ -20,11 +27,6 @@
|
|||||||
- [Click me to view the domestic documentation site](https://yiming_chang.gitee.io/pure-admin-doc)
|
- [Click me to view the domestic documentation site](https://yiming_chang.gitee.io/pure-admin-doc)
|
||||||
- [Click me to view foreign document site](https://xiaoxian521.github.io/pure-admin-doc)
|
- [Click me to view foreign document site](https://xiaoxian521.github.io/pure-admin-doc)
|
||||||
|
|
||||||
## Thin version (offering non-internationalized and internationalized versions)
|
|
||||||
|
|
||||||
- [Click me to view the non-internationalized version](https://github.com/xiaoxian521/pure-admin-thin)
|
|
||||||
- [Click me to view Internationalization version](https://github.com/xiaoxian521/pure-admin-thin/tree/i18n)
|
|
||||||
|
|
||||||
## Tauri
|
## Tauri
|
||||||
|
|
||||||
- [Click Watch Tauri](https://github.com/xiaoxian521/tauri-pure-admin)
|
- [Click Watch Tauri](https://github.com/xiaoxian521/tauri-pure-admin)
|
||||||
|
|||||||
12
README.md
@@ -10,6 +10,13 @@
|
|||||||
|
|
||||||
`vue-pure-admin` 是一款开源免费且开箱即用的中后台管理系统模版。使用了最新的 `Vue3`、`Vite`、`Element-Plus`、`TypeScript`、`Pinia`、`Tailwindcss` 等主流技术开发
|
`vue-pure-admin` 是一款开源免费且开箱即用的中后台管理系统模版。使用了最新的 `Vue3`、`Vite`、`Element-Plus`、`TypeScript`、`Pinia`、`Tailwindcss` 等主流技术开发
|
||||||
|
|
||||||
|
## 精简版(实际项目开发请用精简版,提供 `非国际化` 、`国际化` 两个版本选择)
|
||||||
|
|
||||||
|
精简版是基于 [vue-pure-admin](https://github.com/xiaoxian521/vue-pure-admin) 提炼出的架子,包含主体功能,更适合实际项目开发,打包后的大小在全局引入 [element-plus](https://element-plus.org) 的情况下仍然低于 `2.3MB`,并且会永久同步完整版的代码。开启 `brotli` 压缩和 `cdn` 替换本地库模式后,打包大小低于 `350kb`
|
||||||
|
|
||||||
|
- [点我查看非国际化精简版](https://github.com/xiaoxian521/pure-admin-thin)
|
||||||
|
- [点我查看国际化精简版](https://github.com/xiaoxian521/pure-admin-thin/tree/i18n)
|
||||||
|
|
||||||
## 配套视频
|
## 配套视频
|
||||||
|
|
||||||
- [点我查看快速开发教程](https://www.bilibili.com/video/BV1kg411v7QT)
|
- [点我查看快速开发教程](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||||
@@ -20,11 +27,6 @@
|
|||||||
- [点我查看国内文档站](https://yiming_chang.gitee.io/pure-admin-doc)
|
- [点我查看国内文档站](https://yiming_chang.gitee.io/pure-admin-doc)
|
||||||
- [点我查看国外文档站](https://xiaoxian521.github.io/pure-admin-doc)
|
- [点我查看国外文档站](https://xiaoxian521.github.io/pure-admin-doc)
|
||||||
|
|
||||||
## 精简版(实际项目开发请用精简版,提供 `非国际化` 、`国际化` 两个版本选择)
|
|
||||||
|
|
||||||
- [点我查看非国际化精简版](https://github.com/xiaoxian521/pure-admin-thin)
|
|
||||||
- [点我查看国际化精简版](https://github.com/xiaoxian521/pure-admin-thin/tree/i18n)
|
|
||||||
|
|
||||||
## `Tauri` 版
|
## `Tauri` 版
|
||||||
|
|
||||||
- [点我查看 Tauri 版](https://github.com/xiaoxian521/tauri-pure-admin)
|
- [点我查看 Tauri 版](https://github.com/xiaoxian521/tauri-pure-admin)
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -4,31 +4,41 @@
|
|||||||
* 尤其当您禁用浏览器缓存时(这种情况只应该发生在调试阶段)必须将对应模块加入到 include里,否则会遇到开发环境切换页面卡顿的问题(vite 会认为它是一个新的依赖包会重新加载并强制刷新页面),因为它既无法使用浏览器缓存,又没有在本地 node_modules/.vite 里缓存
|
* 尤其当您禁用浏览器缓存时(这种情况只应该发生在调试阶段)必须将对应模块加入到 include里,否则会遇到开发环境切换页面卡顿的问题(vite 会认为它是一个新的依赖包会重新加载并强制刷新页面),因为它既无法使用浏览器缓存,又没有在本地 node_modules/.vite 里缓存
|
||||||
* 温馨提示:如果您使用的第三方库是全局引入,也就是引入到 src/main.ts 文件里,就不需要再添加到 include 里了,因为 vite 会自动将它们缓存到 node_modules/.vite
|
* 温馨提示:如果您使用的第三方库是全局引入,也就是引入到 src/main.ts 文件里,就不需要再添加到 include 里了,因为 vite 会自动将它们缓存到 node_modules/.vite
|
||||||
*/
|
*/
|
||||||
export const include = [
|
const include = [
|
||||||
|
"qs",
|
||||||
|
"mitt",
|
||||||
"xlsx",
|
"xlsx",
|
||||||
"dayjs",
|
"dayjs",
|
||||||
|
"axios",
|
||||||
"pinia",
|
"pinia",
|
||||||
"swiper",
|
"swiper",
|
||||||
"lodash",
|
"lodash",
|
||||||
|
"echarts",
|
||||||
"intro.js",
|
"intro.js",
|
||||||
"vue-i18n",
|
"vue-i18n",
|
||||||
|
"js-cookie",
|
||||||
"lodash-es",
|
"lodash-es",
|
||||||
"cropperjs",
|
"cropperjs",
|
||||||
"jsbarcode",
|
"jsbarcode",
|
||||||
"sortablejs",
|
"sortablejs",
|
||||||
"swiper/vue",
|
"swiper/vue",
|
||||||
|
"md-editor-v3",
|
||||||
"@vueuse/core",
|
"@vueuse/core",
|
||||||
"vue3-danmaku",
|
"vue3-danmaku",
|
||||||
"v-contextmenu",
|
"v-contextmenu",
|
||||||
"vue-pdf-embed",
|
"vue-pdf-embed",
|
||||||
"lodash-unified",
|
"lodash-unified",
|
||||||
|
"@ctrl/tinycolor",
|
||||||
"china-area-data",
|
"china-area-data",
|
||||||
"@faker-js/faker",
|
|
||||||
"vue-json-pretty",
|
"vue-json-pretty",
|
||||||
"@logicflow/core",
|
"@logicflow/core",
|
||||||
"@pureadmin/utils",
|
"@pureadmin/utils",
|
||||||
|
"@wangeditor/editor",
|
||||||
|
"responsive-storage",
|
||||||
"@howdyjs/mouse-menu",
|
"@howdyjs/mouse-menu",
|
||||||
"@logicflow/extension",
|
"@logicflow/extension",
|
||||||
|
"vue-virtual-scroller",
|
||||||
|
"element-resize-detector",
|
||||||
"@amap/amap-jsapi-loader",
|
"@amap/amap-jsapi-loader",
|
||||||
"el-table-infinite-scroll",
|
"el-table-infinite-scroll",
|
||||||
"@wangeditor/editor-for-vue",
|
"@wangeditor/editor-for-vue",
|
||||||
@@ -38,3 +48,16 @@ export const include = [
|
|||||||
"xgplayer/es/controls/screenShot",
|
"xgplayer/es/controls/screenShot",
|
||||||
"xgplayer/es/controls/playbackRate"
|
"xgplayer/es/controls/playbackRate"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在预构建中强制排除的依赖项
|
||||||
|
* 温馨提示:所有以 `@iconify-icons/` 开头引入的的本地图标模块,都应该加入到下面的 `exclude` 里,因为平台推荐的使用方式是哪里需要哪里引入而且都是单个的引入,不需要预构建,直接让浏览器加载就好
|
||||||
|
*/
|
||||||
|
const exclude = [
|
||||||
|
"@iconify-icons/ep",
|
||||||
|
"@iconify-icons/ri",
|
||||||
|
"@iconify-icons/mdi",
|
||||||
|
"@pureadmin/theme/dist/browser-utils"
|
||||||
|
];
|
||||||
|
|
||||||
|
export { include, exclude };
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import vue from "@vitejs/plugin-vue";
|
|||||||
import { viteBuildInfo } from "./info";
|
import { viteBuildInfo } from "./info";
|
||||||
import svgLoader from "vite-svg-loader";
|
import svgLoader from "vite-svg-loader";
|
||||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||||
import VueMacros from "unplugin-vue-macros/vite";
|
|
||||||
import { viteMockServe } from "vite-plugin-mock";
|
import { viteMockServe } from "vite-plugin-mock";
|
||||||
import { configCompressPlugin } from "./compress";
|
import { configCompressPlugin } from "./compress";
|
||||||
import VueI18n from "@intlify/vite-plugin-vue-i18n";
|
import VueI18n from "@intlify/vite-plugin-vue-i18n";
|
||||||
import { visualizer } from "rollup-plugin-visualizer";
|
import { visualizer } from "rollup-plugin-visualizer";
|
||||||
import removeConsole from "vite-plugin-remove-console";
|
import removeConsole from "vite-plugin-remove-console";
|
||||||
import themePreprocessorPlugin from "@pureadmin/theme";
|
import themePreprocessorPlugin from "@pureadmin/theme";
|
||||||
|
import DefineOptions from "unplugin-vue-define-options/vite";
|
||||||
import { genScssMultipleScopeVars } from "../src/layout/theme";
|
import { genScssMultipleScopeVars } from "../src/layout/theme";
|
||||||
|
|
||||||
export function getPluginsList(
|
export function getPluginsList(
|
||||||
@@ -32,7 +32,7 @@ export function getPluginsList(
|
|||||||
vueJsx(),
|
vueJsx(),
|
||||||
VITE_CDN ? cdn : null,
|
VITE_CDN ? cdn : null,
|
||||||
configCompressPlugin(VITE_COMPRESSION),
|
configCompressPlugin(VITE_COMPRESSION),
|
||||||
VueMacros(),
|
DefineOptions(),
|
||||||
// 线上环境删除console
|
// 线上环境删除console
|
||||||
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
||||||
viteBuildInfo(),
|
viteBuildInfo(),
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ buttons:
|
|||||||
hscloseRightTabs: Close RightTabs
|
hscloseRightTabs: Close RightTabs
|
||||||
hscloseOtherTabs: Close OtherTabs
|
hscloseOtherTabs: Close OtherTabs
|
||||||
hscloseAllTabs: Close AllTabs
|
hscloseAllTabs: Close AllTabs
|
||||||
hswholeFullScreen: Whole FullScreen
|
hswholeFullScreen: FullScreen
|
||||||
hswholeExitFullScreen: Whole ExitFullScreen
|
hswholeExitFullScreen: ExitFull
|
||||||
hscontentFullScreen: Content FullScreen
|
hscontentFullScreen: Content FullScreen
|
||||||
hscontentExitFullScreen: Content ExitFullScreen
|
hscontentExitFullScreen: Content ExitFullScreen
|
||||||
menus:
|
menus:
|
||||||
@@ -28,7 +28,6 @@ menus:
|
|||||||
hsempty: Empty Page
|
hsempty: Empty Page
|
||||||
hssysManagement: System Manage
|
hssysManagement: System Manage
|
||||||
hsUser: User Manage
|
hsUser: User Manage
|
||||||
hsDict: Dict Manage
|
|
||||||
hsRole: Role Manage
|
hsRole: Role Manage
|
||||||
hsDept: Dept Manage
|
hsDept: Dept Manage
|
||||||
hseditor: Editor
|
hseditor: Editor
|
||||||
@@ -37,6 +36,7 @@ menus:
|
|||||||
hsfourZeroOne: "403"
|
hsfourZeroOne: "403"
|
||||||
hsFive: "500"
|
hsFive: "500"
|
||||||
hscomponents: Components
|
hscomponents: Components
|
||||||
|
hsmessage: Message Tips Components
|
||||||
hsvideo: Video Components
|
hsvideo: Video Components
|
||||||
hsmap: Map Components
|
hsmap: Map Components
|
||||||
hsdraggable: Draggable Components
|
hsdraggable: Draggable Components
|
||||||
@@ -84,9 +84,6 @@ menus:
|
|||||||
hsIconSelect: Icon Select
|
hsIconSelect: Icon Select
|
||||||
hsTimeline: Time Line
|
hsTimeline: Time Line
|
||||||
hsLineTree: LineTree
|
hsLineTree: LineTree
|
||||||
hsAntTabs: Imitate Antdv Tabs
|
|
||||||
hsAntAnchor: Imitate Antdv Anchor
|
|
||||||
hsAntTreeSelect: Imitate Antdv TreeSelector
|
|
||||||
hsList: List Page
|
hsList: List Page
|
||||||
hsListCard: Card List Page
|
hsListCard: Card List Page
|
||||||
hsDebounce: Debounce & Throttle
|
hsDebounce: Debounce & Throttle
|
||||||
@@ -103,6 +100,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:
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ buttons:
|
|||||||
hscloseRightTabs: 关闭右侧标签页
|
hscloseRightTabs: 关闭右侧标签页
|
||||||
hscloseOtherTabs: 关闭其他标签页
|
hscloseOtherTabs: 关闭其他标签页
|
||||||
hscloseAllTabs: 关闭全部标签页
|
hscloseAllTabs: 关闭全部标签页
|
||||||
hswholeFullScreen: 整体页面全屏
|
hswholeFullScreen: 全屏
|
||||||
hswholeExitFullScreen: 整体页面退出全屏
|
hswholeExitFullScreen: 退出全屏
|
||||||
hscontentFullScreen: 内容区全屏
|
hscontentFullScreen: 内容区全屏
|
||||||
hscontentExitFullScreen: 内容区退出全屏
|
hscontentExitFullScreen: 内容区退出全屏
|
||||||
menus:
|
menus:
|
||||||
@@ -28,7 +28,6 @@ menus:
|
|||||||
hsempty: 无Layout页
|
hsempty: 无Layout页
|
||||||
hssysManagement: 系统管理
|
hssysManagement: 系统管理
|
||||||
hsUser: 用户管理
|
hsUser: 用户管理
|
||||||
hsDict: 字典管理
|
|
||||||
hsRole: 角色管理
|
hsRole: 角色管理
|
||||||
hsDept: 部门管理
|
hsDept: 部门管理
|
||||||
hseditor: 编辑器
|
hseditor: 编辑器
|
||||||
@@ -37,6 +36,7 @@ menus:
|
|||||||
hsfourZeroOne: "403"
|
hsfourZeroOne: "403"
|
||||||
hsFive: "500"
|
hsFive: "500"
|
||||||
hscomponents: 组件
|
hscomponents: 组件
|
||||||
|
hsmessage: 消息提示组件
|
||||||
hsvideo: 视频组件
|
hsvideo: 视频组件
|
||||||
hsmap: 地图组件
|
hsmap: 地图组件
|
||||||
hsdraggable: 拖拽组件
|
hsdraggable: 拖拽组件
|
||||||
@@ -84,9 +84,6 @@ menus:
|
|||||||
hsIconSelect: 图标选择器
|
hsIconSelect: 图标选择器
|
||||||
hsTimeline: 时间线
|
hsTimeline: 时间线
|
||||||
hsLineTree: 树形连接线
|
hsLineTree: 树形连接线
|
||||||
hsAntTabs: 仿antdv标签页
|
|
||||||
hsAntAnchor: 仿antdv锚点
|
|
||||||
hsAntTreeSelect: 仿antdv树型选择器
|
|
||||||
hsList: 列表页
|
hsList: 列表页
|
||||||
hsListCard: 卡片列表页
|
hsListCard: 卡片列表页
|
||||||
hsDebounce: 防抖节流
|
hsDebounce: 防抖节流
|
||||||
@@ -100,9 +97,11 @@ menus:
|
|||||||
hsExecl: 导出Excel
|
hsExecl: 导出Excel
|
||||||
hsInfiniteScroll: 表格无限滚动
|
hsInfiniteScroll: 表格无限滚动
|
||||||
hsdanmaku: 弹幕组件
|
hsdanmaku: 弹幕组件
|
||||||
hsPureTableBase: 基础用法
|
hsPureTableBase: 基础用法(23个示例)
|
||||||
hsPureTableHigh: 高级用法
|
hsPureTableHigh: 高级用法(10个示例)
|
||||||
hsTree: 大数据树业务组件
|
hsTree: 大数据树业务组件
|
||||||
|
hsMenuoverflow: 目录超出显示 Tooltip 文字提示
|
||||||
|
hsChildMenuoverflow: 菜单超出显示 Tooltip 文字提示
|
||||||
status:
|
status:
|
||||||
hsLoad: 加载中...
|
hsLoad: 加载中...
|
||||||
login:
|
login:
|
||||||
|
|||||||
@@ -42,17 +42,6 @@ const systemRouter = {
|
|||||||
title: "menus.hsDept",
|
title: "menus.hsDept",
|
||||||
roles: ["admin"]
|
roles: ["admin"]
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/system/dict",
|
|
||||||
component: "/system/dict/index",
|
|
||||||
name: "Dict",
|
|
||||||
meta: {
|
|
||||||
icon: "dict",
|
|
||||||
title: "menus.hsDict",
|
|
||||||
keepAlive: true,
|
|
||||||
roles: ["admin"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
34
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-pure-admin",
|
"name": "vue-pure-admin",
|
||||||
"version": "3.8.0",
|
"version": "3.9.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||||
@@ -34,11 +34,10 @@
|
|||||||
"@howdyjs/mouse-menu": "^2.0.5",
|
"@howdyjs/mouse-menu": "^2.0.5",
|
||||||
"@logicflow/core": "^1.1.30",
|
"@logicflow/core": "^1.1.30",
|
||||||
"@logicflow/extension": "^1.1.30",
|
"@logicflow/extension": "^1.1.30",
|
||||||
"@pureadmin/components": "^1.1.0",
|
|
||||||
"@pureadmin/descriptions": "^1.1.0",
|
"@pureadmin/descriptions": "^1.1.0",
|
||||||
"@pureadmin/table": "^1.8.0",
|
"@pureadmin/table": "^1.8.3",
|
||||||
"@pureadmin/utils": "^1.6.7",
|
"@pureadmin/utils": "^1.7.4",
|
||||||
"@vueuse/core": "^9.5.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",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
@@ -49,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",
|
||||||
@@ -57,44 +56,37 @@
|
|||||||
"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.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",
|
|
||||||
"xe-utils": "^3.5.7",
|
|
||||||
"xgplayer": "^2.32.1",
|
"xgplayer": "^2.32.1",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "13.1.0",
|
"@commitlint/cli": "13.1.0",
|
||||||
"@commitlint/config-conventional": "13.1.0",
|
"@commitlint/config-conventional": "13.1.0",
|
||||||
"@faker-js/faker": "^7.5.0",
|
|
||||||
"@iconify-icons/carbon": "^1.2.8",
|
|
||||||
"@iconify-icons/ep": "^1.2.7",
|
"@iconify-icons/ep": "^1.2.7",
|
||||||
"@iconify-icons/fa": "^1.2.3",
|
|
||||||
"@iconify-icons/fa-solid": "^1.2.3",
|
|
||||||
"@iconify-icons/fluent": "^1.2.16",
|
|
||||||
"@iconify-icons/mdi": "^1.2.8",
|
"@iconify-icons/mdi": "^1.2.8",
|
||||||
"@iconify-icons/ri": "^1.2.3",
|
"@iconify-icons/ri": "^1.2.3",
|
||||||
"@iconify-icons/uil": "^1.2.2",
|
|
||||||
"@iconify/vue": "^4.0.0",
|
"@iconify/vue": "^4.0.0",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
||||||
"@pureadmin/theme": "^2.4.0",
|
"@pureadmin/theme": "^2.4.0",
|
||||||
@@ -115,14 +107,12 @@
|
|||||||
"@vitejs/plugin-vue-jsx": "^2.1.1",
|
"@vitejs/plugin-vue-jsx": "^2.1.1",
|
||||||
"@vue/eslint-config-prettier": "^7.0.0",
|
"@vue/eslint-config-prettier": "^7.0.0",
|
||||||
"@vue/eslint-config-typescript": "^11.0.2",
|
"@vue/eslint-config-typescript": "^11.0.2",
|
||||||
"@vue/runtime-core": "^3.2.45",
|
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"cloc": "^2.10.0",
|
"cloc": "^2.10.0",
|
||||||
"cssnano": "^5.1.14",
|
"cssnano": "^5.1.14",
|
||||||
"eslint": "^8.8.0",
|
"eslint": "^8.8.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-vue": "^9.7.0",
|
"eslint-plugin-vue": "^9.7.0",
|
||||||
"font-awesome": "^4.7.0",
|
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"lint-staged": "11.1.2",
|
"lint-staged": "11.1.2",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
@@ -146,7 +136,7 @@
|
|||||||
"tailwindcss": "^3.2.4",
|
"tailwindcss": "^3.2.4",
|
||||||
"terser": "^5.15.1",
|
"terser": "^5.15.1",
|
||||||
"typescript": "^4.9.3",
|
"typescript": "^4.9.3",
|
||||||
"unplugin-vue-macros": "^0.16.3",
|
"unplugin-vue-define-options": "^1.0.0",
|
||||||
"vite": "3.1.8",
|
"vite": "3.1.8",
|
||||||
"vite-plugin-cdn-import": "^0.3.5",
|
"vite-plugin-cdn-import": "^0.3.5",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
|
|||||||
1158
pnpm-lock.yaml
generated
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "3.8.0",
|
"Version": "3.9.4",
|
||||||
"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": {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="380" data-name="Layer 1" viewBox="0 0 896 529.113"><path fill="#3f3d56" d="M674.067 437.34s-26.377 9.895-38.806 32.944-6.201 50.525-6.201 50.525 26.378-9.895 38.806-32.944 6.201-50.524 6.201-50.524Z"/><path fill="#5392f0" d="M709.5 471.71s-8.642 26.813-31.08 40.313-50.177 8.573-50.177 8.573 8.642-26.814 31.08-40.314 50.177-8.573 50.177-8.573Z"/><path fill="#2f2e41" d="M0 527.113h896v2H0zM361.872 435.088a95.444 95.444 0 0 1-35.748-14.447l1.182-1.613a93.363 93.363 0 0 0 34.999 14.105c18.932 3.402 47.26 1.732 74.707-25.527 53.414-53.048 104.393-58.39 104.902-58.438l.186 1.992c-.501.047-50.768 5.317-103.678 57.866-21.613 21.464-43.792 27.402-61.718 27.402a83.5 83.5 0 0 1-14.832-1.34Z"/><circle cx="515.153" cy="381.113" r="12" fill="#2f2e41"/><circle cx="430.153" cy="437.113" r="12" fill="#2f2e41"/><path fill="#3f3d56" d="M683.5 528.113s-17.462-5.413-52.261-10.842l.761-10.658c6-60-34-150-34-150a401.561 401.561 0 0 1 21.47 139.024c-5.338-9.312-15.65-19.358-35.47-25.524 0 0 25.778 22.106 33.16 45.102a997.84 997.84 0 0 0-102.023-8.216L524 486.613l-17 17s-7-51-22-53l11 50s-13-10-16-9l7.397 14.795c-49.819-.517-109.084 1.735-177.765 8.952L318 496.113l-17 17s-7-51-22-53l11 50s-13-10-16-9l8.643 17.286q-33.667 4.004-70.143 9.714Z"/><path fill="#a0616a" d="M407.648 44.491c-10.9 11.748 17.598 40.26 17.598 40.26s-57.707 9.73-53.128 9.14 2.206-49.131 2.206-49.131 44.224-12.017 33.324-.269Z"/><path fill="#2f2e41" d="m447.812 170.222-50.139 25.614-27.23 15.606s-32.098 40.432-38.086 64.393 25.93 68.247 29.543 72.823a54.36 54.36 0 0 1 4.99 7.423c1.247 1.856 12.029-.54 23.803-3.065s-1.563-19.964-1.563-19.964-15.027-38.395-16.147-39.26c-1.045-.806-4.6-7.446-2.043-10.352a25.95 25.95 0 0 0 5.445-8.898 30.09 30.09 0 0 1 4.187-7.942s45.361-36.836 59.528-49.378 51.83-4.658 51.83-4.658-17.782 68.2-22.23 72.806-4.93 8.7-2.916 16.507 28.282.391 28.282.391l9.7-26.455s15.749-34.293 24.3-69.675c4.275-17.691-3.889-28.235-13.121-34.356a41.39 41.39 0 0 0-30.03-5.977l-46.349 8.13 32.147-13.849Z"/><path fill="#a0616a" d="m262.878 104.304-59.854-18.506s-24.18-31.167-12.789-36.667 25.652 26.944 25.652 26.944l41.686 2.698ZM514.494 71.9l53.212-33.068S583.2 2.556 570.787.122 552.8 32.685 552.8 32.685l-39.642 13.171Z"/><path fill="#5392f0" d="m524.453 34.513 1.014 39.192L435.78 89.73c13.192 28.224 9.84 60.346 43.047 74.425L366.903 218.9c4.987-43.038-15.818-75.456-35.263-115.759-23.686-8.586-51.196-2.29-80.337 10.346l-5.237-40.664 123.879-8.896 20.348 7.78 21.819-9.177c32.067-9.528 78.109-27.641 112.341-28.017Z"/><path fill="#2f2e41" d="M468.64 300.63c-2.72 2.367-5.252 21.85-5.35 28.92s9.212 8.897 14.299 9.25 4.478 3.456 7.837 6.048 14.396 2.18 28.89-2.712-9.753-20.926-11.864-21.662-11-22.782-11-22.782-20.092.571-22.812 2.938ZM389.368 345.12c3.23 1.6 10.617 19.806 12.503 26.621s-6.657 10.94-11.489 12.57-3.456 4.479-6.048 7.837-13.375 5.756-28.635 4.696 4.133-22.714 5.988-23.96 4.87-24.826 4.87-24.826 19.58-4.538 22.811-2.938Z"/><circle cx="389.471" cy="35.429" r="23.996" fill="#a0616a"/><path fill="#2f2e41" d="M361.734 33.022a22.827 22.827 0 0 1-.833-18.593c2.359-5.815 7.591-11.655 18.873-13.4 24.614-3.805 37.712 13.436 37.024 19.075s-3.993 19.27-3.993 19.27 1.476-12.906-4.858-13.362-30.902-2.378-37.123 4.145a14.233 14.233 0 0 0-3.71 13.83Z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
@@ -1,15 +1,12 @@
|
|||||||
import iconifyIconOffline from "./src/iconifyIconOffline";
|
import iconifyIconOffline from "./src/iconifyIconOffline";
|
||||||
import iconifyIconOnline from "./src/iconifyIconOnline";
|
import iconifyIconOnline from "./src/iconifyIconOnline";
|
||||||
import iconSelect from "./src/Select.vue";
|
|
||||||
import fontIcon from "./src/iconfont";
|
import fontIcon from "./src/iconfont";
|
||||||
|
|
||||||
/** 本地图标组件 */
|
/** 本地图标组件 */
|
||||||
const IconifyIconOffline = iconifyIconOffline;
|
const IconifyIconOffline = iconifyIconOffline;
|
||||||
/** 在线图标组件 */
|
/** 在线图标组件 */
|
||||||
const IconifyIconOnline = iconifyIconOnline;
|
const IconifyIconOnline = iconifyIconOnline;
|
||||||
/** 图标选择器组件 */
|
|
||||||
const IconSelect = iconSelect;
|
|
||||||
/** iconfont组件 */
|
/** iconfont组件 */
|
||||||
const FontIcon = fontIcon;
|
const FontIcon = fontIcon;
|
||||||
|
|
||||||
export { IconifyIconOffline, IconifyIconOnline, IconSelect, FontIcon };
|
export { IconifyIconOffline, IconifyIconOnline, FontIcon };
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { cloneDeep } from "lodash-unified";
|
import { cloneDeep } from "lodash-unified";
|
||||||
import { ref, computed, CSSProperties, toRef, watch } from "vue";
|
|
||||||
import { IconJson } from "@/components/ReIcon/data";
|
import { IconJson } from "@/components/ReIcon/data";
|
||||||
|
import { ref, computed, CSSProperties, toRef, watch } from "vue";
|
||||||
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
|
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
|||||||
@@ -34,6 +34,16 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component {
|
|||||||
} else if (typeof icon === "function" || typeof icon?.render === "function") {
|
} else if (typeof icon === "function" || typeof icon?.render === "function") {
|
||||||
// svg
|
// svg
|
||||||
return icon;
|
return icon;
|
||||||
|
} else if (typeof icon === "object") {
|
||||||
|
return defineComponent({
|
||||||
|
name: "OfflineIcon",
|
||||||
|
render() {
|
||||||
|
return h(IconifyIconOffline, {
|
||||||
|
icon: icon,
|
||||||
|
...attrs
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// 通过是否存在 : 符号来判断是在线还是本地图标,存在即是在线图标,反之
|
// 通过是否存在 : 符号来判断是在线还是本地图标,存在即是在线图标,反之
|
||||||
return defineComponent({
|
return defineComponent({
|
||||||
|
|||||||
@@ -1,192 +1,22 @@
|
|||||||
import { h, defineComponent } from "vue";
|
import { h, defineComponent } from "vue";
|
||||||
import { Icon as IconifyIcon, addIcon } from "@iconify/vue/dist/offline";
|
import { Icon as IconifyIcon, addIcon } from "@iconify/vue/dist/offline";
|
||||||
|
|
||||||
// element-plus icon
|
|
||||||
import Check from "@iconify-icons/ep/check";
|
|
||||||
import Menu from "@iconify-icons/ep/menu";
|
|
||||||
import HomeFilled from "@iconify-icons/ep/home-filled";
|
|
||||||
import SetUp from "@iconify-icons/ep/set-up";
|
|
||||||
import Edit from "@iconify-icons/ep/edit";
|
|
||||||
import Lollipop from "@iconify-icons/ep/lollipop";
|
|
||||||
import Link from "@iconify-icons/ep/link";
|
|
||||||
import Position from "@iconify-icons/ep/position";
|
|
||||||
import Histogram from "@iconify-icons/ep/histogram";
|
|
||||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
|
||||||
import Close from "@iconify-icons/ep/close";
|
|
||||||
import CloseBold from "@iconify-icons/ep/close-bold";
|
|
||||||
import Bell from "@iconify-icons/ep/bell";
|
|
||||||
import Guide from "@iconify-icons/ep/guide";
|
|
||||||
import Iphone from "@iconify-icons/ep/iphone";
|
|
||||||
import Location from "@iconify-icons/ep/location";
|
|
||||||
import Tickets from "@iconify-icons/ep/tickets";
|
|
||||||
import OfficeBuilding from "@iconify-icons/ep/office-building";
|
|
||||||
import Notebook from "@iconify-icons/ep/notebook";
|
|
||||||
import Rank from "@iconify-icons/ep/rank";
|
|
||||||
import VideoPlay from "@iconify-icons/ep/video-play";
|
|
||||||
import Monitor from "@iconify-icons/ep/monitor";
|
|
||||||
import Search from "@iconify-icons/ep/search";
|
|
||||||
import Refresh from "@iconify-icons/ep/refresh";
|
|
||||||
import EditPen from "@iconify-icons/ep/edit-pen";
|
|
||||||
import Delete from "@iconify-icons/ep/delete";
|
|
||||||
import More from "@iconify-icons/ep/more-filled";
|
|
||||||
import EpArrowDown from "@iconify-icons/ep/arrow-down";
|
|
||||||
import ArrowUp from "@iconify-icons/ep/arrow-up";
|
|
||||||
import ArrowRight from "@iconify-icons/ep/arrow-right";
|
|
||||||
import ArrowLeft from "@iconify-icons/ep/arrow-left";
|
|
||||||
addIcon("check", Check);
|
|
||||||
addIcon("menu", Menu);
|
|
||||||
addIcon("home-filled", HomeFilled);
|
|
||||||
addIcon("set-up", SetUp);
|
|
||||||
addIcon("edit", Edit);
|
|
||||||
addIcon("lollipop", Lollipop);
|
|
||||||
addIcon("link", Link);
|
|
||||||
addIcon("position", Position);
|
|
||||||
addIcon("histogram", Histogram);
|
|
||||||
addIcon("refresh-right", RefreshRight);
|
|
||||||
addIcon("close", Close);
|
|
||||||
addIcon("close-bold", CloseBold);
|
|
||||||
addIcon("bell", Bell);
|
|
||||||
addIcon("guide", Guide);
|
|
||||||
addIcon("iphone", Iphone);
|
|
||||||
addIcon("location", Location);
|
|
||||||
addIcon("tickets", Tickets);
|
|
||||||
addIcon("office-building", OfficeBuilding);
|
|
||||||
addIcon("notebook", Notebook);
|
|
||||||
addIcon("video-play", VideoPlay);
|
|
||||||
addIcon("rank", Rank);
|
|
||||||
addIcon("monitor", Monitor);
|
|
||||||
addIcon("search", Search);
|
|
||||||
addIcon("refresh", Refresh);
|
|
||||||
addIcon("edits", EditPen);
|
|
||||||
addIcon("delete", Delete);
|
|
||||||
addIcon("more", More);
|
|
||||||
addIcon("ep-arrow-down", EpArrowDown);
|
|
||||||
addIcon("ep-arrow-up", ArrowUp);
|
|
||||||
addIcon("ep-arrow-right", ArrowRight);
|
|
||||||
addIcon("ep-arrow-left", ArrowLeft);
|
|
||||||
|
|
||||||
// remixicon
|
|
||||||
import ArrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
|
|
||||||
import ArrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
|
|
||||||
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
|
||||||
import NodeTree from "@iconify-icons/ri/node-tree";
|
|
||||||
import UbuntuFill from "@iconify-icons/ri/ubuntu-fill";
|
|
||||||
import QuestionLine from "@iconify-icons/ri/question-line";
|
|
||||||
import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line";
|
|
||||||
import InformationLine from "@iconify-icons/ri/information-line";
|
|
||||||
import CloseCircleLine from "@iconify-icons/ri/close-circle-line";
|
|
||||||
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
|
|
||||||
import ArrowDownLine from "@iconify-icons/ri/arrow-down-line";
|
|
||||||
import Bookmark2Line from "@iconify-icons/ri/bookmark-2-line";
|
|
||||||
import AddFill from "@iconify-icons/ri/add-circle-line";
|
|
||||||
import AddLine from "@iconify-icons/ri/add-line";
|
|
||||||
import ListCheck from "@iconify-icons/ri/list-check";
|
|
||||||
import More2Fill from "@iconify-icons/ri/more-2-fill";
|
|
||||||
import Database from "@iconify-icons/ri/database-2-line";
|
|
||||||
import Dict from "@iconify-icons/ri/git-repository-line";
|
|
||||||
import Card from "@iconify-icons/ri/bank-card-line";
|
|
||||||
import Reset from "@iconify-icons/ri/restart-line";
|
|
||||||
import Dept from "@iconify-icons/ri/git-branch-line";
|
|
||||||
import Password from "@iconify-icons/ri/lock-password-line";
|
|
||||||
import Ppt from "@iconify-icons/ri/file-ppt-2-line";
|
|
||||||
import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line";
|
|
||||||
import User from "@iconify-icons/ri/user-3-fill";
|
|
||||||
import Lock from "@iconify-icons/ri/lock-fill";
|
|
||||||
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
|
||||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
|
||||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
|
||||||
import ArrowDown from "@iconify-icons/ri/arrow-down-s-line";
|
|
||||||
import CloseLeftTags from "@iconify-icons/ri/text-direction-r";
|
|
||||||
import CloseRightTags from "@iconify-icons/ri/text-direction-l";
|
|
||||||
import CloseOtherTags from "@iconify-icons/ri/text-spacing";
|
|
||||||
import CloseAllTags from "@iconify-icons/ri/subtract-line";
|
|
||||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
|
||||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
|
||||||
addIcon("arrow-right-s-line", ArrowRightSLine);
|
|
||||||
addIcon("arrow-left-s-line", ArrowLeftSLine);
|
|
||||||
addIcon("logout-circle-r-line", LogoutCircleRLine);
|
|
||||||
addIcon("node-tree", NodeTree);
|
|
||||||
addIcon("ubuntu-fill", UbuntuFill);
|
|
||||||
addIcon("question-line", QuestionLine);
|
|
||||||
addIcon("checkbox-circle-line", CheckboxCircleLine);
|
|
||||||
addIcon("information-line", InformationLine);
|
|
||||||
addIcon("close-circle-line", CloseCircleLine);
|
|
||||||
addIcon("arrow-up-line", ArrowUpLine);
|
|
||||||
addIcon("arrow-down-line", ArrowDownLine);
|
|
||||||
addIcon("bookmark-2-line", Bookmark2Line);
|
|
||||||
addIcon("add", AddFill);
|
|
||||||
addIcon("add-line", AddLine);
|
|
||||||
addIcon("list-check", ListCheck);
|
|
||||||
addIcon("more-vertical", More2Fill);
|
|
||||||
addIcon("database", Database);
|
|
||||||
addIcon("dict", Dict);
|
|
||||||
addIcon("card", Card);
|
|
||||||
addIcon("reset", Reset);
|
|
||||||
addIcon("dept", Dept);
|
|
||||||
addIcon("password", Password);
|
|
||||||
addIcon("ppt", Ppt);
|
|
||||||
addIcon("terminal-window-line", TerminalWindowLine);
|
|
||||||
addIcon("user", User);
|
|
||||||
addIcon("lock", Lock);
|
|
||||||
addIcon("menu-unfold", MenuUnfold);
|
|
||||||
addIcon("menu-fold", MenuFold);
|
|
||||||
addIcon("setting", Setting);
|
|
||||||
addIcon("arrow-down", ArrowDown);
|
|
||||||
addIcon("close-left-tags", CloseLeftTags);
|
|
||||||
addIcon("close-right-tags", CloseRightTags);
|
|
||||||
addIcon("close-other-tags", CloseOtherTags);
|
|
||||||
addIcon("close-all-tags", CloseAllTags);
|
|
||||||
addIcon("fullscreen", Fullscreen);
|
|
||||||
addIcon("exit-fullscreen", ExitFullscreen);
|
|
||||||
|
|
||||||
// Font Awesome 4
|
|
||||||
import FaUser from "@iconify-icons/fa/user";
|
|
||||||
import FaLock from "@iconify-icons/fa/lock";
|
|
||||||
import FaSignOut from "@iconify-icons/fa/sign-out";
|
|
||||||
addIcon("fa-user", FaUser);
|
|
||||||
addIcon("fa-lock", FaLock);
|
|
||||||
addIcon("fa-sign-out", FaSignOut);
|
|
||||||
|
|
||||||
// Unicons
|
|
||||||
import Import from "@iconify-icons/uil/import";
|
|
||||||
import Export from "@iconify-icons/uil/export";
|
|
||||||
import ArrowsShrinkV from "@iconify-icons/uil/arrows-shrink-v";
|
|
||||||
addIcon("import", Import);
|
|
||||||
addIcon("export", Export);
|
|
||||||
addIcon("density", ArrowsShrinkV);
|
|
||||||
|
|
||||||
// fluent
|
|
||||||
import Role from "@iconify-icons/fluent/people-swap-28-filled";
|
|
||||||
import FlUser from "@iconify-icons/fluent/person-12-filled";
|
|
||||||
addIcon("role", Role);
|
|
||||||
addIcon("flUser", FlUser);
|
|
||||||
|
|
||||||
// Material Design Icons
|
|
||||||
import Expand from "@iconify-icons/mdi/arrow-expand-down";
|
|
||||||
import UnExpand from "@iconify-icons/mdi/arrow-expand-right";
|
|
||||||
addIcon("expand", Expand);
|
|
||||||
addIcon("unExpand", UnExpand);
|
|
||||||
|
|
||||||
// carbon
|
|
||||||
import LocationCompany from "@iconify-icons/carbon/location-company";
|
|
||||||
addIcon("location-company", LocationCompany);
|
|
||||||
|
|
||||||
// Iconify Icon在Vue里本地使用(用于内网环境)https://docs.iconify.design/icon-components/vue/offline.html
|
// Iconify Icon在Vue里本地使用(用于内网环境)https://docs.iconify.design/icon-components/vue/offline.html
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "IconifyIconOffline",
|
name: "IconifyIconOffline",
|
||||||
components: { IconifyIcon },
|
components: { IconifyIcon },
|
||||||
props: {
|
props: {
|
||||||
icon: {
|
icon: {
|
||||||
type: String,
|
default: null
|
||||||
default: ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
if (typeof this.icon === "object") addIcon(this.icon, this.icon);
|
||||||
const attrs = this.$attrs;
|
const attrs = this.$attrs;
|
||||||
return h(
|
return h(
|
||||||
IconifyIcon,
|
IconifyIcon,
|
||||||
{
|
{
|
||||||
icon: `${this.icon}`,
|
icon: this.icon,
|
||||||
style: attrs?.style
|
style: attrs?.style
|
||||||
? Object.assign(attrs.style, { outline: "none" })
|
? Object.assign(attrs.style, { outline: "none" })
|
||||||
: { outline: "none" },
|
: { outline: "none" },
|
||||||
|
|||||||
49
src/components/ReIcon/src/offlineIcon.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
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 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("setting", Setting);
|
||||||
|
addIcon("dept", Dept);
|
||||||
|
addIcon("lollipop", Lollipop);
|
||||||
|
addIcon("monitor", Monitor);
|
||||||
|
|
||||||
|
// 非菜单图标
|
||||||
|
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
||||||
|
addIcon("refreshRight", RefreshRight);
|
||||||
@@ -247,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="refresh-right"
|
icon="refreshRight"
|
||||||
width="30"
|
width="30"
|
||||||
color="var(--el-color-primary)"
|
color="var(--el-color-primary)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { defineComponent, ref, computed, PropType } from "vue";
|
import { defineComponent, ref, computed, PropType } from "vue";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
|
|
||||||
|
import UnExpand from "@iconify-icons/mdi/arrow-expand-right";
|
||||||
import { IconifyIconOffline } from "../../ReIcon";
|
import { IconifyIconOffline } from "../../ReIcon";
|
||||||
|
import Expand from "@iconify-icons/mdi/arrow-expand-down";
|
||||||
|
import ArrowCollapse from "@iconify-icons/mdi/arrow-collapse-vertical";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
|
||||||
export const loadingSvg = `
|
export const loadingSvg = `
|
||||||
<path class="path" d="
|
<path class="path" d="
|
||||||
@@ -105,7 +110,7 @@ export default defineComponent({
|
|||||||
reference: () => (
|
reference: () => (
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
icon="setting"
|
icon={Setting}
|
||||||
width="16"
|
width="16"
|
||||||
color="text_color_regular"
|
color="text_color_regular"
|
||||||
onMouseover={e => (buttonRef.value = e.currentTarget)}
|
onMouseover={e => (buttonRef.value = e.currentTarget)}
|
||||||
@@ -135,7 +140,7 @@ export default defineComponent({
|
|||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
icon={isExpandAll.value ? "unExpand" : "expand"}
|
icon={isExpandAll.value ? UnExpand : Expand}
|
||||||
width="16"
|
width="16"
|
||||||
color="text_color_regular"
|
color="text_color_regular"
|
||||||
onClick={() => onExpand()}
|
onClick={() => onExpand()}
|
||||||
@@ -147,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="refresh-right"
|
icon="refreshRight"
|
||||||
width="16"
|
width="16"
|
||||||
color="text_color_regular"
|
color="text_color_regular"
|
||||||
onClick={() => emit("refresh")}
|
onClick={() => emit("refresh")}
|
||||||
@@ -159,7 +164,7 @@ export default defineComponent({
|
|||||||
<el-dropdown v-slots={dropdown} trigger="click">
|
<el-dropdown v-slots={dropdown} trigger="click">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
icon="density"
|
icon={ArrowCollapse}
|
||||||
width="16"
|
width="16"
|
||||||
color="text_color_regular"
|
color="text_color_regular"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import Breadcrumb from "./sidebar/breadCrumb.vue";
|
|||||||
import topCollapse from "./sidebar/topCollapse.vue";
|
import topCollapse from "./sidebar/topCollapse.vue";
|
||||||
import { useTranslationLang } from "../hooks/useTranslationLang";
|
import { useTranslationLang } from "../hooks/useTranslationLang";
|
||||||
import globalization from "@/assets/svg/globalization.svg?component";
|
import globalization from "@/assets/svg/globalization.svg?component";
|
||||||
|
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
import Check from "@iconify-icons/ep/check";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
layout,
|
layout,
|
||||||
@@ -62,7 +65,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
class="check-zh"
|
class="check-zh"
|
||||||
v-show="locale === 'zh'"
|
v-show="locale === 'zh'"
|
||||||
icon="check"
|
:icon="Check"
|
||||||
/>
|
/>
|
||||||
简体中文
|
简体中文
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@@ -72,7 +75,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
@click="translationEn"
|
@click="translationEn"
|
||||||
>
|
>
|
||||||
<span class="check-en" v-show="locale === 'en'">
|
<span class="check-en" v-show="locale === 'en'">
|
||||||
<IconifyIconOffline icon="check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
</span>
|
</span>
|
||||||
English
|
English
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@@ -92,7 +95,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
<el-dropdown-menu class="logout">
|
<el-dropdown-menu class="logout">
|
||||||
<el-dropdown-item @click="logout">
|
<el-dropdown-item @click="logout">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
icon="logout-circle-r-line"
|
:icon="LogoutCircleRLine"
|
||||||
style="margin: 5px"
|
style="margin: 5px"
|
||||||
/>
|
/>
|
||||||
{{ t("buttons.hsLoginOut") }}
|
{{ t("buttons.hsLoginOut") }}
|
||||||
@@ -105,7 +108,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
:title="t('buttons.hssystemSet')"
|
:title="t('buttons.hssystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,62 +2,45 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { noticesData } from "./data";
|
import { noticesData } from "./data";
|
||||||
import NoticeList from "./noticeList.vue";
|
import NoticeList from "./noticeList.vue";
|
||||||
import { Tabs, TabPane } from "@pureadmin/components";
|
import Bell from "@iconify-icons/ep/bell";
|
||||||
|
|
||||||
const dropdownDom = ref();
|
|
||||||
const activeKey = ref(noticesData[0].key);
|
|
||||||
|
|
||||||
const notices = ref(noticesData);
|
|
||||||
|
|
||||||
const noticesNum = ref(0);
|
const noticesNum = ref(0);
|
||||||
notices.value.forEach(notice => {
|
const notices = ref(noticesData);
|
||||||
noticesNum.value += notice.list.length;
|
const activeKey = ref(noticesData[0].key);
|
||||||
});
|
|
||||||
|
|
||||||
function tabClick() {
|
notices.value.map(v => (noticesNum.value += v.list.length));
|
||||||
(dropdownDom as any).value.handleOpen();
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown ref="dropdownDom" trigger="click" placement="bottom-end">
|
<el-dropdown trigger="click" placement="bottom-end">
|
||||||
<span class="dropdown-badge navbar-bg-hover select-none">
|
<span class="dropdown-badge navbar-bg-hover select-none">
|
||||||
<el-badge :value="noticesNum" :max="99">
|
<el-badge :value="noticesNum" :max="99">
|
||||||
<span class="header-notice-icon">
|
<span class="header-notice-icon">
|
||||||
<IconifyIconOffline icon="bell" />
|
<IconifyIconOffline :icon="Bell" />
|
||||||
</span>
|
</span>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<Tabs
|
<el-tabs :stretch="true" v-model="activeKey" class="dropdown-tabs">
|
||||||
centered
|
|
||||||
class="dropdown-tabs"
|
|
||||||
:tabBarStyle="{ marginLeft: notices?.length > 4 ? '8px' : '0' }"
|
|
||||||
v-model:activeKey="activeKey"
|
|
||||||
@tabClick="tabClick"
|
|
||||||
>
|
|
||||||
<template v-for="item in notices" :key="item.key">
|
<template v-for="item in notices" :key="item.key">
|
||||||
<TabPane :tab="`${item.name}(${item.list.length})`">
|
<el-tab-pane
|
||||||
|
:label="`${item.name}(${item.list.length})`"
|
||||||
|
:name="`${item.key}`"
|
||||||
|
>
|
||||||
<el-scrollbar max-height="330px">
|
<el-scrollbar max-height="330px">
|
||||||
<div class="noticeList-container">
|
<div class="noticeList-container">
|
||||||
<NoticeList :list="item.list" />
|
<NoticeList :list="item.list" />
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</TabPane>
|
</el-tab-pane>
|
||||||
</template>
|
</template>
|
||||||
</Tabs>
|
</el-tabs>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
|
||||||
.ant-tabs-dropdown {
|
|
||||||
z-index: 2900 !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.dropdown-badge {
|
.dropdown-badge {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -73,30 +56,28 @@ function tabClick() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-tabs {
|
.dropdown-tabs {
|
||||||
width: 336px;
|
width: 330px;
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
|
.noticeList-container {
|
||||||
border-radius: 4px;
|
padding: 15px 24px 0 24px;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__header) {
|
:deep(.el-tabs__header) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__nav-scroll) {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-tabs__nav-wrap)::after {
|
:deep(.el-tabs__nav-wrap)::after {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.noticeList-container) {
|
// 如果上面的 notices 长度大于 3 请注释掉下面代码
|
||||||
padding: 15px 24px 0 24px;
|
:deep(.el-tabs__nav-wrap) {
|
||||||
|
padding: 0 36px 0 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果上面的 notices 长度大于 3 请注释掉下面代码
|
||||||
|
:deep(.el-tabs__active-bar) {
|
||||||
|
margin: 0 36px 0 36px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ant-tabs-nav) {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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,10 +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";
|
||||||
|
|
||||||
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;
|
||||||
@@ -22,10 +39,12 @@ 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"
|
||||||
icon="close"
|
width="20px"
|
||||||
|
height="20px"
|
||||||
|
:icon="Close"
|
||||||
@click="show = !show"
|
@click="show = !show"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
@@ -68,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,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) {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
确认
|
确认
|
||||||
</span>
|
</span>
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<IconifyIconOffline icon="arrow-up-line" class="icon" />
|
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
|
||||||
<IconifyIconOffline icon="arrow-down-line" class="icon" />
|
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
|
||||||
切换
|
切换
|
||||||
</span>
|
</span>
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
|
||||||
|
import ArrowDownLine from "@iconify-icons/ri/arrow-down-line";
|
||||||
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { transformI18n } from "@/plugins/i18n";
|
|||||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||||
import { ref, watch, computed, nextTick, shallowRef } from "vue";
|
import { ref, watch, computed, nextTick, shallowRef } from "vue";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
|
import Search from "@iconify-icons/ep/search";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 弹窗显隐 */
|
/** 弹窗显隐 */
|
||||||
@@ -148,7 +149,7 @@ onKeyStroke("ArrowDown", handleDown);
|
|||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<span class="el-input__icon">
|
<span class="el-input__icon">
|
||||||
<IconifyIconOffline icon="search" />
|
<IconifyIconOffline :icon="Search" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useI18n } from "vue-i18n";
|
|||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||||
|
import Bookmark2Line from "@iconify-icons/ri/bookmark-2-line";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ function handleTo() {
|
|||||||
@click="handleTo"
|
@click="handleTo"
|
||||||
@mouseenter="handleMouse(item)"
|
@mouseenter="handleMouse(item)"
|
||||||
>
|
>
|
||||||
<component :is="useRenderIcon(item.meta?.icon ?? 'bookmark-2-line')" />
|
<component :is="useRenderIcon(item.meta?.icon ?? Bookmark2Line)" />
|
||||||
<span class="result-item-title">{{ t(item.meta?.title) }}</span>
|
<span class="result-item-title">{{ t(item.meta?.title) }}</span>
|
||||||
<enterOutlined />
|
<enterOutlined />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { SearchModal } from "./components";
|
import { SearchModal } from "./components";
|
||||||
import { useBoolean } from "../../hooks/useBoolean";
|
import { useBoolean } from "../../hooks/useBoolean";
|
||||||
|
import Search from "@iconify-icons/ep/search";
|
||||||
|
|
||||||
const { bool: show, toggle } = useBoolean();
|
const { bool: show, toggle } = useBoolean();
|
||||||
function handleSearch() {
|
function handleSearch() {
|
||||||
toggle();
|
toggle();
|
||||||
@@ -12,7 +14,7 @@ function handleSearch() {
|
|||||||
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
||||||
@click="handleSearch"
|
@click="handleSearch"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="search" />
|
<IconifyIconOffline :icon="Search" />
|
||||||
</div>
|
</div>
|
||||||
<SearchModal v-model:value="show" />
|
<SearchModal v-model:value="show" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -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,24 +24,18 @@ 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";
|
||||||
|
import Check from "@iconify-icons/ep/check";
|
||||||
|
import Logout from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { device } = useNav();
|
|
||||||
const { 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();
|
||||||
@@ -42,7 +43,6 @@ const verticalRef = ref();
|
|||||||
const horizontalRef = ref();
|
const horizontalRef = ref();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
body,
|
|
||||||
dataTheme,
|
dataTheme,
|
||||||
layoutTheme,
|
layoutTheme,
|
||||||
themeColors,
|
themeColors,
|
||||||
@@ -160,32 +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 }) => {
|
|
||||||
/* 设置wangeditorV5主题色 */
|
|
||||||
body.style.setProperty("--w-e-toolbar-active-color", layout["epThemeColor"]);
|
|
||||||
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 => {
|
||||||
@@ -219,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>
|
||||||
|
|
||||||
@@ -244,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')"
|
||||||
>
|
>
|
||||||
@@ -257,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')"
|
||||||
>
|
>
|
||||||
@@ -273,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')"
|
||||||
>
|
>
|
||||||
@@ -302,7 +312,7 @@ nextTick(() => {
|
|||||||
:size="17"
|
:size="17"
|
||||||
:color="getThemeColor(item.themeColor)"
|
:color="getThemeColor(item.themeColor)"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -383,7 +393,7 @@ nextTick(() => {
|
|||||||
@click="onReset"
|
@click="onReset"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
icon="fa-sign-out"
|
:icon="Logout"
|
||||||
width="15"
|
width="15"
|
||||||
height="15"
|
height="15"
|
||||||
style="margin-right: 4px"
|
style="margin-right: 4px"
|
||||||
@@ -393,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%;
|
||||||
|
|
||||||
@@ -411,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>
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import { useNav } from "@/layout/hooks/useNav";
|
|||||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import globalization from "@/assets/svg/globalization.svg?component";
|
import globalization from "@/assets/svg/globalization.svg?component";
|
||||||
|
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
import Check from "@iconify-icons/ep/check";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
|
|
||||||
@@ -38,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>
|
||||||
@@ -76,7 +82,7 @@ watch(
|
|||||||
@click="translationCh"
|
@click="translationCh"
|
||||||
>
|
>
|
||||||
<span class="check-zh" v-show="locale === 'zh'">
|
<span class="check-zh" v-show="locale === 'zh'">
|
||||||
<IconifyIconOffline icon="check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
</span>
|
</span>
|
||||||
简体中文
|
简体中文
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@@ -86,7 +92,7 @@ watch(
|
|||||||
@click="translationEn"
|
@click="translationEn"
|
||||||
>
|
>
|
||||||
<span class="check-en" v-show="locale === 'en'">
|
<span class="check-en" v-show="locale === 'en'">
|
||||||
<IconifyIconOffline icon="check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
</span>
|
</span>
|
||||||
English
|
English
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@@ -106,7 +112,7 @@ watch(
|
|||||||
<el-dropdown-menu class="logout">
|
<el-dropdown-menu class="logout">
|
||||||
<el-dropdown-item @click="logout">
|
<el-dropdown-item @click="logout">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
icon="logout-circle-r-line"
|
:icon="LogoutCircleRLine"
|
||||||
style="margin: 5px"
|
style="margin: 5px"
|
||||||
/>
|
/>
|
||||||
{{ t("buttons.hsLoginOut") }}
|
{{ t("buttons.hsLoginOut") }}
|
||||||
@@ -119,13 +125,17 @@ watch(
|
|||||||
:title="t('buttons.hssystemSet')"
|
:title="t('buttons.hssystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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,5 +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";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
@@ -8,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;
|
||||||
@@ -23,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 ? 'menu-fold' : 'menu-unfold'"
|
: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>
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ import { getParentPaths, findRouteByPath } from "@/router/utils";
|
|||||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import globalization from "@/assets/svg/globalization.svg?component";
|
import globalization from "@/assets/svg/globalization.svg?component";
|
||||||
|
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||||
|
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||||
|
import Check from "@iconify-icons/ep/check";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
const defaultActive = ref(null);
|
const defaultActive = ref(null);
|
||||||
@@ -55,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"
|
||||||
@@ -108,7 +115,7 @@ watch(
|
|||||||
@click="translationCh"
|
@click="translationCh"
|
||||||
>
|
>
|
||||||
<span class="check-zh" v-show="locale === 'zh'">
|
<span class="check-zh" v-show="locale === 'zh'">
|
||||||
<IconifyIconOffline icon="check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
</span>
|
</span>
|
||||||
简体中文
|
简体中文
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@@ -118,7 +125,7 @@ watch(
|
|||||||
@click="translationEn"
|
@click="translationEn"
|
||||||
>
|
>
|
||||||
<span class="check-en" v-show="locale === 'en'">
|
<span class="check-en" v-show="locale === 'en'">
|
||||||
<IconifyIconOffline icon="check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
</span>
|
</span>
|
||||||
English
|
English
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@@ -138,7 +145,7 @@ watch(
|
|||||||
<el-dropdown-menu class="logout">
|
<el-dropdown-menu class="logout">
|
||||||
<el-dropdown-item @click="logout">
|
<el-dropdown-item @click="logout">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
icon="logout-circle-r-line"
|
:icon="LogoutCircleRLine"
|
||||||
style="margin: 5px"
|
style="margin: 5px"
|
||||||
/>
|
/>
|
||||||
{{ t("buttons.hsLoginOut") }}
|
{{ t("buttons.hsLoginOut") }}
|
||||||
@@ -151,13 +158,17 @@ watch(
|
|||||||
:title="t('buttons.hssystemSet')"
|
:title="t('buttons.hssystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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;
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ import { transformI18n } from "@/plugins/i18n";
|
|||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import { ref, toRaw, PropType, nextTick, computed, CSSProperties } from "vue";
|
import { ref, toRaw, PropType, nextTick, computed, CSSProperties } from "vue";
|
||||||
|
|
||||||
const { layout, isCollapse } = useNav();
|
import ArrowUp from "@iconify-icons/ep/arrow-up";
|
||||||
|
import EpArrowDown from "@iconify-icons/ep/arrow-down";
|
||||||
|
import ArrowLeft from "@iconify-icons/ep/arrow-left";
|
||||||
|
import ArrowRight from "@iconify-icons/ep/arrow-right";
|
||||||
|
|
||||||
|
const { layout, isCollapse, tooltipEffect } = useNav();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
@@ -78,7 +83,13 @@ const getSpanStyle = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const expandCloseIcon = computed(() => {
|
const expandCloseIcon = computed(() => {
|
||||||
return getConfig()?.MenuArrowIconNoTransition ? "expand-close-icon" : "";
|
if (!getConfig()?.MenuArrowIconNoTransition) return "";
|
||||||
|
return {
|
||||||
|
"expand-close-icon": useRenderIcon(EpArrowDown),
|
||||||
|
"expand-open-icon": useRenderIcon(ArrowUp),
|
||||||
|
"collapse-close-icon": useRenderIcon(ArrowRight),
|
||||||
|
"collapse-open-icon": useRenderIcon(ArrowLeft)
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const onlyOneChild: childrenType = ref(null);
|
const onlyOneChild: childrenType = ref(null);
|
||||||
@@ -190,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"
|
||||||
>
|
>
|
||||||
@@ -220,11 +232,8 @@ function resolvePath(routePath) {
|
|||||||
<el-sub-menu
|
<el-sub-menu
|
||||||
v-else
|
v-else
|
||||||
ref="subMenu"
|
ref="subMenu"
|
||||||
|
v-bind="expandCloseIcon"
|
||||||
:index="resolvePath(props.item.path)"
|
:index="resolvePath(props.item.path)"
|
||||||
v-bind:[expandCloseIcon]="useRenderIcon('ep-arrow-down')"
|
|
||||||
:expand-open-icon="useRenderIcon('ep-arrow-up')"
|
|
||||||
:collapse-close-icon="useRenderIcon('ep-arrow-right')"
|
|
||||||
:collapse-open-icon="useRenderIcon('ep-arrow-left')"
|
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div v-if="toRaw(props.item.meta.icon)" class="sub-menu-icon">
|
<div v-if="toRaw(props.item.meta.icon)" class="sub-menu-icon">
|
||||||
@@ -238,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) }}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||||
|
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
}
|
}
|
||||||
@@ -23,7 +26,7 @@ const toggleClick = () => {
|
|||||||
@click="toggleClick"
|
@click="toggleClick"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
:icon="props.isActive ? 'menu-fold' : 'menu-unfold'"
|
:icon="props.isActive ? MenuFold : MenuUnfold"
|
||||||
class="inline-block align-middle hover:text-primary dark:hover:!text-white"
|
class="inline-block align-middle hover:text-primary dark:hover:!text-white"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ import { handleAliveRoute, delAliveRoutes } from "@/router/utils";
|
|||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
import { useResizeObserver, useDebounceFn, useFullscreen } from "@vueuse/core";
|
import { useResizeObserver, useDebounceFn, useFullscreen } from "@vueuse/core";
|
||||||
|
|
||||||
|
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||||
|
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||||
|
import ArrowDown from "@iconify-icons/ri/arrow-down-s-line";
|
||||||
|
import ArrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
|
||||||
|
import ArrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
|
||||||
|
import CloseBold from "@iconify-icons/ep/close-bold";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
route,
|
route,
|
||||||
router,
|
router,
|
||||||
@@ -284,10 +291,10 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
|
|||||||
toggle();
|
toggle();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (isFullscreen.value) {
|
if (isFullscreen.value) {
|
||||||
tagsViews[6].icon = "exit-fullscreen";
|
tagsViews[6].icon = ExitFullscreen;
|
||||||
tagsViews[6].text = $t("buttons.hswholeExitFullScreen");
|
tagsViews[6].text = $t("buttons.hswholeExitFullScreen");
|
||||||
} else {
|
} else {
|
||||||
tagsViews[6].icon = "fullscreen";
|
tagsViews[6].icon = Fullscreen;
|
||||||
tagsViews[6].text = $t("buttons.hswholeFullScreen");
|
tagsViews[6].text = $t("buttons.hswholeFullScreen");
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
@@ -297,10 +304,10 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
|
|||||||
onContentFullScreen();
|
onContentFullScreen();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (pureSetting.hiddenSideBar) {
|
if (pureSetting.hiddenSideBar) {
|
||||||
tagsViews[7].icon = "exit-fullscreen";
|
tagsViews[7].icon = ExitFullscreen;
|
||||||
tagsViews[7].text = $t("buttons.hscontentExitFullScreen");
|
tagsViews[7].text = $t("buttons.hscontentExitFullScreen");
|
||||||
} else {
|
} else {
|
||||||
tagsViews[7].icon = "fullscreen";
|
tagsViews[7].icon = Fullscreen;
|
||||||
tagsViews[7].text = $t("buttons.hscontentFullScreen");
|
tagsViews[7].text = $t("buttons.hscontentFullScreen");
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
@@ -496,7 +503,7 @@ onMounted(() => {
|
|||||||
<template>
|
<template>
|
||||||
<div ref="containerDom" class="tags-view" v-if="!showTags">
|
<div ref="containerDom" class="tags-view" v-if="!showTags">
|
||||||
<span v-show="isShowArrow" class="arrow-left">
|
<span v-show="isShowArrow" class="arrow-left">
|
||||||
<IconifyIconOffline icon="arrow-left-s-line" @click="handleScroll(200)" />
|
<IconifyIconOffline :icon="ArrowLeftSLine" @click="handleScroll(200)" />
|
||||||
</span>
|
</span>
|
||||||
<div ref="scrollbarDom" class="scroll-container">
|
<div ref="scrollbarDom" class="scroll-container">
|
||||||
<div class="tab select-none" ref="tabDom" :style="getTabStyle">
|
<div class="tab select-none" ref="tabDom" :style="getTabStyle">
|
||||||
@@ -530,7 +537,7 @@ onMounted(() => {
|
|||||||
class="el-icon-close"
|
class="el-icon-close"
|
||||||
@click.stop="deleteMenu(item)"
|
@click.stop="deleteMenu(item)"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="close-bold" />
|
<IconifyIconOffline :icon="CloseBold" />
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
:ref="'schedule' + index"
|
:ref="'schedule' + index"
|
||||||
@@ -541,10 +548,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span v-show="isShowArrow" class="arrow-right">
|
<span v-show="isShowArrow" class="arrow-right">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline :icon="ArrowRightSLine" @click="handleScroll(-200)" />
|
||||||
icon="arrow-right-s-line"
|
|
||||||
@click="handleScroll(-200)"
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
<!-- 右键菜单按钮 -->
|
<!-- 右键菜单按钮 -->
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
@@ -573,7 +577,7 @@ onMounted(() => {
|
|||||||
@command="handleCommand"
|
@command="handleCommand"
|
||||||
>
|
>
|
||||||
<span class="arrow-down">
|
<span class="arrow-down">
|
||||||
<IconifyIconOffline icon="arrow-down" class="dark:text-white" />
|
<IconifyIconOffline :icon="ArrowDown" class="dark:text-white" />
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { useGlobal } from "@pureadmin/utils";
|
|||||||
import { transformI18n } from "@/plugins/i18n";
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { router, remainingPaths } from "@/router";
|
import { router, remainingPaths } from "@/router";
|
||||||
import { useAppStoreHook } from "@/store/modules/app";
|
import { useAppStoreHook } from "@/store/modules/app";
|
||||||
import { i18nChangeLanguage } from "@wangeditor/editor";
|
|
||||||
import { useUserStoreHook } from "@/store/modules/user";
|
import { useUserStoreHook } from "@/store/modules/user";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
@@ -19,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(() => {
|
||||||
@@ -136,15 +137,6 @@ export function useNav() {
|
|||||||
return remainingPaths.includes(path);
|
return remainingPaths.includes(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 切换wangEditorV5国际化
|
|
||||||
* @param language string 可选值 en、zh-CN
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
function changeWangeditorLanguage(language: string): void {
|
|
||||||
i18nChangeLanguage(language);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
device,
|
device,
|
||||||
@@ -163,8 +155,8 @@ export function useNav() {
|
|||||||
pureApp,
|
pureApp,
|
||||||
username,
|
username,
|
||||||
avatarsStyle,
|
avatarsStyle,
|
||||||
|
tooltipEffect,
|
||||||
getDropdownItemStyle,
|
getDropdownItemStyle,
|
||||||
getDropdownItemClass,
|
getDropdownItemClass
|
||||||
changeWangeditorLanguage
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ import { useSettingStoreHook } from "@/store/modules/settings";
|
|||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
import { storageLocal, toggleClass, hasClass } from "@pureadmin/utils";
|
import { storageLocal, toggleClass, hasClass } from "@pureadmin/utils";
|
||||||
|
|
||||||
|
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||||
|
import CloseAllTags from "@iconify-icons/ri/subtract-line";
|
||||||
|
import CloseOtherTags from "@iconify-icons/ri/text-spacing";
|
||||||
|
import CloseRightTags from "@iconify-icons/ri/text-direction-l";
|
||||||
|
import CloseLeftTags from "@iconify-icons/ri/text-direction-r";
|
||||||
|
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
||||||
|
import Close from "@iconify-icons/ep/close";
|
||||||
|
|
||||||
export function useTags() {
|
export function useTags() {
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -47,56 +55,56 @@ export function useTags() {
|
|||||||
|
|
||||||
const tagsViews = reactive<Array<tagsViewsType>>([
|
const tagsViews = reactive<Array<tagsViewsType>>([
|
||||||
{
|
{
|
||||||
icon: "refresh-right",
|
icon: RefreshRight,
|
||||||
text: $t("buttons.hsreload"),
|
text: $t("buttons.hsreload"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "close",
|
icon: Close,
|
||||||
text: $t("buttons.hscloseCurrentTab"),
|
text: $t("buttons.hscloseCurrentTab"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "close-left-tags",
|
icon: CloseLeftTags,
|
||||||
text: $t("buttons.hscloseLeftTabs"),
|
text: $t("buttons.hscloseLeftTabs"),
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "close-right-tags",
|
icon: CloseRightTags,
|
||||||
text: $t("buttons.hscloseRightTabs"),
|
text: $t("buttons.hscloseRightTabs"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "close-other-tags",
|
icon: CloseOtherTags,
|
||||||
text: $t("buttons.hscloseOtherTabs"),
|
text: $t("buttons.hscloseOtherTabs"),
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: multiTags.value.length > 2 ? false : true,
|
disabled: multiTags.value.length > 2 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "close-all-tags",
|
icon: CloseAllTags,
|
||||||
text: $t("buttons.hscloseAllTabs"),
|
text: $t("buttons.hscloseAllTabs"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "fullscreen",
|
icon: Fullscreen,
|
||||||
text: $t("buttons.hswholeFullScreen"),
|
text: $t("buttons.hswholeFullScreen"),
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "fullscreen",
|
icon: Fullscreen,
|
||||||
text: $t("buttons.hscontentFullScreen"),
|
text: $t("buttons.hscontentFullScreen"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import { useRoute } from "vue-router";
|
|||||||
import { watch, type Ref } from "vue";
|
import { watch, type Ref } from "vue";
|
||||||
|
|
||||||
export function useTranslationLang(ref?: Ref) {
|
export function useTranslationLang(ref?: Ref) {
|
||||||
const { $storage, changeTitle, changeWangeditorLanguage, handleResize } =
|
const { $storage, changeTitle, handleResize } = useNav();
|
||||||
useNav();
|
|
||||||
const { locale, t } = useI18n();
|
const { locale, t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
@@ -25,9 +24,6 @@ export function useTranslationLang(ref?: Ref) {
|
|||||||
() => locale.value,
|
() => locale.value,
|
||||||
() => {
|
() => {
|
||||||
changeTitle(route.meta);
|
changeTitle(route.meta);
|
||||||
locale.value === "en"
|
|
||||||
? changeWangeditorLanguage(locale.value)
|
|
||||||
: changeWangeditorLanguage("zh-CN");
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import "animate.css";
|
||||||
|
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
||||||
|
import "@/components/ReIcon/src/offlineIcon";
|
||||||
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";
|
||||||
|
|||||||
@@ -2,19 +2,14 @@
|
|||||||
* @description ⚠️:此文件仅供主题插件使用,请不要在此文件中导出别的工具函数(仅在页面加载前运行)
|
* @description ⚠️:此文件仅供主题插件使用,请不要在此文件中导出别的工具函数(仅在页面加载前运行)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { EpThemeColor } from "../../../public/serverConfig.json";
|
|
||||||
|
|
||||||
type MultipleScopeVarsItem = {
|
type MultipleScopeVarsItem = {
|
||||||
scopeName: string;
|
scopeName: string;
|
||||||
varsContent: string;
|
varsContent: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 将vxe默认主题色和ep默认主题色保持一致 */
|
|
||||||
const vxeColor = EpThemeColor;
|
|
||||||
/** 预设主题色 */
|
/** 预设主题色 */
|
||||||
const themeColors = {
|
const themeColors = {
|
||||||
default: {
|
default: {
|
||||||
vxeColor,
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#001529",
|
menuBg: "#001529",
|
||||||
menuHover: "#4091f7",
|
menuHover: "#4091f7",
|
||||||
@@ -26,7 +21,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#4091f7"
|
menuActiveBefore: "#4091f7"
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
vxeColor,
|
|
||||||
subMenuActiveText: "#409eff",
|
subMenuActiveText: "#409eff",
|
||||||
menuBg: "#fff",
|
menuBg: "#fff",
|
||||||
menuHover: "#e0ebf6",
|
menuHover: "#e0ebf6",
|
||||||
@@ -38,7 +32,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#4091f7"
|
menuActiveBefore: "#4091f7"
|
||||||
},
|
},
|
||||||
dusk: {
|
dusk: {
|
||||||
vxeColor: "#f5222d",
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#2a0608",
|
menuBg: "#2a0608",
|
||||||
menuHover: "#e13c39",
|
menuHover: "#e13c39",
|
||||||
@@ -50,7 +43,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#e13c39"
|
menuActiveBefore: "#e13c39"
|
||||||
},
|
},
|
||||||
volcano: {
|
volcano: {
|
||||||
vxeColor: "#fa541c",
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#2b0e05",
|
menuBg: "#2b0e05",
|
||||||
menuHover: "#e85f33",
|
menuHover: "#e85f33",
|
||||||
@@ -62,7 +54,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#e85f33"
|
menuActiveBefore: "#e85f33"
|
||||||
},
|
},
|
||||||
yellow: {
|
yellow: {
|
||||||
vxeColor: "#fadb14",
|
|
||||||
subMenuActiveText: "#d25f00",
|
subMenuActiveText: "#d25f00",
|
||||||
menuBg: "#2b2503",
|
menuBg: "#2b2503",
|
||||||
menuHover: "#f6da4d",
|
menuHover: "#f6da4d",
|
||||||
@@ -74,7 +65,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#f6da4d"
|
menuActiveBefore: "#f6da4d"
|
||||||
},
|
},
|
||||||
mingQing: {
|
mingQing: {
|
||||||
vxeColor: "#13c2c2",
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#032121",
|
menuBg: "#032121",
|
||||||
menuHover: "#59bfc1",
|
menuHover: "#59bfc1",
|
||||||
@@ -86,7 +76,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#59bfc1"
|
menuActiveBefore: "#59bfc1"
|
||||||
},
|
},
|
||||||
auroraGreen: {
|
auroraGreen: {
|
||||||
vxeColor: "#52c41a",
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#0b1e15",
|
menuBg: "#0b1e15",
|
||||||
menuHover: "#60ac80",
|
menuHover: "#60ac80",
|
||||||
@@ -98,7 +87,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#60ac80"
|
menuActiveBefore: "#60ac80"
|
||||||
},
|
},
|
||||||
pink: {
|
pink: {
|
||||||
vxeColor: "#eb2f96",
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#28081a",
|
menuBg: "#28081a",
|
||||||
menuHover: "#d84493",
|
menuHover: "#d84493",
|
||||||
@@ -110,7 +98,6 @@ const themeColors = {
|
|||||||
menuActiveBefore: "#d84493"
|
menuActiveBefore: "#d84493"
|
||||||
},
|
},
|
||||||
saucePurple: {
|
saucePurple: {
|
||||||
vxeColor: "#722ed1",
|
|
||||||
subMenuActiveText: "#fff",
|
subMenuActiveText: "#fff",
|
||||||
menuBg: "#130824",
|
menuBg: "#130824",
|
||||||
menuHover: "#693ac9",
|
menuHover: "#693ac9",
|
||||||
@@ -132,7 +119,6 @@ export const genScssMultipleScopeVars = (): MultipleScopeVarsItem[] => {
|
|||||||
result.push({
|
result.push({
|
||||||
scopeName: `layout-theme-${key}`,
|
scopeName: `layout-theme-${key}`,
|
||||||
varsContent: `
|
varsContent: `
|
||||||
$vxe-primary-color: ${themeColors[key].vxeColor} !default;
|
|
||||||
$subMenuActiveText: ${themeColors[key].subMenuActiveText} !default;
|
$subMenuActiveText: ${themeColors[key].subMenuActiveText} !default;
|
||||||
$menuBg: ${themeColors[key].menuBg} !default;
|
$menuBg: ${themeColors[key].menuBg} !default;
|
||||||
$menuHover: ${themeColors[key].menuHover} !default;
|
$menuHover: ${themeColors[key].menuHover} !default;
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
|
import type { IconifyIcon } from "@iconify/vue";
|
||||||
|
|
||||||
export const routerArrays: Array<RouteConfigs> = [
|
export const routerArrays: Array<RouteConfigs> = [
|
||||||
{
|
{
|
||||||
path: "/welcome",
|
path: "/welcome",
|
||||||
parentPath: "/",
|
parentPath: "/",
|
||||||
meta: {
|
meta: {
|
||||||
title: "menus.hshome",
|
title: "menus.hshome",
|
||||||
icon: "home-filled"
|
icon: "homeFilled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export type routeMetaType = {
|
export type routeMetaType = {
|
||||||
title?: string;
|
title?: string;
|
||||||
icon?: string;
|
icon?: string | IconifyIcon;
|
||||||
showLink?: boolean;
|
showLink?: boolean;
|
||||||
savedPosition?: boolean;
|
savedPosition?: boolean;
|
||||||
auths?: Array<string>;
|
auths?: Array<string>;
|
||||||
@@ -32,7 +34,7 @@ export type multiTagsType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type tagsViewsType = {
|
export type tagsViewsType = {
|
||||||
icon: string;
|
icon: string | IconifyIcon;
|
||||||
text: string;
|
text: string;
|
||||||
divided: boolean;
|
divided: boolean;
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
|
|||||||
12
src/main.ts
@@ -7,27 +7,19 @@ import { getServerConfig } from "./config";
|
|||||||
import { createApp, Directive } from "vue";
|
import { createApp, Directive } from "vue";
|
||||||
import { MotionPlugin } from "@vueuse/motion";
|
import { MotionPlugin } from "@vueuse/motion";
|
||||||
import { useEcharts } from "@/plugins/echarts";
|
import { useEcharts } from "@/plugins/echarts";
|
||||||
import { useTable } from "@/plugins/vxe-table";
|
|
||||||
import VirtualScroller from "vue-virtual-scroller";
|
|
||||||
import { injectResponsiveStorage } from "@/utils/responsive";
|
import { injectResponsiveStorage } from "@/utils/responsive";
|
||||||
|
|
||||||
import Table from "@pureadmin/table";
|
import Table from "@pureadmin/table";
|
||||||
import PureDescriptions from "@pureadmin/descriptions";
|
import PureDescriptions from "@pureadmin/descriptions";
|
||||||
|
|
||||||
import "animate.css";
|
|
||||||
// 引入重置样式
|
// 引入重置样式
|
||||||
import "./style/reset.scss";
|
import "./style/reset.scss";
|
||||||
// 导入公共样式
|
// 导入公共样式
|
||||||
import "./style/index.scss";
|
import "./style/index.scss";
|
||||||
import "element-plus/dist/index.css";
|
import "element-plus/dist/index.css";
|
||||||
import "@pureadmin/components/dist/index.css";
|
|
||||||
import "@pureadmin/components/dist/theme.css";
|
|
||||||
import "@pureadmin/components/dist/dark.scss";
|
|
||||||
// 导入字体图标
|
// 导入字体图标
|
||||||
import "./assets/iconfont/iconfont.js";
|
import "./assets/iconfont/iconfont.js";
|
||||||
import "./assets/iconfont/iconfont.css";
|
import "./assets/iconfont/iconfont.css";
|
||||||
import "v-contextmenu/dist/themes/default.css";
|
|
||||||
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
@@ -62,8 +54,6 @@ getServerConfig(app).then(async config => {
|
|||||||
.use(ElementPlus)
|
.use(ElementPlus)
|
||||||
.use(Table)
|
.use(Table)
|
||||||
.use(PureDescriptions)
|
.use(PureDescriptions)
|
||||||
.use(useTable)
|
.use(useEcharts);
|
||||||
.use(useEcharts)
|
|
||||||
.use(VirtualScroller);
|
|
||||||
app.mount("#app");
|
app.mount("#app");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { App } from "vue";
|
import type { App } from "vue";
|
||||||
import * as echarts from "echarts/core";
|
import * as echarts from "echarts/core";
|
||||||
import { SVGRenderer } from "echarts/renderers";
|
import { CanvasRenderer } from "echarts/renderers";
|
||||||
import { PieChart, BarChart, LineChart } from "echarts/charts";
|
import { PieChart, BarChart, LineChart } from "echarts/charts";
|
||||||
import {
|
import {
|
||||||
GridComponent,
|
GridComponent,
|
||||||
@@ -20,7 +20,7 @@ use([
|
|||||||
PieChart,
|
PieChart,
|
||||||
BarChart,
|
BarChart,
|
||||||
LineChart,
|
LineChart,
|
||||||
SVGRenderer,
|
CanvasRenderer,
|
||||||
GridComponent,
|
GridComponent,
|
||||||
TitleComponent,
|
TitleComponent,
|
||||||
LegendComponent,
|
LegendComponent,
|
||||||
@@ -41,6 +41,7 @@ use([
|
|||||||
/**
|
/**
|
||||||
* @description 按需引入echarts
|
* @description 按需引入echarts
|
||||||
* @see {@link https://echarts.apache.org/handbook/zh/basics/import#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5-echarts-%E5%9B%BE%E8%A1%A8%E5%92%8C%E7%BB%84%E4%BB%B6}
|
* @see {@link https://echarts.apache.org/handbook/zh/basics/import#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5-echarts-%E5%9B%BE%E8%A1%A8%E5%92%8C%E7%BB%84%E4%BB%B6}
|
||||||
|
* @see 温馨提示:必须将 `$echarts` 添加到全局 `globalProperties` ,为了配合 https://pure-admin-utils.netlify.app/hooks/useEcharts/useEcharts.html 使用
|
||||||
*/
|
*/
|
||||||
export function useEcharts(app: App) {
|
export function useEcharts(app: App) {
|
||||||
app.config.globalProperties.$echarts = echarts;
|
app.config.globalProperties.$echarts = echarts;
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
@import "vxe-table/styles/variable.scss";
|
|
||||||
@import "vxe-table/styles/modules.scss";
|
|
||||||
|
|
||||||
i {
|
|
||||||
border-color: initial;
|
|
||||||
}
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
import "xe-utils";
|
|
||||||
import "./index.scss";
|
|
||||||
import XEUtils from "xe-utils";
|
|
||||||
import { App, unref } from "vue";
|
|
||||||
import { i18n } from "@/plugins/i18n";
|
|
||||||
import "font-awesome/css/font-awesome.min.css";
|
|
||||||
import zh from "vxe-table/lib/locale/lang/zh-CN";
|
|
||||||
import en from "vxe-table/lib/locale/lang/en-US";
|
|
||||||
|
|
||||||
import {
|
|
||||||
// 核心
|
|
||||||
VXETable,
|
|
||||||
// 表格功能
|
|
||||||
Icon,
|
|
||||||
Filter,
|
|
||||||
Edit,
|
|
||||||
Menu,
|
|
||||||
Export,
|
|
||||||
Keyboard,
|
|
||||||
Validator,
|
|
||||||
// 可选组件
|
|
||||||
Column,
|
|
||||||
Colgroup,
|
|
||||||
Grid,
|
|
||||||
Tooltip,
|
|
||||||
Toolbar,
|
|
||||||
Pager,
|
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
FormGather,
|
|
||||||
Checkbox,
|
|
||||||
CheckboxGroup,
|
|
||||||
Radio,
|
|
||||||
RadioGroup,
|
|
||||||
RadioButton,
|
|
||||||
Switch,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
Optgroup,
|
|
||||||
Option,
|
|
||||||
Textarea,
|
|
||||||
Button,
|
|
||||||
Modal,
|
|
||||||
List,
|
|
||||||
Pulldown,
|
|
||||||
// 表格
|
|
||||||
Table
|
|
||||||
} from "vxe-table";
|
|
||||||
|
|
||||||
// 全局默认参数
|
|
||||||
VXETable.setup({
|
|
||||||
size: "medium",
|
|
||||||
version: 0,
|
|
||||||
zIndex: 1002,
|
|
||||||
table: {
|
|
||||||
// 自动监听父元素的变化去重新计算表格
|
|
||||||
autoResize: true,
|
|
||||||
// 鼠标移到行是否要高亮显示
|
|
||||||
highlightHoverRow: true
|
|
||||||
},
|
|
||||||
input: {
|
|
||||||
clearable: true
|
|
||||||
},
|
|
||||||
i18n: (key, args) => {
|
|
||||||
return unref(i18n.global.locale) === "zh"
|
|
||||||
? XEUtils.toFormatString(XEUtils.get(zh, key), args)
|
|
||||||
: XEUtils.toFormatString(XEUtils.get(en, key), args);
|
|
||||||
},
|
|
||||||
translate(key) {
|
|
||||||
const NAMESPACED = ["el.", "buttons."];
|
|
||||||
if (key && NAMESPACED.findIndex(v => key.includes(v)) !== -1) {
|
|
||||||
return i18n.global.t.call(i18n.global.locale, key);
|
|
||||||
}
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export function useTable(app: App) {
|
|
||||||
app
|
|
||||||
.use(Icon)
|
|
||||||
.use(Filter)
|
|
||||||
.use(Edit)
|
|
||||||
.use(Menu)
|
|
||||||
.use(Export)
|
|
||||||
.use(Keyboard)
|
|
||||||
.use(Validator)
|
|
||||||
// 可选组件
|
|
||||||
.use(Column)
|
|
||||||
.use(Colgroup)
|
|
||||||
.use(Grid)
|
|
||||||
.use(Tooltip)
|
|
||||||
.use(Toolbar)
|
|
||||||
.use(Pager)
|
|
||||||
.use(Form)
|
|
||||||
.use(FormItem)
|
|
||||||
.use(FormGather)
|
|
||||||
.use(Checkbox)
|
|
||||||
.use(CheckboxGroup)
|
|
||||||
.use(Radio)
|
|
||||||
.use(RadioGroup)
|
|
||||||
.use(RadioButton)
|
|
||||||
.use(Switch)
|
|
||||||
.use(Input)
|
|
||||||
.use(Select)
|
|
||||||
.use(Optgroup)
|
|
||||||
.use(Option)
|
|
||||||
.use(Textarea)
|
|
||||||
.use(Button)
|
|
||||||
.use(Modal)
|
|
||||||
.use(List)
|
|
||||||
.use(Pulldown)
|
|
||||||
// 安装表格
|
|
||||||
.use(Table);
|
|
||||||
}
|
|
||||||
@@ -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,
|
||||||
able = 5,
|
able = 5,
|
||||||
components = 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,9 +27,8 @@ export {
|
|||||||
doc,
|
doc,
|
||||||
utils,
|
utils,
|
||||||
table,
|
table,
|
||||||
tree,
|
|
||||||
able,
|
|
||||||
components,
|
components,
|
||||||
|
able,
|
||||||
frame,
|
frame,
|
||||||
nested,
|
nested,
|
||||||
result,
|
result,
|
||||||
@@ -37,6 +36,7 @@ export {
|
|||||||
list,
|
list,
|
||||||
permission,
|
permission,
|
||||||
system,
|
system,
|
||||||
|
menuoverflow,
|
||||||
tabs,
|
tabs,
|
||||||
formdesign,
|
formdesign,
|
||||||
flowchart,
|
flowchart,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default {
|
|||||||
path: "/able",
|
path: "/able",
|
||||||
redirect: "/able/watermark",
|
redirect: "/able/watermark",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "ubuntu-fill",
|
icon: "ubuntuFill",
|
||||||
title: $t("menus.hsAble"),
|
title: $t("menus.hsAble"),
|
||||||
rank: able
|
rank: able
|
||||||
},
|
},
|
||||||
@@ -66,30 +66,6 @@ export default {
|
|||||||
title: $t("menus.hsLineTree")
|
title: $t("menus.hsLineTree")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/able/antTabs",
|
|
||||||
name: "AntTabs",
|
|
||||||
component: () => import("@/views/able/ant-tabs.vue"),
|
|
||||||
meta: {
|
|
||||||
title: $t("menus.hsAntTabs")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/able/antAnchor",
|
|
||||||
name: "AntAnchor",
|
|
||||||
component: () => import("@/views/able/ant-anchor.vue"),
|
|
||||||
meta: {
|
|
||||||
title: $t("menus.hsAntAnchor")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/able/antTreeSelect",
|
|
||||||
name: "AntTreeSelect",
|
|
||||||
component: () => import("@/views/able/ant-treeSelect.vue"),
|
|
||||||
meta: {
|
|
||||||
title: $t("menus.hsAntTreeSelect")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/able/debounce",
|
path: "/able/debounce",
|
||||||
name: "Debounce",
|
name: "Debounce",
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ export default {
|
|||||||
path: "/about",
|
path: "/about",
|
||||||
redirect: "/about/index",
|
redirect: "/about/index",
|
||||||
meta: {
|
meta: {
|
||||||
// icon: "question-line",
|
|
||||||
title: $t("menus.hsAbout"),
|
title: $t("menus.hsAbout"),
|
||||||
rank: about
|
rank: about
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,6 +10,22 @@ export default {
|
|||||||
rank: components
|
rank: components
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: "/components/message",
|
||||||
|
name: "Message",
|
||||||
|
component: () => import("@/views/components/message/index.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.hsmessage"),
|
||||||
|
extraIcon: {
|
||||||
|
svg: true,
|
||||||
|
name: "team-iconxinpinrenqiwang"
|
||||||
|
},
|
||||||
|
transition: {
|
||||||
|
enterTransition: "animate__fadeInLeft",
|
||||||
|
leaveTransition: "animate__fadeOutRight"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/components/video",
|
path: "/components/video",
|
||||||
name: "Video",
|
name: "Video",
|
||||||
@@ -47,11 +63,7 @@ export default {
|
|||||||
name: "SplitPane",
|
name: "SplitPane",
|
||||||
component: () => import("@/views/components/split-pane/index.vue"),
|
component: () => import("@/views/components/split-pane/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: $t("menus.hssplitPane"),
|
title: $t("menus.hssplitPane")
|
||||||
extraIcon: {
|
|
||||||
svg: true,
|
|
||||||
name: "team-iconxinpinrenqiwang"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default {
|
|||||||
path: "/error",
|
path: "/error",
|
||||||
redirect: "/error/403",
|
redirect: "/error/403",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "information-line",
|
icon: "informationLine",
|
||||||
title: $t("menus.hsabnormal"),
|
title: $t("menus.hsabnormal"),
|
||||||
rank: error
|
rank: error
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default {
|
|||||||
path: "/flowChart",
|
path: "/flowChart",
|
||||||
redirect: "/flowChart/index",
|
redirect: "/flowChart/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "set-up",
|
icon: "setUp",
|
||||||
title: $t("menus.hsflowChart"),
|
title: $t("menus.hsflowChart"),
|
||||||
rank: flowchart
|
rank: flowchart
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default {
|
|||||||
path: "/formDesign",
|
path: "/formDesign",
|
||||||
redirect: "/formDesign/index",
|
redirect: "/formDesign/index",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "terminal-window-line",
|
icon: "terminalWindowLine",
|
||||||
title: $t("menus.hsFormDesign"),
|
title: $t("menus.hsFormDesign"),
|
||||||
rank: formdesign
|
rank: formdesign
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default {
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/welcome",
|
redirect: "/welcome",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "home-filled",
|
icon: "homeFilled",
|
||||||
title: $t("menus.hshome"),
|
title: $t("menus.hshome"),
|
||||||
rank: home
|
rank: home
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default {
|
|||||||
path: "/list",
|
path: "/list",
|
||||||
redirect: "/list/card",
|
redirect: "/list/card",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "list-check",
|
icon: "listCheck",
|
||||||
title: $t("menus.hsList"),
|
title: $t("menus.hsList"),
|
||||||
rank: list
|
rank: list
|
||||||
},
|
},
|
||||||
|
|||||||
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;
|
||||||
@@ -16,7 +16,7 @@ export default [
|
|||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
icon: "home-filled",
|
icon: "homeFilled",
|
||||||
title: $t("menus.hshome"),
|
title: $t("menus.hshome"),
|
||||||
showLink: false,
|
showLink: false,
|
||||||
rank: 102
|
rank: 102
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default {
|
|||||||
path: "/result",
|
path: "/result",
|
||||||
redirect: "/result/success",
|
redirect: "/result/success",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "checkbox-circle-line",
|
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -28,11 +28,6 @@ html.dark {
|
|||||||
filter: invert(0.9) hue-rotate(180deg);
|
filter: invert(0.9) hue-rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tabs {
|
|
||||||
background: var(--el-bg-color);
|
|
||||||
color: $color-white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 标签页 */
|
/* 标签页 */
|
||||||
.tags-view {
|
.tags-view {
|
||||||
.arrow-left,
|
.arrow-left,
|
||||||
@@ -46,97 +41,6 @@ html.dark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vxe-table */
|
|
||||||
.vxe-table--header-wrapper,
|
|
||||||
.vxe-table--body-wrapper {
|
|
||||||
color: var(--el-text-color-primary);
|
|
||||||
background: var(--el-bg-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-table--render-default.border--full .vxe-header--column,
|
|
||||||
.vxe-table--render-default.border--full .vxe-body--column,
|
|
||||||
.vxe-table--render-default.border--full .vxe-footer--column {
|
|
||||||
background-image: linear-gradient(
|
|
||||||
var(--el-border-color-lighter),
|
|
||||||
var(--el-border-color-lighter)
|
|
||||||
),
|
|
||||||
linear-gradient(
|
|
||||||
var(--el-border-color-lighter),
|
|
||||||
var(--el-border-color-lighter)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表头 */
|
|
||||||
.vxe-table--header-wrapper {
|
|
||||||
background: #262727 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-table--render-wrapper,
|
|
||||||
.vxe-table--main-wrapper {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-pager.is--perfect,
|
|
||||||
.vxe-table--render-default .vxe-table--border-line {
|
|
||||||
border: 1px solid var(--el-border-color-lighter);
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-table--header-border-line {
|
|
||||||
border-bottom: 1px solid var(--el-border-color-lighter) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-body--row.row--hover,
|
|
||||||
.vxe-pager {
|
|
||||||
background-color: #262727;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-input--inner,
|
|
||||||
.vxe-pager .vxe-pager--jump-prev,
|
|
||||||
.vxe-pager .vxe-pager--prev-btn,
|
|
||||||
.vxe-pager .vxe-pager--next-btn,
|
|
||||||
.vxe-pager .vxe-pager--jump-next,
|
|
||||||
.vxe-pager .vxe-pager--num-btn,
|
|
||||||
.vxe-pager .vxe-pager--jump .vxe-pager--goto {
|
|
||||||
background-color: transparent;
|
|
||||||
color: var(--el-text-color-primary);
|
|
||||||
// outline: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-select-option--wrapper {
|
|
||||||
background: var(--el-bg-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-select-option:not(.is--disabled).is--hover {
|
|
||||||
background: var(--el-color-primary-light-6) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-modal--wrapper.type--modal .vxe-modal--box,
|
|
||||||
.vxe-modal--wrapper.type--alert .vxe-modal--box,
|
|
||||||
.vxe-modal--wrapper.type--confirm .vxe-modal--box,
|
|
||||||
.vxe-form {
|
|
||||||
background: var(--el-bg-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-modal--box,
|
|
||||||
.vxe-modal--header {
|
|
||||||
border: none;
|
|
||||||
background: var(--el-bg-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-modal--title,
|
|
||||||
.vxe-button--content,
|
|
||||||
.vxe-modal--header-title {
|
|
||||||
color: var(--el-text-color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-button.type--button:hover {
|
|
||||||
background: var(--el-color-primary) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vxe-button {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 项目配置面板 */
|
/* 项目配置面板 */
|
||||||
.right-panel-items {
|
.right-panel-items {
|
||||||
.el-divider__text {
|
.el-divider__text {
|
||||||
@@ -191,4 +95,38 @@ html.dark {
|
|||||||
.el-dropdown-menu__item:not(.is-disabled):hover {
|
.el-dropdown-menu__item:not(.is-disabled):hover {
|
||||||
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 文件进行了适配 */
|
||||||
|
.pure-message {
|
||||||
|
background-image: initial !important;
|
||||||
|
background-color: rgb(36, 37, 37) !important;
|
||||||
|
box-shadow: rgb(13 13 13 / 12%) 0px 3px 6px -4px,
|
||||||
|
rgb(13 13 13 / 8%) 0px 6px 16px 0px, rgb(13 13 13 / 5%) 0px 9px 28px 8px !important;
|
||||||
|
|
||||||
|
& .el-message__content {
|
||||||
|
color: $color-white !important;
|
||||||
|
pointer-events: all !important;
|
||||||
|
background-image: initial !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .el-message__closeBtn {
|
||||||
|
&:hover {
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
background-color: rgba(255, 255, 255, 0.12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
@@ -62,3 +68,64 @@
|
|||||||
border-left-color: var(--el-color-primary);
|
border-left-color: var(--el-color-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 全局覆盖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 文件进行了适配 */
|
||||||
|
.pure-message {
|
||||||
|
border-width: 0 !important;
|
||||||
|
background: #fff !important;
|
||||||
|
padding: 10px 13px !important;
|
||||||
|
box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014,
|
||||||
|
0 9px 28px 8px #0000000d !important;
|
||||||
|
|
||||||
|
&.el-message.is-closable .el-message__content {
|
||||||
|
padding-right: 17px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .el-message__content {
|
||||||
|
color: #000000d9 !important;
|
||||||
|
pointer-events: all !important;
|
||||||
|
background-image: initial !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .el-message__icon {
|
||||||
|
margin-right: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .el-message__closeBtn {
|
||||||
|
outline: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
right: 9px !important;
|
||||||
|
transition: background-color 0.2s, color 0.2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(0, 0, 0, 0.06);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,9 +19,3 @@
|
|||||||
.html-weakness {
|
.html-weakness {
|
||||||
filter: invert(80%);
|
filter: invert(80%);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 重置 vxe-table 样式 */
|
|
||||||
.vxe-button.type--button.theme--primary:hover,
|
|
||||||
.vxe-pager .vxe-pager--num-btn:not(.is--disabled).is--active {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ button,
|
|||||||
[type="button"],
|
[type="button"],
|
||||||
[type="reset"],
|
[type="reset"],
|
||||||
[type="submit"] {
|
[type="submit"] {
|
||||||
-webkit-appearance: button;
|
|
||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,16 +132,10 @@ progress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[type="search"] {
|
[type="search"] {
|
||||||
-webkit-appearance: textfield;
|
|
||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
::-webkit-file-upload-button {
|
||||||
-webkit-appearance: button;
|
|
||||||
font: inherit;
|
font: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +204,6 @@ iframe,
|
|||||||
embed,
|
embed,
|
||||||
object {
|
object {
|
||||||
display: block;
|
display: block;
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img,
|
img,
|
||||||
|
|||||||
@@ -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格式) */
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ class PureHttp {
|
|||||||
/** 单独抽离的post工具函数 */
|
/** 单独抽离的post工具函数 */
|
||||||
public post<T, P>(
|
public post<T, P>(
|
||||||
url: string,
|
url: string,
|
||||||
params?: T,
|
params?: AxiosRequestConfig<T>,
|
||||||
config?: PureHttpRequestConfig
|
config?: PureHttpRequestConfig
|
||||||
): Promise<P> {
|
): Promise<P> {
|
||||||
return this.request<P>("post", url, params, config);
|
return this.request<P>("post", url, params, config);
|
||||||
@@ -184,7 +184,7 @@ class PureHttp {
|
|||||||
/** 单独抽离的get工具函数 */
|
/** 单独抽离的get工具函数 */
|
||||||
public get<T, P>(
|
public get<T, P>(
|
||||||
url: string,
|
url: string,
|
||||||
params?: T,
|
params?: AxiosRequestConfig<T>,
|
||||||
config?: PureHttpRequestConfig
|
config?: PureHttpRequestConfig
|
||||||
): Promise<P> {
|
): Promise<P> {
|
||||||
return this.request<P>("get", url, params, config);
|
return this.request<P>("get", url, params, config);
|
||||||
|
|||||||
85
src/utils/message.ts
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import { type VNode } from "vue";
|
||||||
|
import { isFunction } from "@pureadmin/utils";
|
||||||
|
import { type MessageHandler, ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
type messageStyle = "el" | "antd";
|
||||||
|
type messageTypes = "info" | "success" | "warning" | "error";
|
||||||
|
|
||||||
|
interface MessageParams {
|
||||||
|
/** 消息类型,可选 `info` 、`success` 、`warning` 、`error` ,默认 `info` */
|
||||||
|
type?: messageTypes;
|
||||||
|
/** 自定义图标,该属性会覆盖 `type` 的图标 */
|
||||||
|
icon?: any;
|
||||||
|
/** 是否将 `message` 属性作为 `HTML` 片段处理,默认 `false` */
|
||||||
|
dangerouslyUseHTMLString?: boolean;
|
||||||
|
/** 消息风格,可选 `el` 、`antd` ,默认 `antd` */
|
||||||
|
customClass?: messageStyle;
|
||||||
|
/** 显示时间,单位为毫秒。设为 `0` 则不会自动关闭,`element-plus` 默认是 `3000` ,平台改成默认 `2000` */
|
||||||
|
duration?: number;
|
||||||
|
/** 是否显示关闭按钮,默认值 `false` */
|
||||||
|
showClose?: boolean;
|
||||||
|
/** 文字是否居中,默认值 `false` */
|
||||||
|
center?: boolean;
|
||||||
|
/** `Message` 距离窗口顶部的偏移量,默认 `20` */
|
||||||
|
offset?: number;
|
||||||
|
/** 设置组件的根元素,默认 `document.body` */
|
||||||
|
appendTo?: string | HTMLElement;
|
||||||
|
/** 合并内容相同的消息,不支持 `VNode` 类型的消息,默认值 `false` */
|
||||||
|
grouping?: boolean;
|
||||||
|
/** 关闭时的回调函数, 参数为被关闭的 `message` 实例 */
|
||||||
|
onClose?: Function | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 用法非常简单,参考 src/views/components/message/index.vue 文件 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `Message` 消息提示函数
|
||||||
|
*/
|
||||||
|
const message = (
|
||||||
|
message: string | VNode | (() => VNode),
|
||||||
|
params?: MessageParams
|
||||||
|
): MessageHandler => {
|
||||||
|
if (!params) {
|
||||||
|
return ElMessage({
|
||||||
|
message,
|
||||||
|
customClass: "pure-message"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const {
|
||||||
|
icon,
|
||||||
|
type = "info",
|
||||||
|
dangerouslyUseHTMLString = false,
|
||||||
|
customClass = "antd",
|
||||||
|
duration = 2000,
|
||||||
|
showClose = false,
|
||||||
|
center = false,
|
||||||
|
offset = 20,
|
||||||
|
appendTo = document.body,
|
||||||
|
grouping = false,
|
||||||
|
onClose
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
return ElMessage({
|
||||||
|
message,
|
||||||
|
type,
|
||||||
|
icon,
|
||||||
|
dangerouslyUseHTMLString,
|
||||||
|
duration,
|
||||||
|
showClose,
|
||||||
|
center,
|
||||||
|
offset,
|
||||||
|
appendTo,
|
||||||
|
grouping,
|
||||||
|
// 全局搜 pure-message 即可知道该类的样式位置
|
||||||
|
customClass: customClass === "antd" ? "pure-message" : "",
|
||||||
|
onClose: () => (isFunction(onClose) ? onClose() : null)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭所有 `Message` 消息提示函数
|
||||||
|
*/
|
||||||
|
const closeAllMessage = (): void => ElMessage.closeAll();
|
||||||
|
|
||||||
|
export { message, closeAllMessage };
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { Anchor, AnchorLink } from "@pureadmin/components";
|
|
||||||
|
|
||||||
defineOptions({
|
|
||||||
name: "AntAnchor"
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleAnchorClick(e, link) {
|
|
||||||
e.preventDefault();
|
|
||||||
const srcolls = document.getElementById(link.href);
|
|
||||||
srcolls.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-card>
|
|
||||||
<template #header>
|
|
||||||
<div class="card-header">
|
|
||||||
<span class="font-medium">
|
|
||||||
仿antdv锚点,采用
|
|
||||||
<el-link
|
|
||||||
href="https://www.npmjs.com/package/@pureadmin/components"
|
|
||||||
target="_blank"
|
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
|
||||||
>
|
|
||||||
@pureadmin/components
|
|
||||||
</el-link>
|
|
||||||
,完全兼容antdv的
|
|
||||||
<el-link
|
|
||||||
href="https://next.antdv.com/components/anchor-cn"
|
|
||||||
target="_blank"
|
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
|
||||||
>
|
|
||||||
Anchor
|
|
||||||
</el-link>
|
|
||||||
写法
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<div class="w-[400px]">
|
|
||||||
<Anchor class="float-left mt-[200px]" @click="handleAnchorClick">
|
|
||||||
<AnchorLink href="one" title="测试one" />
|
|
||||||
<AnchorLink href="two" title="测试two" />
|
|
||||||
<AnchorLink href="three" title="测试three" />
|
|
||||||
</Anchor>
|
|
||||||
|
|
||||||
<el-scrollbar class="float-right overflow-auto" height="600px">
|
|
||||||
<header
|
|
||||||
id="one"
|
|
||||||
class="w-[200px] h-[600px] text-cyan-50 flex justify-center items-center text-4xl"
|
|
||||||
style="background: #409eff"
|
|
||||||
>
|
|
||||||
测试one
|
|
||||||
</header>
|
|
||||||
<header
|
|
||||||
id="two"
|
|
||||||
class="w-[200px] h-[600px] text-cyan-50 flex justify-center items-center text-4xl"
|
|
||||||
style="background: #67c23a"
|
|
||||||
>
|
|
||||||
测试two
|
|
||||||
</header>
|
|
||||||
<header
|
|
||||||
id="three"
|
|
||||||
class="w-[200px] h-[600px] text-cyan-50 flex justify-center items-center text-4xl"
|
|
||||||
style="background: #f56c6c"
|
|
||||||
>
|
|
||||||
测试three
|
|
||||||
</header>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ref } from "vue";
|
|
||||||
import { Tabs, TabPane } from "@pureadmin/components";
|
|
||||||
|
|
||||||
defineOptions({
|
|
||||||
name: "AntTabs"
|
|
||||||
});
|
|
||||||
|
|
||||||
const mode = ref("top");
|
|
||||||
const activeKey = ref(1);
|
|
||||||
const callback = (val: string) => {
|
|
||||||
console.log(val);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-card>
|
|
||||||
<template #header>
|
|
||||||
<div class="card-header">
|
|
||||||
<span class="font-medium">
|
|
||||||
仿antdv标签页,采用
|
|
||||||
<el-link
|
|
||||||
href="https://www.npmjs.com/package/@pureadmin/components"
|
|
||||||
target="_blank"
|
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
|
||||||
>
|
|
||||||
@pureadmin/components
|
|
||||||
</el-link>
|
|
||||||
,完全兼容antdv的
|
|
||||||
<el-link
|
|
||||||
href="https://next.antdv.com/components/tabs-cn"
|
|
||||||
target="_blank"
|
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
|
||||||
>
|
|
||||||
Tabs
|
|
||||||
</el-link>
|
|
||||||
写法
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<el-radio-group v-model="mode" size="small" class="mb-2">
|
|
||||||
<el-radio label="top" border>Horizontal</el-radio>
|
|
||||||
<el-radio label="left" border>Vertical</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
<Tabs
|
|
||||||
v-model:activeKey="activeKey"
|
|
||||||
:tab-position="mode"
|
|
||||||
:style="{ height: '200px' }"
|
|
||||||
@tabScroll="callback"
|
|
||||||
>
|
|
||||||
<TabPane v-for="i in 30" :key="i" :tab="`Tab-${i}`">
|
|
||||||
Content of tab {{ i }}
|
|
||||||
</TabPane>
|
|
||||||
</Tabs>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ref } from "vue";
|
|
||||||
import { TreeSelect } from "@pureadmin/components";
|
|
||||||
|
|
||||||
defineOptions({
|
|
||||||
name: "AntTreeSelect"
|
|
||||||
});
|
|
||||||
|
|
||||||
const value1 = ref<string>("");
|
|
||||||
const treeData1 = ref([
|
|
||||||
{
|
|
||||||
title: "parent 1",
|
|
||||||
value: "parent 1",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "parent 1-0",
|
|
||||||
value: "parent 1-0",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "my leaf",
|
|
||||||
value: "leaf1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "your leaf",
|
|
||||||
value: "leaf2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "parent 1-1",
|
|
||||||
value: "parent 1-1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
const SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
|
||||||
|
|
||||||
function dig(path = "0", level = 3) {
|
|
||||||
const list = [];
|
|
||||||
for (let i = 0; i < 10; i += 1) {
|
|
||||||
const value = `${path}-${i}`;
|
|
||||||
const treeNode = {
|
|
||||||
title: value,
|
|
||||||
value
|
|
||||||
};
|
|
||||||
|
|
||||||
if (level > 0) {
|
|
||||||
(treeNode as any).children = dig(value, level - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
list.push(treeNode);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
const checkedKeys = ref<string[]>(["0-0-0", "0-0-1"]);
|
|
||||||
|
|
||||||
const value2 = ref<string[]>(["0-0-0"]);
|
|
||||||
const treeData2 = [
|
|
||||||
{
|
|
||||||
title: "Node1",
|
|
||||||
value: "0-0",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "Child Node1",
|
|
||||||
value: "0-0-0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Node2",
|
|
||||||
value: "0-1",
|
|
||||||
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "Child Node3",
|
|
||||||
value: "0-1-0",
|
|
||||||
disabled: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Child Node4",
|
|
||||||
value: "0-1-1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Child Node5",
|
|
||||||
value: "0-1-2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const value3 = ref<string>();
|
|
||||||
const treeData3 = ref([
|
|
||||||
{ id: 1, pId: 0, value: "1", title: "Expand to load" },
|
|
||||||
{ id: 2, pId: 0, value: "2", title: "Expand to load" },
|
|
||||||
{ id: 3, pId: 0, value: "3", title: "Tree Node", isLeaf: true }
|
|
||||||
]);
|
|
||||||
const genTreeNode = (parentId: number, isLeaf = false) => {
|
|
||||||
const random = Math.random().toString(36).substring(2, 6);
|
|
||||||
return {
|
|
||||||
id: random,
|
|
||||||
pId: parentId,
|
|
||||||
value: random,
|
|
||||||
title: isLeaf ? "Tree Node" : "Expand to load",
|
|
||||||
isLeaf
|
|
||||||
};
|
|
||||||
};
|
|
||||||
const onLoadData = treeNode => {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const { id } = treeNode.dataRef;
|
|
||||||
setTimeout(() => {
|
|
||||||
treeData3.value = (treeData3 as any).value.concat([
|
|
||||||
genTreeNode(id, false),
|
|
||||||
genTreeNode(id, true)
|
|
||||||
]);
|
|
||||||
resolve(true);
|
|
||||||
}, 300);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-card>
|
|
||||||
<template #header>
|
|
||||||
<div class="card-header">
|
|
||||||
<span class="font-medium">
|
|
||||||
仿antdv树选择,采用
|
|
||||||
<el-link
|
|
||||||
href="https://www.npmjs.com/package/@pureadmin/components"
|
|
||||||
target="_blank"
|
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
|
||||||
>
|
|
||||||
@pureadmin/components
|
|
||||||
</el-link>
|
|
||||||
,完全兼容antdv的
|
|
||||||
<el-link
|
|
||||||
href="https://next.antdv.com/components/tree-select-cn"
|
|
||||||
target="_blank"
|
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
|
||||||
>
|
|
||||||
TreeSelect
|
|
||||||
</el-link>
|
|
||||||
写法
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<div class="flex justify-around flex-wrap">
|
|
||||||
<div>
|
|
||||||
<span>线性样式:</span>
|
|
||||||
<TreeSelect
|
|
||||||
class="w-[200px]"
|
|
||||||
v-model:value="value1"
|
|
||||||
show-search
|
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
||||||
placeholder="Please select"
|
|
||||||
allow-clear
|
|
||||||
:tree-line="true"
|
|
||||||
tree-default-expand-all
|
|
||||||
:tree-data="treeData1"
|
|
||||||
>
|
|
||||||
<template #title="{ value: val, title }">
|
|
||||||
<b v-if="val === 'parent 1-1'" style="color: #08c">sss</b>
|
|
||||||
<template v-else>{{ title }}</template>
|
|
||||||
</template>
|
|
||||||
</TreeSelect>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<span>虚拟滚动:</span>
|
|
||||||
<TreeSelect
|
|
||||||
class="w-[200px] mt-6"
|
|
||||||
v-model:value="checkedKeys"
|
|
||||||
tree-checkable
|
|
||||||
tree-default-expand-all
|
|
||||||
:show-checked-strategy="SHOW_PARENT"
|
|
||||||
:height="233"
|
|
||||||
:tree-data="dig()"
|
|
||||||
:max-tag-count="10"
|
|
||||||
>
|
|
||||||
<template #title="{ title, value }">
|
|
||||||
<span v-if="value === '0-0-1-0'" style="color: #1890ff">
|
|
||||||
{{ title }}
|
|
||||||
</span>
|
|
||||||
<template v-else>{{ title }}</template>
|
|
||||||
</template>
|
|
||||||
</TreeSelect>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<span>可勾选:</span>
|
|
||||||
<TreeSelect
|
|
||||||
class="w-[200px]"
|
|
||||||
v-model:value="value2"
|
|
||||||
:tree-data="treeData2"
|
|
||||||
tree-checkable
|
|
||||||
allow-clear
|
|
||||||
:show-checked-strategy="SHOW_PARENT"
|
|
||||||
placeholder="Please select"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<span>异步加载:</span>
|
|
||||||
<TreeSelect
|
|
||||||
class="w-[200px]"
|
|
||||||
v-model:value="value3"
|
|
||||||
tree-data-simple-mode
|
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
||||||
:tree-data="treeData3"
|
|
||||||
placeholder="Please select"
|
|
||||||
:load-data="onLoadData"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
@@ -1,17 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ElMessage } from "element-plus";
|
import { message } from "@/utils/message";
|
||||||
import { debounce, throttle } from "@pureadmin/utils";
|
import { debounce, throttle } from "@pureadmin/utils";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "Debounce"
|
name: "Debounce"
|
||||||
});
|
});
|
||||||
|
|
||||||
const handle = () => {
|
const handle = () => message("恭喜你,这是一条成功消息", { type: "success" });
|
||||||
ElMessage({
|
|
||||||
message: "恭喜你,这是一条成功消息",
|
|
||||||
type: "success"
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const immediateDebounce = debounce(handle, 1000, true);
|
const immediateDebounce = debounce(handle, 1000, true);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { IconSelect } from "@/components/ReIcon";
|
import IconSelect from "@/components/ReIcon/src/Select.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "IconSelect"
|
name: "IconSelect"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
|||||||
import { extractPathList, deleteChildren } from "@/utils/tree";
|
import { extractPathList, deleteChildren } from "@/utils/tree";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import type { TreeNode } from "element-plus/es/components/tree-v2/src/types";
|
import type { TreeNode } from "element-plus/es/components/tree-v2/src/types";
|
||||||
|
import NodeTree from "@iconify-icons/ri/node-tree";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "MenuTree"
|
name: "MenuTree"
|
||||||
@@ -50,7 +51,7 @@ const filterMethod = (query: string, node: treeNode) => {
|
|||||||
<el-link
|
<el-link
|
||||||
href="https://element-plus.gitee.io/zh-CN/component/tree-v2.html"
|
href="https://element-plus.gitee.io/zh-CN/component/tree-v2.html"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:icon="useRenderIcon('node-tree')"
|
:icon="useRenderIcon(NodeTree)"
|
||||||
style="font-size: 16px; margin: 0 5px 4px 0"
|
style="font-size: 16px; margin: 0 5px 4px 0"
|
||||||
>
|
>
|
||||||
Tree V2
|
Tree V2
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
import Print from "@/utils/print";
|
import Print from "@/utils/print";
|
||||||
import { reactive, ref } from "vue";
|
|
||||||
import { VxeTablePropTypes } from "vxe-table";
|
|
||||||
import Line from "../welcome/components/Line.vue";
|
import Line from "../welcome/components/Line.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -14,43 +13,6 @@ interface User {
|
|||||||
address: string;
|
address: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const demo1 = reactive({
|
|
||||||
tableData: [
|
|
||||||
{
|
|
||||||
id: 10001,
|
|
||||||
name: "Test1",
|
|
||||||
role: "Develop",
|
|
||||||
sex: "Man",
|
|
||||||
age: 28,
|
|
||||||
address: "test abc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 10002,
|
|
||||||
name: "Test2",
|
|
||||||
role: "Test",
|
|
||||||
sex: "Women",
|
|
||||||
age: 22,
|
|
||||||
address: "Guangzhou"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 10003,
|
|
||||||
name: "Test3",
|
|
||||||
role: "PM",
|
|
||||||
sex: "Man",
|
|
||||||
age: 32,
|
|
||||||
address: "Shanghai"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 10004,
|
|
||||||
name: "Test4",
|
|
||||||
role: "Designer",
|
|
||||||
sex: "Women",
|
|
||||||
age: 24,
|
|
||||||
address: "Shanghai"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
const value = ref("1");
|
const value = ref("1");
|
||||||
|
|
||||||
const options = [
|
const options = [
|
||||||
@@ -59,11 +21,6 @@ const options = [
|
|||||||
el: ".el-table",
|
el: ".el-table",
|
||||||
label: "Element-Plus Table"
|
label: "Element-Plus Table"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
value: "2",
|
|
||||||
el: ".vxe-table",
|
|
||||||
label: "Vxe Table"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
value: "3",
|
value: "3",
|
||||||
el: ".echart",
|
el: ".echart",
|
||||||
@@ -81,38 +38,6 @@ function onPrint() {
|
|||||||
Print(el).toPrint;
|
Print(el).toPrint;
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerCellStyle: VxeTablePropTypes.HeaderCellStyle = ({ column }) => {
|
|
||||||
if (column.property === "name") {
|
|
||||||
return {
|
|
||||||
backgroundColor: "#f60",
|
|
||||||
color: "#ffffff"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const rowStyle: VxeTablePropTypes.RowStyle = ({ rowIndex }) => {
|
|
||||||
if ([2, 3, 5].includes(rowIndex)) {
|
|
||||||
return {
|
|
||||||
backgroundColor: "red",
|
|
||||||
color: "#ffffff"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const cellStyle: VxeTablePropTypes.CellStyle = ({ row, column }) => {
|
|
||||||
if (column.property === "sex") {
|
|
||||||
if (row.sex >= "1") {
|
|
||||||
return {
|
|
||||||
backgroundColor: "#187"
|
|
||||||
};
|
|
||||||
} else if (row.age === 26) {
|
|
||||||
return {
|
|
||||||
backgroundColor: "#2db7f5"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const tableRowClassName = ({ rowIndex }: { row: User; rowIndex: number }) => {
|
const tableRowClassName = ({ rowIndex }: { row: User; rowIndex: number }) => {
|
||||||
if (rowIndex === 1) {
|
if (rowIndex === 1) {
|
||||||
return "warning-row";
|
return "warning-row";
|
||||||
@@ -205,45 +130,6 @@ const tableData: User[] = [
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col
|
|
||||||
:xs="22"
|
|
||||||
:sm="22"
|
|
||||||
:md="11"
|
|
||||||
:lg="11"
|
|
||||||
:xl="11"
|
|
||||||
style="margin: 10px; border: 0.01rem solid var(--el-color-primary)"
|
|
||||||
v-motion
|
|
||||||
:initial="{
|
|
||||||
opacity: 0,
|
|
||||||
y: 100
|
|
||||||
}"
|
|
||||||
:enter="{
|
|
||||||
opacity: 1,
|
|
||||||
y: 0,
|
|
||||||
transition: {
|
|
||||||
delay: 200
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<p class="font-medium pt-1">Vxe Table</p>
|
|
||||||
<vxe-table
|
|
||||||
class="vxe-table"
|
|
||||||
border
|
|
||||||
style="margin: 40px auto"
|
|
||||||
:header-cell-style="headerCellStyle"
|
|
||||||
:row-style="rowStyle"
|
|
||||||
:cell-style="cellStyle"
|
|
||||||
:data="demo1.tableData"
|
|
||||||
>
|
|
||||||
<vxe-column type="seq" width="60" />
|
|
||||||
<vxe-column field="name" title="Name" />
|
|
||||||
<vxe-column field="sex" title="Sex" />
|
|
||||||
<vxe-column field="age" title="Age" />
|
|
||||||
<vxe-column field="attr1" title="Attr1" />
|
|
||||||
<vxe-column field="address" title="Address" show-overflow />
|
|
||||||
</vxe-table>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col
|
<el-col
|
||||||
:xs="22"
|
:xs="22"
|
||||||
:sm="22"
|
:sm="22"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, unref } from "vue";
|
import { ref, unref } from "vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { message } from "@/utils/message";
|
||||||
import ReQrcode from "@/components/ReQrcode";
|
import ReQrcode from "@/components/ReQrcode";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -14,10 +14,10 @@ setTimeout(() => {
|
|||||||
asyncTitle.value = unref(qrcodeText);
|
asyncTitle.value = unref(qrcodeText);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
const codeClick = () => {
|
const codeClick = () => {
|
||||||
ElMessage.info("点击事件");
|
message("点击事件", { type: "info" });
|
||||||
};
|
};
|
||||||
const disabledClick = () => {
|
const disabledClick = () => {
|
||||||
ElMessage.info("失效");
|
message("失效", { type: "info" });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { markRaw } from "vue";
|
||||||
import { useRenderFlicker } from "@/components/ReFlicker";
|
import { useRenderFlicker } from "@/components/ReFlicker";
|
||||||
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
|
import Iphone from "@iconify-icons/ep/iphone";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "TimeLine"
|
name: "TimeLine"
|
||||||
@@ -11,12 +13,12 @@ const activities = [
|
|||||||
{
|
{
|
||||||
content: "支持圆点闪动",
|
content: "支持圆点闪动",
|
||||||
timestamp: lastBuildTime,
|
timestamp: lastBuildTime,
|
||||||
icon: useRenderFlicker()
|
icon: markRaw(useRenderFlicker())
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "支持方形闪动",
|
content: "支持方形闪动",
|
||||||
timestamp: lastBuildTime,
|
timestamp: lastBuildTime,
|
||||||
icon: useRenderFlicker({ borderRadius: 0, background: "#67C23A" })
|
icon: markRaw(useRenderFlicker({ borderRadius: 0, background: "#67C23A" }))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "支持默认颜色",
|
content: "支持默认颜色",
|
||||||
@@ -31,7 +33,7 @@ const activities = [
|
|||||||
content: "支持自定义图标",
|
content: "支持自定义图标",
|
||||||
timestamp: lastBuildTime,
|
timestamp: lastBuildTime,
|
||||||
color: "transparent",
|
color: "transparent",
|
||||||
icon: useRenderIcon("iphone", {
|
icon: useRenderIcon(Iphone, {
|
||||||
color: "#0bbd87"
|
color: "#0bbd87"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
import { faker } from "@faker-js/faker";
|
|
||||||
|
|
||||||
let uid = 0;
|
|
||||||
|
|
||||||
function generateItem() {
|
|
||||||
return {
|
|
||||||
name: faker.name.findName(),
|
|
||||||
avatar: faker.internet.avatar()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getData(count, letters) {
|
|
||||||
const raw = {};
|
|
||||||
|
|
||||||
const alphabet = "abcdefghijklmnopqrstuvwxyz".split("");
|
|
||||||
|
|
||||||
for (const l of alphabet) {
|
|
||||||
raw[l] = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < count; i++) {
|
|
||||||
const item = generateItem();
|
|
||||||
const letter = item.name.charAt(0).toLowerCase();
|
|
||||||
raw[letter].push(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
const list = [];
|
|
||||||
let index = 1;
|
|
||||||
|
|
||||||
for (const l of alphabet) {
|
|
||||||
raw[l] = raw[l].sort((a, b) => (a.name < b.name ? -1 : 1));
|
|
||||||
if (letters) {
|
|
||||||
list.push({
|
|
||||||
id: uid++,
|
|
||||||
index: index++,
|
|
||||||
type: "letter",
|
|
||||||
value: l,
|
|
||||||
height: 200
|
|
||||||
});
|
|
||||||
}
|
|
||||||
for (const item of raw[l]) {
|
|
||||||
list.push({
|
|
||||||
id: uid++,
|
|
||||||
index: index++,
|
|
||||||
type: "person",
|
|
||||||
value: item,
|
|
||||||
height: 50
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function addItem(list) {
|
|
||||||
list.push({
|
|
||||||
id: uid++,
|
|
||||||
index: list.length + 1,
|
|
||||||
type: "person",
|
|
||||||
value: generateItem(),
|
|
||||||
height: 50
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function generateMessage() {
|
|
||||||
return {
|
|
||||||
avatar: faker.internet.avatar(),
|
|
||||||
message: faker.lorem.text()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { generateMessage } from "./data";
|
import { DynamicScroller, DynamicScrollerItem } from "vue-virtual-scroller";
|
||||||
|
|
||||||
const items = ref([]);
|
const items = ref([]);
|
||||||
const search = ref("");
|
const search = ref("");
|
||||||
|
|
||||||
for (let i = 0; i < 10000; i++) {
|
for (let i = 0; i < 800; i++) {
|
||||||
items.value.push({
|
items.value.push({
|
||||||
id: i,
|
id: i
|
||||||
...generateMessage()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const filteredItems = computed(() => {
|
const filteredItems = computed(() => {
|
||||||
if (!search.value) return items.value;
|
if (!search.value) return items.value;
|
||||||
const lowerCaseSearch = search.value.toLowerCase();
|
const lowerCaseSearch = search.value;
|
||||||
return items.value.filter(i =>
|
return items.value.filter(i => i.id == lowerCaseSearch);
|
||||||
i.message.toLowerCase().includes(lowerCaseSearch)
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeMessage(message) {
|
|
||||||
Object.assign(message, generateMessage());
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="dynamic-scroller-demo">
|
<div class="dynamic-scroller-demo">
|
||||||
<div class="flex justify-around mb-4">
|
<div class="flex-ac mb-4 shadow-2xl">
|
||||||
|
水平模式 horizontal
|
||||||
<el-input
|
<el-input
|
||||||
class="mr-2 !w-[1/1.5]"
|
class="mr-2 !w-[1/1.5]"
|
||||||
clearable
|
clearable
|
||||||
@@ -35,7 +29,6 @@ function changeMessage(message) {
|
|||||||
placeholder="Filter..."
|
placeholder="Filter..."
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
/>
|
/>
|
||||||
<el-tag effect="dark">水平模式horizontal</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DynamicScroller
|
<DynamicScroller
|
||||||
@@ -48,31 +41,21 @@ function changeMessage(message) {
|
|||||||
<DynamicScrollerItem
|
<DynamicScrollerItem
|
||||||
:item="item"
|
:item="item"
|
||||||
:active="active"
|
:active="active"
|
||||||
:size-dependencies="[item.message]"
|
:size-dependencies="[item.id]"
|
||||||
:data-index="index"
|
:data-index="index"
|
||||||
:data-active="active"
|
:data-active="active"
|
||||||
:title="`Click to change message ${index}`"
|
:title="`Click to change message ${index}`"
|
||||||
:style="{
|
:style="{
|
||||||
width: `${Math.max(
|
width: `${Math.max(130, Math.round((item.id?.length / 20) * 20))}px`
|
||||||
130,
|
|
||||||
Math.round((item.message.length / 20) * 20)
|
|
||||||
)}px`
|
|
||||||
}"
|
}"
|
||||||
class="message"
|
class="message"
|
||||||
@click="changeMessage(item)"
|
|
||||||
>
|
>
|
||||||
<div class="avatar">
|
<div>
|
||||||
<IconifyIconOnline
|
<IconifyIconOnline
|
||||||
icon="openmoji:beaming-face-with-smiling-eyes"
|
icon="openmoji:beaming-face-with-smiling-eyes"
|
||||||
width="40"
|
width="40"
|
||||||
/>
|
/>
|
||||||
</div>
|
<p class="text-center">{{ item.id }}</p>
|
||||||
<div class="text">
|
|
||||||
{{ item.message }}
|
|
||||||
</div>
|
|
||||||
<div class="index">
|
|
||||||
<span>{{ item.id }} (id)</span>
|
|
||||||
<span>{{ index }} (index)</span>
|
|
||||||
</div>
|
</div>
|
||||||
</DynamicScrollerItem>
|
</DynamicScrollerItem>
|
||||||
</template>
|
</template>
|
||||||
@@ -104,35 +87,4 @@ function changeMessage(message) {
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
|
||||||
flex: auto 0 0;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar .image {
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index,
|
|
||||||
.text {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index span {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import verticalList from "./vertical.vue";
|
import verticalList from "./vertical.vue";
|
||||||
import horizontalList from "./horizontal.vue";
|
import horizontalList from "./horizontal.vue";
|
||||||
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "VirtualList"
|
name: "VirtualList"
|
||||||
|
|||||||
@@ -1,75 +1,56 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { generateMessage } from "./data";
|
import { DynamicScroller, DynamicScrollerItem } from "vue-virtual-scroller";
|
||||||
|
|
||||||
const items = ref([]);
|
const items = ref([]);
|
||||||
const search = ref("");
|
const search = ref("");
|
||||||
|
|
||||||
for (let i = 0; i < 10000; i++) {
|
for (let i = 0; i < 800; i++) {
|
||||||
items.value.push({
|
items.value.push({
|
||||||
id: i,
|
id: i
|
||||||
...generateMessage()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const filteredItems = computed(() => {
|
const filteredItems = computed(() => {
|
||||||
if (!search.value) return items.value;
|
if (!search.value) return items.value;
|
||||||
const lowerCaseSearch = search.value.toLowerCase();
|
const lowerCaseSearch = search.value;
|
||||||
return items.value.filter(i =>
|
return items.value.filter(i => i.id == lowerCaseSearch);
|
||||||
i.message.toLowerCase().includes(lowerCaseSearch)
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeMessage(message) {
|
|
||||||
Object.assign(message, generateMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
function onResize() {
|
|
||||||
console.log("resize");
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="dynamic-scroller-demo">
|
<div class="dynamic-scroller-demo">
|
||||||
<div class="flex justify-around mb-4">
|
<div class="flex-ac mb-4 shadow-2xl">
|
||||||
|
垂直模式 vertical
|
||||||
<el-input
|
<el-input
|
||||||
class="mr-2 !w-[1/1.5]"
|
class="!w-[350px]"
|
||||||
clearable
|
clearable
|
||||||
v-model="search"
|
v-model="search"
|
||||||
placeholder="Filter..."
|
placeholder="Filter..."
|
||||||
/>
|
/>
|
||||||
<el-tag effect="dark">垂直模式vertical</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DynamicScroller
|
<DynamicScroller
|
||||||
:items="filteredItems"
|
:items="filteredItems"
|
||||||
:min-item-size="54"
|
:min-item-size="54"
|
||||||
class="scroller"
|
class="scroller"
|
||||||
@resize="onResize"
|
|
||||||
>
|
>
|
||||||
<template #default="{ item, index, active }">
|
<template #default="{ item, index, active }">
|
||||||
<DynamicScrollerItem
|
<DynamicScrollerItem
|
||||||
:item="item"
|
:item="item"
|
||||||
:active="active"
|
:active="active"
|
||||||
:size-dependencies="[item.message]"
|
:size-dependencies="[item.id]"
|
||||||
:data-index="index"
|
:data-index="index"
|
||||||
:data-active="active"
|
:data-active="active"
|
||||||
:title="`Click to change message ${index}`"
|
:title="`Click to change message ${index}`"
|
||||||
class="message"
|
class="message"
|
||||||
@click="changeMessage(item)"
|
|
||||||
>
|
>
|
||||||
<div class="avatar">
|
<div class="flex items-center">
|
||||||
<IconifyIconOnline
|
<IconifyIconOnline
|
||||||
icon="openmoji:beaming-face-with-smiling-eyes"
|
icon="openmoji:beaming-face-with-smiling-eyes"
|
||||||
width="40"
|
width="40"
|
||||||
/>
|
/>
|
||||||
</div>
|
<span>{{ item.id }}</span>
|
||||||
<div class="text">
|
|
||||||
{{ item.message }}
|
|
||||||
</div>
|
|
||||||
<div class="index">
|
|
||||||
<span>{{ item.id }} (id)</span>
|
|
||||||
<span>{{ index }} (index)</span>
|
|
||||||
</div>
|
</div>
|
||||||
</DynamicScrollerItem>
|
</DynamicScrollerItem>
|
||||||
</template>
|
</template>
|
||||||
@@ -94,31 +75,4 @@ function onResize() {
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
|
||||||
flex: auto 0 0;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin-right: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index,
|
|
||||||
.text {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
max-width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index span {
|
|
||||||
display: inline-block;
|
|
||||||
width: 160px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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>
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import basic from "./basic.vue";
|
import basic from "./basic.vue";
|
||||||
import menuGroup from "./menuGroup.vue";
|
import menuGroup from "./menuGroup.vue";
|
||||||
import menuDynamic from "./menuDynamic.vue";
|
import menuDynamic from "./menuDynamic.vue";
|
||||||
|
import "v-contextmenu/dist/themes/default.css";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "ContextMenu"
|
name: "ContextMenu"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ defineOptions({
|
|||||||
name: "Danmaku"
|
name: "Danmaku"
|
||||||
});
|
});
|
||||||
|
|
||||||
const danmaku = ref<any>(null);
|
const danmaku = ref();
|
||||||
const danmus = ref<any[]>(getDanmuData());
|
const danmus = ref<any[]>(getDanmuData());
|
||||||
const danmuMsg = ref<string>("");
|
const danmuMsg = ref<string>("");
|
||||||
let timer = 0;
|
let timer = 0;
|
||||||
@@ -112,7 +112,7 @@ function addDanmu() {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
style="font-size: 16px; margin: 0 4px 5px"
|
||||||
>
|
>
|
||||||
vue-danmaku
|
vue3-danmaku
|
||||||
</el-link>
|
</el-link>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import Sortable, { Swap } from "sortablejs";
|
|||||||
import draggable from "vuedraggable/src/vuedraggable";
|
import draggable from "vuedraggable/src/vuedraggable";
|
||||||
import { useAppStoreHook } from "@/store/modules/app";
|
import { useAppStoreHook } from "@/store/modules/app";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
|
import Rank from "@iconify-icons/ep/rank";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "Draggable"
|
name: "Draggable"
|
||||||
@@ -63,7 +64,7 @@ onMounted(() => {
|
|||||||
<el-link
|
<el-link
|
||||||
href="https://sortablejs.github.io/vue.draggable.next/#/simple"
|
href="https://sortablejs.github.io/vue.draggable.next/#/simple"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:icon="useRenderIcon('rank')"
|
:icon="useRenderIcon(Rank)"
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
style="font-size: 16px; margin: 0 4px 5px"
|
||||||
>
|
>
|
||||||
vuedraggable
|
vuedraggable
|
||||||
|
|||||||
197
src/views/components/message/index.vue
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { h } from "vue";
|
||||||
|
import hot from "@/assets/svg/hot.svg?component";
|
||||||
|
import { message, closeAllMessage } from "@/utils/message";
|
||||||
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
|
import Check from "@iconify-icons/ep/check";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "Message"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-card>
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span class="font-medium"> Message提示 </span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<h4 class="mb-4">element-plus 的消息提示,点击弹出提示信息</h4>
|
||||||
|
|
||||||
|
<el-space wrap>
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
@click="message('Info类型消息', { customClass: 'el' })"
|
||||||
|
>
|
||||||
|
Info
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
@click="
|
||||||
|
message('Success类型消息', { customClass: 'el', type: 'success' })
|
||||||
|
"
|
||||||
|
>
|
||||||
|
Success
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
@click="
|
||||||
|
message('Warning类型消息', { customClass: 'el', type: 'warning' })
|
||||||
|
"
|
||||||
|
>
|
||||||
|
Warning
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="message('Error类型消息', { customClass: 'el', type: 'error' })"
|
||||||
|
>
|
||||||
|
Error
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="message('可关闭消息', { customClass: 'el', showClose: true })"
|
||||||
|
>
|
||||||
|
可关闭
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('分组消息合并', {
|
||||||
|
customClass: 'el',
|
||||||
|
type: 'success',
|
||||||
|
grouping: true
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
分组消息合并
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('自定义消息图标', {
|
||||||
|
customClass: 'el',
|
||||||
|
icon: useRenderIcon(Check)
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
自定义图标
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('3秒后关闭', {
|
||||||
|
customClass: 'el',
|
||||||
|
duration: 3000,
|
||||||
|
onClose: () =>
|
||||||
|
message('消息已关闭', { customClass: 'el', type: 'success' })
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
自定义延时关闭时间并设置关闭后其他操作
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message(
|
||||||
|
h('p', null, [
|
||||||
|
h('span', null, 'Message can be '),
|
||||||
|
h('i', { style: 'color: teal' }, 'VNode')
|
||||||
|
]),
|
||||||
|
{ customClass: 'el' }
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
自定义内容
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('<strong>This is <i>HTML</i> string</strong>', {
|
||||||
|
customClass: 'el',
|
||||||
|
dangerouslyUseHTMLString: true
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
HTML 片段作为正文内容
|
||||||
|
</el-button>
|
||||||
|
</el-space>
|
||||||
|
|
||||||
|
<el-divider />
|
||||||
|
|
||||||
|
<h4 class="mb-4">
|
||||||
|
类似 Ant Design 风格的消息提示,点击弹出提示信息(基于 ElMessage
|
||||||
|
样式改版,不会影响 ElMessage
|
||||||
|
原本样式,使用和打包大小成本极低并适配暗黑模式)
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<el-space wrap>
|
||||||
|
<el-button type="info" @click="message('Info类型消息')">Info</el-button>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
@click="message('Success类型消息', { type: 'success' })"
|
||||||
|
>
|
||||||
|
Success
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
@click="message('Warning类型消息', { type: 'warning' })"
|
||||||
|
>
|
||||||
|
Warning
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="message('Error类型消息', { type: 'error' })"
|
||||||
|
>
|
||||||
|
Error
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="message('可关闭消息', { showClose: true })">
|
||||||
|
可关闭
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="message('分组消息合并', { type: 'success', grouping: true })"
|
||||||
|
>
|
||||||
|
分组消息合并
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('自定义消息图标', {
|
||||||
|
icon: hot
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
自定义图标
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('3秒后关闭', {
|
||||||
|
duration: 3000,
|
||||||
|
onClose: () => message('消息已关闭', { type: 'success' })
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
自定义延时关闭时间并设置关闭后其他操作
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message(
|
||||||
|
h('p', null, [
|
||||||
|
h('span', null, 'Message can be '),
|
||||||
|
h('i', { style: 'color: teal' }, 'VNode')
|
||||||
|
])
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
自定义内容
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
message('<strong>This is <i>HTML</i> string</strong>', {
|
||||||
|
dangerouslyUseHTMLString: true
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
HTML 片段作为正文内容
|
||||||
|
</el-button>
|
||||||
|
</el-space>
|
||||||
|
|
||||||
|
<el-divider />
|
||||||
|
|
||||||
|
<el-button @click="closeAllMessage"> 关闭所有消息提示 </el-button>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
@@ -6,6 +6,7 @@ import { deviceDetection } from "@pureadmin/utils";
|
|||||||
import screenShot from "xgplayer/es/controls/screenShot";
|
import screenShot from "xgplayer/es/controls/screenShot";
|
||||||
import playbackRate from "xgplayer/es/controls/playbackRate";
|
import playbackRate from "xgplayer/es/controls/playbackRate";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
|
import VideoPlay from "@iconify-icons/ep/video-play";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "Video"
|
name: "Video"
|
||||||
@@ -38,7 +39,7 @@ onMounted(() => {
|
|||||||
<el-link
|
<el-link
|
||||||
href="https://v2.h5player.bytedance.com"
|
href="https://v2.h5player.bytedance.com"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:icon="useRenderIcon('video-play')"
|
:icon="useRenderIcon(VideoPlay)"
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
style="font-size: 16px; margin: 0 4px 5px"
|
||||||
>
|
>
|
||||||
西瓜播放器
|
西瓜播放器
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import "@wangeditor/editor/dist/css/style.css"; // 引入 css
|
|||||||
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import { onBeforeUnmount, ref, shallowRef, onMounted } from "vue";
|
import { onBeforeUnmount, ref, shallowRef, onMounted } from "vue";
|
||||||
|
import Edit from "@iconify-icons/ep/edit";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "Editor"
|
name: "Editor"
|
||||||
@@ -46,7 +47,7 @@ const handleCreated = editor => {
|
|||||||
<el-link
|
<el-link
|
||||||
href="https://www.wangeditor.com"
|
href="https://www.wangeditor.com"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:icon="useRenderIcon('edit')"
|
:icon="useRenderIcon(Edit)"
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
style="font-size: 16px; margin: 0 4px 5px"
|
||||||
>
|
>
|
||||||
Wangeditor
|
Wangeditor
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import { Snapshot, BpmnElement, Menu } from "@logicflow/extension";
|
|||||||
import { Control, NodePanel, DataDialog } from "@/components/ReFlowChart";
|
import { Control, NodePanel, DataDialog } from "@/components/ReFlowChart";
|
||||||
import { toLogicflowData } from "@/components/ReFlowChart/src/adpterForTurbo";
|
import { toLogicflowData } from "@/components/ReFlowChart/src/adpterForTurbo";
|
||||||
|
|
||||||
|
import SetUp from "@iconify-icons/ep/set-up";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "FlowChart"
|
name: "FlowChart"
|
||||||
});
|
});
|
||||||
@@ -71,7 +73,7 @@ onMounted(() => {
|
|||||||
<el-link
|
<el-link
|
||||||
href="http://logic-flow.org/"
|
href="http://logic-flow.org/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:icon="useRenderIcon('set-up')"
|
:icon="useRenderIcon(SetUp)"
|
||||||
style="font-size: 16px; margin: 0 4px 5px"
|
style="font-size: 16px; margin: 0 4px 5px"
|
||||||
>
|
>
|
||||||
LogicFlow
|
LogicFlow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import laptopIcon from "@/assets/svg/laptop.svg?component";
|
|||||||
import serviceIcon from "@/assets/svg/service.svg?component";
|
import serviceIcon from "@/assets/svg/service.svg?component";
|
||||||
import calendarIcon from "@/assets/svg/calendar.svg?component";
|
import calendarIcon from "@/assets/svg/calendar.svg?component";
|
||||||
import userAvatarIcon from "@/assets/svg/user_avatar.svg?component";
|
import userAvatarIcon from "@/assets/svg/user_avatar.svg?component";
|
||||||
|
import More2Fill from "@iconify-icons/ri/more-2-fill";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "ReCard"
|
name: "ReCard"
|
||||||
@@ -64,7 +65,7 @@ const cardLogoClass = computed(() => [
|
|||||||
{{ product.isSetup ? "已启用" : "已停用" }}
|
{{ product.isSetup ? "已启用" : "已停用" }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-dropdown trigger="click" :disabled="!product.isSetup">
|
<el-dropdown trigger="click" :disabled="!product.isSetup">
|
||||||
<IconifyIconOffline icon="more-vertical" class="text-[24px]" />
|
<IconifyIconOffline :icon="More2Fill" class="text-[24px]" />
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu :disabled="!product.isSetup">
|
<el-dropdown-menu :disabled="!product.isSetup">
|
||||||
<el-dropdown-item @click="handleClickManage(product)">
|
<el-dropdown-item @click="handleClickManage(product)">
|
||||||
|
|||||||