mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90a61a1000 | ||
|
|
ad34c7b891 | ||
|
|
c5b107eab9 | ||
|
|
a8c59c5c36 | ||
|
|
0d4d3a301b | ||
|
|
b10c3eb1bb | ||
|
|
9b62d6ef1e | ||
|
|
8ff242ea45 | ||
|
|
867ef87a34 | ||
|
|
2235d9d7a8 | ||
|
|
5c82fdcd0f | ||
|
|
641355083c | ||
|
|
cadd611559 | ||
|
|
fb734f3394 | ||
|
|
e4a87e2138 | ||
|
|
12db42892d | ||
|
|
13a0db0180 | ||
|
|
facb09d779 | ||
|
|
617f8e936c | ||
|
|
6e48ad79a7 | ||
|
|
3984ab19c9 | ||
|
|
49a9259f2e | ||
|
|
867bbad1be | ||
|
|
ead4318163 | ||
|
|
bfa9203883 | ||
|
|
4f5f18f61c | ||
|
|
df71c7f75c | ||
|
|
c4839aa5f4 | ||
|
|
c19fbb1473 | ||
|
|
3cdebf4ee9 | ||
|
|
2bb433c3cd | ||
|
|
731e9b2f57 | ||
|
|
b606fa454d | ||
|
|
c6bd3f11b6 | ||
|
|
d11398274a | ||
|
|
b2081b3481 | ||
|
|
f5b7ee5a81 | ||
|
|
20a1293a55 | ||
|
|
504b45783f | ||
|
|
27bc135bd2 | ||
|
|
4d91d2017c | ||
|
|
523c979488 | ||
|
|
d2bba801d9 | ||
|
|
ceb1ec6e6d | ||
|
|
aa83ea83fa | ||
|
|
4a7d5d6573 | ||
|
|
b69db2ff2c | ||
|
|
c288d438dc | ||
|
|
94f72cd6d9 |
@@ -1,14 +1,8 @@
|
||||
# 项目本地运行端口号
|
||||
# 平台本地运行端口号
|
||||
VITE_PORT = 8848
|
||||
|
||||
# 开发环境读取配置文件路径
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 开发环境代理
|
||||
VITE_PROXY_DOMAIN = /api
|
||||
|
||||
# 开发环境路由历史模式
|
||||
# 开发环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数")
|
||||
VITE_ROUTER_HISTORY = "hash"
|
||||
|
||||
# 开发环境后端地址
|
||||
VITE_PROXY_DOMAIN_REAL = "http://127.0.0.1:3000"
|
||||
@@ -1,15 +1,9 @@
|
||||
# 线上环境项目打包路径
|
||||
# 线上环境平台打包路径
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 线上环境路由历史模式
|
||||
# 线上环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数")
|
||||
VITE_ROUTER_HISTORY = "hash"
|
||||
|
||||
# 线上环境后端地址
|
||||
VITE_PROXY_DOMAIN_REAL = ""
|
||||
|
||||
# 是否为打包后的文件提供传统浏览器兼容性支持 支持 true 不支持 false
|
||||
VITE_LEGACY = false
|
||||
|
||||
# 是否在打包时使用cdn替换本地库 替换 true 不替换 false
|
||||
VITE_CDN = false
|
||||
|
||||
|
||||
12
.env.staging
12
.env.staging
@@ -4,19 +4,13 @@ NODE_ENV=production
|
||||
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 线上环境路由历史模式
|
||||
# 预发布环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数")
|
||||
VITE_ROUTER_HISTORY = "hash"
|
||||
|
||||
# 线上环境后端地址
|
||||
VITE_PROXY_DOMAIN_REAL = ""
|
||||
|
||||
# 是否为打包后的文件提供传统浏览器兼容性支持 支持 true 不支持 false
|
||||
VITE_LEGACY = false
|
||||
|
||||
# 是否在打包时使用cdn替换本地库 替换 true 不替换 false
|
||||
VITE_CDN = false
|
||||
VITE_CDN = true
|
||||
|
||||
# 是否启用gzip压缩或brotli压缩(分两种情况,删除原始文件和不删除原始文件)
|
||||
# 压缩时不删除原始文件的配置:gzip、brotli、both(同时开启 gzip 与 brotli 压缩)、none(不开启压缩,默认)
|
||||
# 压缩时删除原始文件的配置:gzip-clear、brotli-clear、both-clear(同时开启 gzip 与 brotli 压缩)、none(不开启压缩,默认)
|
||||
VITE_COMPRESSION = "none"
|
||||
VITE_COMPRESSION = "both-clear"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
public
|
||||
dist
|
||||
*.d.ts
|
||||
/src/assets
|
||||
package.json
|
||||
.eslintrc.js
|
||||
.prettierrc.js
|
||||
commitlint.config.js
|
||||
postcss.config.js
|
||||
tailwind.config.js
|
||||
stylelint.config.js
|
||||
stylelint.config.js
|
||||
src/components/ReSplitPane/iconfont
|
||||
src/components/ReFlowChart/src/assets/iconfont
|
||||
@@ -1,3 +1,66 @@
|
||||
# 3.7.1 (2022-11-22)
|
||||
|
||||
### 🔥 hotfix
|
||||
|
||||
- Fixed the problem that the tab page may not be reset when logging out when the tab page cache is not turned on
|
||||
|
||||
# 3.7.0 (2022-11-21)
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- Replace `driver.js` with `intro.js`
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add front-end single sign-on, test address https://yiming_chang.gitee.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- Add more examples for [@pureadmin/table](https://github.com/xiaoxian521/pure-admin-table) and `element-plus` [table](https://element-plus.org /zh-CN/component/table.html) example remains the same
|
||||
- Rich watermark function page (supports customizing various colors, shadows, text, additional attributes, setting undeletable watermarks and setting watermarks for specified elements)
|
||||
- Optimize the menu, add `MenuArrowIconNoTransition` global configuration, configure it in `public/serverConfig.json`, for the left menu mode, the menu expansion can be set `MenuArrowIconNoTransition: true` to solve
|
||||
- Replacement form designer component demo
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Repair the in-page menu with parameters to jump to each other, the label is not selected and highlighted
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Removed deprecated `$baseUrl`
|
||||
- Compatible importing a certain library leads to `global is not defined` error, importing `src/utils/globalPolyfills.ts` file into `src/main.ts` can solve the problem
|
||||
- Remove `@vitejs/plugin-legacy`, `vue3` cannot make it support `ie` through any tool
|
||||
|
||||
# 3.6.4 (2022-11-10)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Menu icon `icon` supports using online icons
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed `vxe-button` font color issue after mouse overlay and some other style issues
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize the routing guard, if you have logged in and there is login information, you cannot jump to the routing whitelist, but continue to stay on the current page
|
||||
- Removed `baseURL` and global environment proxy, and can be written directly in `vite.config.ts`, which is convenient and supports multiple proxy addresses
|
||||
|
||||
# 3.6.3 (2022-11-01)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Static resource classification and packaging
|
||||
- Add danmaku component `demo`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fix the `collapse` property added in the latest version of `tailwindcss` conflicts with the platform `class` class name
|
||||
- Fix that when the `token` expires, if the page has multiple requests, the `token` will be refreshed repeatedly
|
||||
|
||||
# 3.6.2 (2022-10-27)
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- Replace `/@/` alias with `@/` alias
|
||||
|
||||
# 3.6.1 (2022-10-27)
|
||||
|
||||
### 🎫 Feat
|
||||
@@ -88,7 +151,7 @@
|
||||
|
||||
- Secondary encapsulation of `Table` of `element-plus` into [@pureadmin/table](https://github.com/xiaoxian521/pure-admin-table), providing flexible configuration items and integrating into the platform
|
||||
- Secondary encapsulation of `Descriptions` of `element-plus` into [@pureadmin/descriptions](https://github.com/xiaoxian521/pure-admin-descriptions), providing flexible configuration items and integrating into the platform
|
||||
- Centralize most of the tools and hooks of the platform to [@pureadmin/utils](https://pure-admin-utils-docs.vercel.app/), and delete the code concentrated in this library to reduce the size of the platform
|
||||
- Centralize most of the tools and hooks of the platform to [@pureadmin/utils](https://pure-admin-utils.netlify.app), and delete the code concentrated in this library to reduce the size of the platform
|
||||
- Add [unplugin-vue-define-options](https://www.npmjs.com/package/unplugin-vue-define-options) plugin, the page can directly write `defineOptions({name: custom name})`
|
||||
- Add project files, language analysis tool [cloc](https://www.npmjs.com/package/cloc)
|
||||
- Added landing page internationalization
|
||||
@@ -249,7 +312,6 @@
|
||||
- Optimize the tab page to bring a better interactive experience
|
||||
- Routing title supports direct writing in Chinese, which can be separated from internationalization
|
||||
- Route history mode is read from env and supports base parameter
|
||||
- Packaged files provide traditional browser compatibility support, configure VITE_LEGACY to true
|
||||
|
||||
# 2.6.0(2021-11-10)
|
||||
|
||||
|
||||
66
CHANGELOG.md
66
CHANGELOG.md
@@ -1,3 +1,66 @@
|
||||
# 3.7.1 (2022-11-22)
|
||||
|
||||
### 🔥 hotfix
|
||||
|
||||
- Fixed the problem that the tab page may not be reset when logging out when the tab page cache is not turned on
|
||||
|
||||
# 3.7.0 (2022-11-21)
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- Replace `driver.js` with `intro.js`
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add front-end single sign-on, test address https://yiming_chang.gitee.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- Add more examples for [@pureadmin/table](https://github.com/xiaoxian521/pure-admin-table) and `element-plus` [table](https://element-plus.org /zh-CN/component/table.html) example remains the same
|
||||
- Rich watermark function page (supports customizing various colors, shadows, text, additional attributes, setting undeletable watermarks and setting watermarks for specified elements)
|
||||
- Optimize the menu, add `MenuArrowIconNoTransition` global configuration, configure it in `public/serverConfig.json`, for the left menu mode, the menu expansion can be set `MenuArrowIconNoTransition: true` to solve
|
||||
- Replacement form designer component demo
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Repair the in-page menu with parameters to jump to each other, the label is not selected and highlighted
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Removed deprecated `$baseUrl`
|
||||
- Compatible importing a certain library leads to `global is not defined` error, importing `src/utils/globalPolyfills.ts` file into `src/main.ts` can solve the problem
|
||||
- Remove `@vitejs/plugin-legacy`, `vue3` cannot make it support `ie` through any tool
|
||||
|
||||
# 3.6.4 (2022-11-10)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Menu icon `icon` supports using online icons
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed `vxe-button` font color issue after mouse overlay and some other style issues
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize the routing guard, if you have logged in and there is login information, you cannot jump to the routing whitelist, but continue to stay on the current page
|
||||
- Removed `baseURL` and global environment proxy, and can be written directly in `vite.config.ts`, which is convenient and supports multiple proxy addresses
|
||||
|
||||
# 3.6.3 (2022-11-01)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Static resource classification and packaging
|
||||
- Add danmaku component `demo`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fix the `collapse` property added in the latest version of `tailwindcss` conflicts with the platform `class` class name
|
||||
- Fix that when the `token` expires, if the page has multiple requests, the `token` will be refreshed repeatedly
|
||||
|
||||
# 3.6.2 (2022-10-27)
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- Replace `/@/` alias with `@/` alias
|
||||
|
||||
# 3.6.1 (2022-10-27)
|
||||
|
||||
### 🎫 Feat
|
||||
@@ -88,7 +151,7 @@
|
||||
|
||||
- Secondary encapsulation of `Table` of `element-plus` into [@pureadmin/table](https://github.com/xiaoxian521/pure-admin-table), providing flexible configuration items and integrating into the platform
|
||||
- Secondary encapsulation of `Descriptions` of `element-plus` into [@pureadmin/descriptions](https://github.com/xiaoxian521/pure-admin-descriptions), providing flexible configuration items and integrating into the platform
|
||||
- Centralize most of the tools and hooks of the platform to [@pureadmin/utils](https://pure-admin-utils-docs.vercel.app/), and delete the code concentrated in this library to reduce the size of the platform
|
||||
- Centralize most of the tools and hooks of the platform to [@pureadmin/utils](https://pure-admin-utils.netlify.app), and delete the code concentrated in this library to reduce the size of the platform
|
||||
- Add [unplugin-vue-define-options](https://www.npmjs.com/package/unplugin-vue-define-options) plugin, the page can directly write `defineOptions({name: custom name})`
|
||||
- Add project files, language analysis tool [cloc](https://www.npmjs.com/package/cloc)
|
||||
- Added landing page internationalization
|
||||
@@ -249,7 +312,6 @@
|
||||
- Optimize the tab page to bring a better interactive experience
|
||||
- Routing title supports direct writing in Chinese, which can be separated from internationalization
|
||||
- Route history mode is read from env and supports base parameter
|
||||
- Packaged files provide traditional browser compatibility support, configure VITE_LEGACY to true
|
||||
|
||||
# 2.6.0(2021-11-10)
|
||||
|
||||
|
||||
@@ -1,3 +1,66 @@
|
||||
# 3.7.1 (2022-11-22)
|
||||
|
||||
### 🔥 hotfix
|
||||
|
||||
- 修复在未开启标签页缓存时退出登录,可能存在标签页未重置的问题
|
||||
|
||||
# 3.7.0 (2022-11-21)
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- 使用 `intro.js` 替换 `driver.js`
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加前端单点登录,测试地址 https://yiming_chang.gitee.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- 为 [@pureadmin/table](https://github.com/xiaoxian521/pure-admin-table) 添加更多的示例和 `element-plus` 的 [table](https://element-plus.org/zh-CN/component/table.html) 示例保持一致
|
||||
- 丰富水印功能页面(支持自定义各种颜色、阴影、文字、额外属性、设置不可删除水印以及给指定元素设置水印)
|
||||
- 优化菜单,添加 `MenuArrowIconNoTransition` 全局配置,在 `public/serverConfig.json` 中配置即可,对于出现左侧菜单模式,菜单展开卡顿的可设置 `MenuArrowIconNoTransition: true` 即可解决
|
||||
- 更换表单设计器组件演示
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复页内菜单带参互相跳转,标签没有选中高亮
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 删除已废弃的 `$baseUrl`
|
||||
- 兼容引入某个库导致 `global is not defined` 报错,将 `src/utils/globalPolyfills.ts` 文件引入 `src/main.ts` 即可解决
|
||||
- 删除 `@vitejs/plugin-legacy`,`vue3` 无法通过任何工具使其支持 `ie`
|
||||
|
||||
# 3.6.4 (2022-11-10)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 菜单图标 `icon` 支持使用在线图标
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复 `vxe-button` 鼠标覆盖后字体颜色问题以及一些别的样式问题
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 优化路由守卫,如果已经登录并存在登录信息后不能跳转到路由白名单,而是继续保持在当前页面
|
||||
- 将 `baseURL` 和全局环境代理删除,可直接在 `vite.config.ts` 编写,即方便又支持多个代理地址
|
||||
|
||||
# 3.6.3 (2022-11-01)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 静态资源分类打包
|
||||
- 添加弹幕组件 `demo`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复 `tailwindcss` 最新版新增的 `collapse` 属性与平台 `class` 类名冲突
|
||||
- 修复当 `token` 过期后,如果页面有多个请求会重复刷新 `token`
|
||||
|
||||
# 3.6.2 (2022-10-27)
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- 使用`@/`别名替换`/@/`别名
|
||||
|
||||
# 3.6.1 (2022-10-27)
|
||||
|
||||
### 🎫 Feat
|
||||
@@ -50,7 +113,7 @@
|
||||
|
||||
### ✔️ refactor
|
||||
|
||||
- 使用 `tailwindcss` 替换 `unocss`,新增 `tailwindcss` [使用文档](http://yiming_chang.gitee.io/pure-admin-doc/pages/39156f/)
|
||||
- 使用 `tailwindcss` 替换 `unocss`,新增 `tailwindcss` [使用文档](https://yiming_chang.gitee.io/pure-admin-doc/pages/tailwindcss/)
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
@@ -88,7 +151,7 @@
|
||||
|
||||
- 将 `element-plus` 的 `Table` 二次封装到[@pureadmin/table](https://github.com/xiaoxian521/pure-admin-table),提供灵活的配置项并集成到平台里
|
||||
- 将 `element-plus` 的 `Descriptions` 二次封装到[@pureadmin/descriptions](https://github.com/xiaoxian521/pure-admin-descriptions),提供灵活的配置项并集成到平台里
|
||||
- 将平台的大部分工具以及 hooks 都集中到[@pureadmin/utils](https://pure-admin-utils-docs.vercel.app/),并删除集中到这个库里的代码,减少平台体积
|
||||
- 将平台的大部分工具以及 `hooks` 都集中到[@pureadmin/utils](https://pure-admin-utils.netlify.app),并删除集中到这个库里的代码,减少平台体积
|
||||
- 添加[unplugin-vue-define-options](https://www.npmjs.com/package/unplugin-vue-define-options)插件,页面可直接写 `defineOptions({name: 自定义名称})`
|
||||
- 添加项目文件、语言分析工具 [cloc](https://www.npmjs.com/package/cloc)
|
||||
- 添加登录页国际化
|
||||
@@ -249,7 +312,6 @@
|
||||
- 优化标签页,带来更好的交互体验
|
||||
- 路由 title 支持直接写中文,可脱离国际化
|
||||
- 路由历史模式从 env 读取并支持 base 参数
|
||||
- 打包后的文件提供传统浏览器兼容性支持,配置 VITE_LEGACY 为 true
|
||||
|
||||
# 2.6.0(2021-11-10)
|
||||
|
||||
|
||||
@@ -8,32 +8,35 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
vue-pure-admin is a free and open source middle and back-end template. Using the latest `vue3` `vite2` `Element-Plus` `TypeScript` and other mainstream technology development, the out-of-the-box middle and back-end front-end solutions can also be used for learning reference.
|
||||
`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`
|
||||
|
||||
## Supporting Video
|
||||
|
||||
- [Click Watch Tutorial](https://www.bilibili.com/video/BV1534y1S7HV)
|
||||
- [Click Watch Tutorial](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||
- [Click Watch UI Design](https://www.bilibili.com/video/BV17g411T7rq)
|
||||
|
||||
## Docs
|
||||
## Docs (support `PWA` fast, offline access)
|
||||
|
||||
- [Click me to view the domestic documentation site](http://yiming_chang.gitee.io/pure-admin-doc)
|
||||
- [Click me to view foreign document site 1](https://xiaoxian521.github.io/pure-admin-doc)
|
||||
- [Click me to view foreign document site 2](https://pure-admin-doc.vercel.app)
|
||||
- [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)
|
||||
|
||||
## Thin
|
||||
## Thin version (offering non-internationalized and internationalized versions)
|
||||
|
||||
- [Click Watch Thin](https://github.com/xiaoxian521/pure-admin-thin)
|
||||
- [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
|
||||
|
||||
- [Click Watch Tauri](https://github.com/xiaoxian521/tauri-pure-admin)
|
||||
|
||||
## Electron
|
||||
|
||||
- [Click Watch Electron](https://github.com/xiaoxian521/electron-pure-admin)
|
||||
|
||||
## Preview
|
||||
|
||||
- [Click me to view the domestic preview station](http://yiming_chang.gitee.io/vue-pure-admin)
|
||||
- [Click me to view foreign preview site 1](https://xiaoxian521.github.io/vue-pure-admin)
|
||||
- [Click me to view foreign preview station 2](https://vue-pure-admin.vercel.app)
|
||||
- [Click me to view the domestic preview station](https://yiming_chang.gitee.io/vue-pure-admin)
|
||||
- [Click me to view foreign preview site](https://xiaoxian521.github.io/vue-pure-admin)
|
||||
|
||||
- PC
|
||||
<p align="center">
|
||||
|
||||
27
README.md
27
README.md
@@ -8,32 +8,35 @@
|
||||
|
||||
## 简介
|
||||
|
||||
vue-pure-admin 是一个免费开源的中后台模版。使用了最新的`vue3` `vite2` `Element-Plus` `TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
|
||||
`vue-pure-admin` 是一款开源免费且开箱即用的中后台管理系统模版。使用了最新的 `Vue3`、`Vite`、`Element-Plus`、`TypeScript`、`Pinia`、`Tailwindcss` 等主流技术开发
|
||||
|
||||
## 配套视频
|
||||
|
||||
- [点我查看教程](https://www.bilibili.com/video/BV1534y1S7HV)
|
||||
- [点我查看快速开发教程](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||
- [点我查看 UI 设计](https://www.bilibili.com/video/BV17g411T7rq)
|
||||
|
||||
## 配套文档
|
||||
## 配套文档(支持 `PWA` 快速、离线访问)
|
||||
|
||||
- [点我查看国内文档站](http://yiming_chang.gitee.io/pure-admin-doc)
|
||||
- [点我查看国外文档站 1](https://xiaoxian521.github.io/pure-admin-doc)
|
||||
- [点我查看国外文档站 2](https://pure-admin-doc.vercel.app)
|
||||
- [点我查看国内文档站](https://yiming_chang.gitee.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)
|
||||
- [点我查看国际化精简版](https://github.com/xiaoxian521/pure-admin-thin/tree/i18n)
|
||||
|
||||
## Tauri 版
|
||||
|
||||
- [点我查看 Tauri 版](https://github.com/xiaoxian521/tauri-pure-admin)
|
||||
|
||||
## Electron 版
|
||||
|
||||
- [点我查看 Electron 版](https://github.com/xiaoxian521/electron-pure-admin)
|
||||
|
||||
## 预览
|
||||
|
||||
- [点我查看国内预览站](http://yiming_chang.gitee.io/vue-pure-admin)
|
||||
- [点我查看国外预览站 1](https://xiaoxian521.github.io/vue-pure-admin)
|
||||
- [点我查看国外预览站 2](https://vue-pure-admin.vercel.app)
|
||||
- [点我查看国内预览站](https://yiming_chang.gitee.io/vue-pure-admin)
|
||||
- [点我查看国外预览站](https://xiaoxian521.github.io/vue-pure-admin)
|
||||
|
||||
- PC 端
|
||||
<p align="center">
|
||||
@@ -145,7 +148,7 @@ pnpm build
|
||||
|
||||
一群已满,下面是二群,群里严禁`黄`、`赌`、`毒`、`vpn`等违法行为!
|
||||
|
||||
<img src="http://yiming_chang.gitee.io/pure-admin-doc/img/support/qq.png" width="150px" height="225px" />
|
||||
<img src="https://yiming_chang.gitee.io/pure-admin-doc/img/support/qq.png" width="150px" height="225px" />
|
||||
|
||||
## 许可证
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
/** 处理环境变量 */
|
||||
const warpperEnv = (envConf: Recordable): ViteEnv => {
|
||||
/** 此处为默认值,无需修改 */
|
||||
/** 此处为默认值 */
|
||||
const ret: ViteEnv = {
|
||||
VITE_PORT: 8848,
|
||||
VITE_PUBLIC_PATH: "",
|
||||
VITE_PROXY_DOMAIN: "",
|
||||
VITE_PROXY_DOMAIN_REAL: "",
|
||||
VITE_ROUTER_HISTORY: "",
|
||||
VITE_LEGACY: false,
|
||||
VITE_CDN: false,
|
||||
VITE_COMPRESSION: "none"
|
||||
};
|
||||
@@ -30,14 +27,9 @@ const warpperEnv = (envConf: Recordable): ViteEnv => {
|
||||
return ret;
|
||||
};
|
||||
|
||||
/** 跨域代理重写 */
|
||||
const regExps = (value: string, reg: string): string => {
|
||||
return value.replace(new RegExp(`^${reg}`, "g"), "");
|
||||
};
|
||||
|
||||
/** 环境变量 */
|
||||
/** 获取环境变量 */
|
||||
const loadEnv = (): ViteEnv => {
|
||||
return import.meta.env;
|
||||
};
|
||||
|
||||
export { warpperEnv, regExps, loadEnv };
|
||||
export { warpperEnv, loadEnv };
|
||||
|
||||
@@ -3,20 +3,18 @@ import { resolve } from "path";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { viteBuildInfo } from "./info";
|
||||
import svgLoader from "vite-svg-loader";
|
||||
import legacy from "@vitejs/plugin-legacy";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import VueMacros from "unplugin-vue-macros/vite";
|
||||
import { viteMockServe } from "vite-plugin-mock";
|
||||
import { configCompressPlugin } from "./compress";
|
||||
import VueI18n from "@intlify/vite-plugin-vue-i18n";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import removeConsole from "vite-plugin-remove-console";
|
||||
import themePreprocessorPlugin from "@pureadmin/theme";
|
||||
import { genScssMultipleScopeVars } from "/@/layout/theme";
|
||||
import DefineOptions from "unplugin-vue-define-options/vite";
|
||||
import { genScssMultipleScopeVars } from "../src/layout/theme";
|
||||
|
||||
export function getPluginsList(
|
||||
command: string,
|
||||
VITE_LEGACY: boolean,
|
||||
VITE_CDN: boolean,
|
||||
VITE_COMPRESSION: ViteCompression
|
||||
) {
|
||||
@@ -34,7 +32,7 @@ export function getPluginsList(
|
||||
vueJsx(),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
DefineOptions(),
|
||||
VueMacros(),
|
||||
// 线上环境删除console
|
||||
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
||||
viteBuildInfo(),
|
||||
@@ -65,13 +63,6 @@ export function getPluginsList(
|
||||
`,
|
||||
logger: false
|
||||
}),
|
||||
// 是否为打包后的文件提供传统浏览器兼容性支持
|
||||
VITE_LEGACY
|
||||
? legacy({
|
||||
targets: ["ie >= 11"],
|
||||
additionalLegacyPolyfills: ["regenerator-runtime/runtime"]
|
||||
})
|
||||
: null,
|
||||
// 打包分析
|
||||
lifecycle === "report"
|
||||
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
|
||||
|
||||
@@ -94,6 +94,7 @@ menus:
|
||||
hsPdf: PDF Preview
|
||||
hsExecl: Export Excel
|
||||
hsInfiniteScroll: Table Infinite Scroll
|
||||
hsdanmaku: Danmaku Components
|
||||
status:
|
||||
hsLoad: Loading...
|
||||
login:
|
||||
|
||||
@@ -94,6 +94,7 @@ menus:
|
||||
hsPdf: PDF预览
|
||||
hsExecl: 导出Excel
|
||||
hsInfiniteScroll: 表格无限滚动
|
||||
hsdanmaku: 弹幕组件
|
||||
status:
|
||||
hsLoad: 加载中...
|
||||
login:
|
||||
|
||||
@@ -68,8 +68,8 @@ const permissionRouter = {
|
||||
path: "/permission/page/index",
|
||||
name: "PermissionPage",
|
||||
meta: {
|
||||
roles: ["admin", "common"],
|
||||
title: "menus.permissionPage"
|
||||
title: "menus.permissionPage",
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -89,7 +89,7 @@ const frameRouter = {
|
||||
meta: {
|
||||
icon: "monitor",
|
||||
title: "menus.hsExternalPage",
|
||||
rank: 7
|
||||
rank: 8
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@@ -97,13 +97,13 @@ const frameRouter = {
|
||||
name: "FramePure",
|
||||
meta: {
|
||||
title: "menus.hsPureDocument",
|
||||
frameSrc: "http://yiming_chang.gitee.io/pure-admin-doc",
|
||||
frameSrc: "https://yiming_chang.gitee.io/pure-admin-doc",
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/external",
|
||||
name: "http://yiming_chang.gitee.io/pure-admin-doc",
|
||||
name: "https://yiming_chang.gitee.io/pure-admin-doc",
|
||||
meta: {
|
||||
title: "menus.externalLink",
|
||||
roles: ["admin", "common"]
|
||||
@@ -137,6 +137,7 @@ const tabsRouter = {
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
},
|
||||
// query 传参模式
|
||||
{
|
||||
path: "/tabs/query-detail",
|
||||
name: "TabQueryDetail",
|
||||
@@ -146,11 +147,13 @@ const tabsRouter = {
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
},
|
||||
// params 传参模式
|
||||
{
|
||||
path: "/tabs/params-detail/:id",
|
||||
component: "params-detail",
|
||||
name: "TabParamsDetail",
|
||||
meta: {
|
||||
// 不在menu菜单中显示
|
||||
showLink: false,
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ export default [
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
||||
// `expires`选择这种日期格式是为了方便调试,后端直接设置时间戳或许更方便(每次都应该递增)。如果后端返回的是时间戳格式,前端开发请来到这个目录`src/utils/auth.ts`,把第`38`行的代码换成expires = data.expires即可。
|
||||
expires: "2023/10/30 23:59:59"
|
||||
}
|
||||
|
||||
81
package.json
81
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-pure-admin",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||
@@ -30,15 +30,14 @@
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
"@logicflow/core": "^1.1.24",
|
||||
"@logicflow/extension": "^1.1.24",
|
||||
"@logicflow/core": "^1.1.30",
|
||||
"@logicflow/extension": "^1.1.30",
|
||||
"@pureadmin/components": "^1.1.0",
|
||||
"@pureadmin/descriptions": "^1.1.0",
|
||||
"@pureadmin/table": "^1.2.0",
|
||||
"@pureadmin/utils": "^1.1.5",
|
||||
"@vueuse/core": "^9.4.0",
|
||||
"@vueuse/motion": "^2.0.0-beta.12",
|
||||
"@vueuse/shared": "^9.4.0",
|
||||
"@pureadmin/table": "^1.6.0",
|
||||
"@pureadmin/utils": "^1.6.7",
|
||||
"@vueuse/core": "^9.5.0",
|
||||
"@vueuse/motion": "2.0.0-beta.12",
|
||||
"@wangeditor/editor": "^5.1.21",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
@@ -46,11 +45,11 @@
|
||||
"china-area-data": "^5.0.1",
|
||||
"cropperjs": "^1.5.12",
|
||||
"dayjs": "^1.11.5",
|
||||
"driver.js": "^0.9.8",
|
||||
"echarts": "^5.4.0",
|
||||
"el-table-infinite-scroll": "^3.0.1",
|
||||
"element-plus": "^2.2.18",
|
||||
"element-resize-detector": "^1.2.3",
|
||||
"element-plus": "^2.2.22",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"intro.js": "^6.0.0",
|
||||
"js-cookie": "^3.0.1",
|
||||
"jsbarcode": "^3.11.5",
|
||||
"lodash": "^4.17.21",
|
||||
@@ -60,7 +59,7 @@
|
||||
"mockjs": "^1.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"path": "^0.12.7",
|
||||
"pinia": "^2.0.23",
|
||||
"pinia": "^2.0.24",
|
||||
"qrcode": "^1.5.1",
|
||||
"qs": "^6.11.0",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
@@ -69,14 +68,14 @@
|
||||
"swiper": "^8.4.4",
|
||||
"typeit": "^8.7.0",
|
||||
"v-contextmenu": "3.0.0",
|
||||
"vue": "^3.2.40",
|
||||
"vue-form-create2": "^1.2.8",
|
||||
"vue": "^3.2.45",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-json-pretty": "^2.2.2",
|
||||
"vue-pdf-embed": "^1.1.4",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-types": "^4.2.1",
|
||||
"vue-virtual-scroller": "^2.0.0-alpha.1",
|
||||
"vue3-danmaku": "^1.0.0",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "^4.3.5",
|
||||
"xe-utils": "^3.5.7",
|
||||
@@ -95,65 +94,65 @@
|
||||
"@iconify-icons/mdi": "^1.2.8",
|
||||
"@iconify-icons/ri": "^1.2.3",
|
||||
"@iconify-icons/uil": "^1.2.2",
|
||||
"@iconify/vue": "^3.2.1",
|
||||
"@iconify/vue": "^4.0.0",
|
||||
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
||||
"@pureadmin/theme": "^2.4.0",
|
||||
"@types/element-resize-detector": "1.1.3",
|
||||
"@types/intro.js": "^5.1.0",
|
||||
"@types/js-cookie": "^3.0.1",
|
||||
"@types/lodash": "^4.14.180",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/mockjs": "1.0.3",
|
||||
"@types/node": "14.14.14",
|
||||
"@types/mockjs": "^1.0.7",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/nprogress": "0.2.0",
|
||||
"@types/qrcode": "^1.4.2",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/sortablejs": "^1.13.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||
"@typescript-eslint/parser": "^5.10.2",
|
||||
"@vitejs/plugin-legacy": "^2.2.0",
|
||||
"@vitejs/plugin-vue": "^3.1.2",
|
||||
"@vitejs/plugin-vue-jsx": "^2.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||
"@typescript-eslint/parser": "^5.43.0",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
"@vitejs/plugin-vue-jsx": "^2.1.1",
|
||||
"@vue/eslint-config-prettier": "^7.0.0",
|
||||
"@vue/eslint-config-typescript": "^10.0.0",
|
||||
"@vue/runtime-core": "^3.2.40",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
"@vue/runtime-core": "^3.2.45",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"cloc": "^2.10.0",
|
||||
"cssnano": "^5.1.13",
|
||||
"cssnano": "^5.1.14",
|
||||
"eslint": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-vue": "^8.4.1",
|
||||
"eslint-plugin-vue": "^9.7.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"husky": "^7.0.4",
|
||||
"lint-staged": "11.1.2",
|
||||
"picocolors": "^1.0.0",
|
||||
"postcss": "^8.4.17",
|
||||
"postcss": "^8.4.18",
|
||||
"postcss-html": "^1.5.0",
|
||||
"postcss-import": "^15.0.0",
|
||||
"postcss-scss": "^4.0.5",
|
||||
"prettier": "^2.5.1",
|
||||
"pretty-quick": "3.1.1",
|
||||
"rimraf": "3.0.2",
|
||||
"rollup-plugin-visualizer": "^5.8.2",
|
||||
"sass": "^1.53.0",
|
||||
"sass-loader": "^13.0.2",
|
||||
"rollup-plugin-visualizer": "^5.8.3",
|
||||
"sass": "^1.56.1",
|
||||
"sass-loader": "^13.2.0",
|
||||
"stylelint": "^14.3.0",
|
||||
"stylelint-config-html": "^1.0.0",
|
||||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-config-recommended": "^6.0.0",
|
||||
"stylelint-config-standard": "^24.0.0",
|
||||
"stylelint-config-recommended": "^9.0.0",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"tailwindcss": "^3.2.1",
|
||||
"terser": "^5.15.0",
|
||||
"typescript": "^4.7.4",
|
||||
"unplugin-vue-define-options": "0.7.3",
|
||||
"vite": "^3.1.8",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"terser": "^5.15.1",
|
||||
"typescript": "^4.9.3",
|
||||
"unplugin-vue-macros": "^0.16.3",
|
||||
"vite": "3.1.8",
|
||||
"vite-plugin-cdn-import": "^0.3.5",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-remove-console": "^1.1.0",
|
||||
"vite-plugin-remove-console": "^1.3.0",
|
||||
"vite-svg-loader": "^3.6.0",
|
||||
"vue-eslint-parser": "^8.2.0",
|
||||
"vue-tsc": "^0.40.13"
|
||||
"vue-eslint-parser": "^9.1.0",
|
||||
"vue-tsc": "^1.0.9"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
|
||||
2497
pnpm-lock.yaml
generated
2497
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "3.6.1",
|
||||
"Version": "3.7.1",
|
||||
"Title": "PureAdmin",
|
||||
"FixedHeader": true,
|
||||
"HiddenSideBar": false,
|
||||
@@ -16,6 +16,7 @@
|
||||
"EpThemeColor": "#409EFF",
|
||||
"ShowLogo": true,
|
||||
"ShowModel": "smart",
|
||||
"MenuArrowIconNoTransition": false,
|
||||
"MapConfigure": {
|
||||
"amapKey": "97b3248d1553172e81f168cf94ea667e",
|
||||
"options": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { http } from "../utils/http";
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { http } from "../utils/http";
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { http } from "../utils/http";
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { http } from "../utils/http";
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { http } from "../utils/http";
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
export type UserResult = {
|
||||
success: boolean;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
@@ -1,5 +1,5 @@
|
||||
import { defineComponent, Fragment } from "vue";
|
||||
import { hasAuth } from "/@/router/utils";
|
||||
import { hasAuth } from "@/router/utils";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Auth",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PropType } from "vue";
|
||||
import { propTypes } from "/@/utils/propTypes";
|
||||
import { propTypes } from "@/utils/propTypes";
|
||||
export const countToProps = {
|
||||
startVal: propTypes.number.def(0),
|
||||
endVal: propTypes.number.def(2020),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PropType } from "vue";
|
||||
import { propTypes } from "/@/utils/propTypes";
|
||||
import { propTypes } from "@/utils/propTypes";
|
||||
export const reboundProps = {
|
||||
delay: propTypes.number.def(1),
|
||||
blur: propTypes.number.def(2),
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
computed,
|
||||
PropType
|
||||
} from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { useAttrs } from "@pureadmin/utils";
|
||||
|
||||
import Cropper from "cropperjs";
|
||||
@@ -78,7 +77,7 @@ export default defineComponent({
|
||||
props,
|
||||
setup(props) {
|
||||
const cropper: any = ref<Nullable<Cropper>>(null);
|
||||
const imgElRef = templateRef<HTMLImageElement | null>("imgElRef", null);
|
||||
const imgElRef = ref();
|
||||
|
||||
const isReady = ref<boolean>(false);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { propTypes } from "/@/utils/propTypes";
|
||||
import { propTypes } from "@/utils/propTypes";
|
||||
import "./filpper.css";
|
||||
|
||||
const props = {
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, unref, nextTick, onUnmounted } from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import flippers from "./filpper";
|
||||
|
||||
let timer = ref(null);
|
||||
let flipObjs = ref([]);
|
||||
const timer = ref(null);
|
||||
const flipObjs = ref([]);
|
||||
|
||||
const flipperHour1 = templateRef<HTMLElement | null>("flipperHour1", null);
|
||||
const flipperHour2 = templateRef<HTMLElement | null>("flipperHour2", null);
|
||||
const flipperMinute1 = templateRef<HTMLElement | null>("flipperMinute1", null);
|
||||
const flipperMinute2 = templateRef<HTMLElement | null>("flipperMinute2", null);
|
||||
const flipperSecond1 = templateRef<HTMLElement | null>("flipperSecond1", null);
|
||||
const flipperSecond2 = templateRef<HTMLElement | null>("flipperSecond2", null);
|
||||
const flipperHour1 = ref();
|
||||
const flipperHour2 = ref();
|
||||
const flipperMinute1 = ref();
|
||||
const flipperMinute2 = ref();
|
||||
const flipperSecond1 = ref();
|
||||
const flipperSecond2 = ref();
|
||||
|
||||
// 初始化数字
|
||||
const init = () => {
|
||||
let now = new Date();
|
||||
let nowTimeStr = formatDate(new Date(now.getTime()), "hhiiss");
|
||||
const now = new Date();
|
||||
const nowTimeStr = formatDate(new Date(now.getTime()), "hhiiss");
|
||||
for (let i = 0; i < flipObjs.value.length; i++) {
|
||||
flipObjs?.value[i]?.setFront(nowTimeStr[i]);
|
||||
}
|
||||
@@ -26,9 +25,9 @@ const init = () => {
|
||||
const run = () => {
|
||||
timer.value = setInterval(() => {
|
||||
// 获取当前时间
|
||||
let now = new Date();
|
||||
let nowTimeStr = formatDate(new Date(now.getTime() - 1000), "hhiiss");
|
||||
let nextTimeStr = formatDate(now, "hhiiss");
|
||||
const now = new Date();
|
||||
const nowTimeStr = formatDate(new Date(now.getTime() - 1000), "hhiiss");
|
||||
const nextTimeStr = formatDate(now, "hhiiss");
|
||||
for (let i = 0; i < flipObjs.value.length; i++) {
|
||||
if (nowTimeStr[i] === nextTimeStr[i]) {
|
||||
continue;
|
||||
@@ -52,17 +51,17 @@ const formatDate = (date: Date, dateFormat: string) => {
|
||||
);
|
||||
}
|
||||
// 格式化月、日、时、分、秒
|
||||
let o = {
|
||||
const o = {
|
||||
"m+": date.getMonth() + 1,
|
||||
"d+": date.getDate(),
|
||||
"h+": date.getHours(),
|
||||
"i+": date.getMinutes(),
|
||||
"s+": date.getSeconds()
|
||||
};
|
||||
for (let k in o) {
|
||||
for (const k in o) {
|
||||
if (new RegExp(`(${k})`).test(dateFormat)) {
|
||||
// 取出对应的值
|
||||
let str = o[k] + "";
|
||||
const str = o[k] + "";
|
||||
/* 根据设置的格式,输出对应的字符
|
||||
* 例如: 早上8时,hh => 08,h => 8
|
||||
* 但是,当数字>=10时,无论格式为一位还是多位,不做截取,这是与年份格式化不一致的地方
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, unref, onMounted } from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { LogicFlow } from "@logicflow/core";
|
||||
|
||||
interface Props {
|
||||
@@ -16,11 +15,11 @@ const emit = defineEmits<{
|
||||
(e: "catData"): void;
|
||||
}>();
|
||||
|
||||
const controlButton3 = templateRef<HTMLElement | any>("controlButton3", null);
|
||||
const controlButton4 = templateRef<HTMLElement | any>("controlButton4", null);
|
||||
const controlButton3 = ref();
|
||||
const controlButton4 = ref();
|
||||
|
||||
let focusIndex = ref<Number>(-1);
|
||||
let titleLists = ref([
|
||||
const focusIndex = ref<Number>(-1);
|
||||
const titleLists = ref([
|
||||
{
|
||||
icon: "icon-zoom-out-hs",
|
||||
text: "缩小",
|
||||
@@ -68,7 +67,7 @@ let titleLists = ref([
|
||||
const onControl = (item, key) => {
|
||||
["zoom", "zoom", "resetZoom", "undo", "redo", "getSnapshot"].forEach(
|
||||
(v, i) => {
|
||||
let domControl = props.lf;
|
||||
const domControl = props.lf;
|
||||
if (key === 1) {
|
||||
domControl.zoom(true);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
nodeList: null
|
||||
});
|
||||
|
||||
let properties = ref({
|
||||
const properties = ref({
|
||||
a: "efrwe",
|
||||
b: "wewe"
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import iconifyIconOnline from "./src/iconifyIconOnline";
|
||||
import iconSelect from "./src/Select.vue";
|
||||
import fontIcon from "./src/iconfont";
|
||||
|
||||
/** 离线图标组件 */
|
||||
/** 本地图标组件 */
|
||||
const IconifyIconOffline = iconifyIconOffline;
|
||||
/** 在线图标组件 */
|
||||
const IconifyIconOnline = iconifyIconOnline;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
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";
|
||||
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
|
||||
|
||||
defineOptions({
|
||||
@@ -16,21 +16,21 @@ const props = defineProps({
|
||||
});
|
||||
const emit = defineEmits<{ (e: "update:modelValue", v: string) }>();
|
||||
|
||||
let visible = ref(false);
|
||||
let inputValue = toRef(props, "modelValue");
|
||||
let iconList = ref(IconJson);
|
||||
let icon = ref("add-location");
|
||||
let currentActiveType = ref("ep:");
|
||||
const visible = ref(false);
|
||||
const inputValue = toRef(props, "modelValue");
|
||||
const iconList = ref(IconJson);
|
||||
const icon = ref("add-location");
|
||||
const currentActiveType = ref("ep:");
|
||||
// 深拷贝图标数据,前端做搜索
|
||||
let copyIconList = cloneDeep(iconList.value);
|
||||
const copyIconList = cloneDeep(iconList.value);
|
||||
|
||||
let pageSize = ref(96);
|
||||
let currentPage = ref(1);
|
||||
const pageSize = ref(96);
|
||||
const currentPage = ref(1);
|
||||
|
||||
// 搜索条件
|
||||
let filterValue = ref("");
|
||||
const filterValue = ref("");
|
||||
|
||||
let tabsList = [
|
||||
const tabsList = [
|
||||
{
|
||||
label: "Element Plus",
|
||||
name: "ep:"
|
||||
@@ -45,7 +45,7 @@ let tabsList = [
|
||||
}
|
||||
];
|
||||
|
||||
let pageList = computed(() => {
|
||||
const pageList = computed(() => {
|
||||
if (currentPage.value === 1) {
|
||||
return copyIconList[currentActiveType.value]
|
||||
.filter(v => v.includes(filterValue.value))
|
||||
|
||||
@@ -3,7 +3,8 @@ import { h, defineComponent, Component } from "vue";
|
||||
import { IconifyIconOnline, IconifyIconOffline, FontIcon } from "../index";
|
||||
|
||||
/**
|
||||
* 支持fontawesome4、5+、iconfont、remixicon、element-plus的icons、自定义svg
|
||||
* 支持 `iconfont`、自定义 `svg` 以及 `iconify` 中所有的图标
|
||||
* @see 点击查看文档图标篇 {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/icon/}
|
||||
* @param icon 必传 图标
|
||||
* @param attrs 可选 iconType 属性
|
||||
* @returns Component
|
||||
@@ -34,11 +35,12 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component {
|
||||
// svg
|
||||
return icon;
|
||||
} else {
|
||||
// 通过是否存在 : 符号来判断是在线还是本地图标,存在即是在线图标,反之
|
||||
return defineComponent({
|
||||
name: "Icon",
|
||||
render() {
|
||||
const IconifyIcon =
|
||||
attrs && attrs["online"] ? IconifyIconOnline : IconifyIconOffline;
|
||||
icon && icon.includes(":") ? IconifyIconOnline : IconifyIconOffline;
|
||||
return h(IconifyIcon, {
|
||||
icon: icon,
|
||||
...attrs
|
||||
|
||||
@@ -29,6 +29,10 @@ 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);
|
||||
@@ -56,6 +60,10 @@ 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";
|
||||
@@ -161,7 +169,7 @@ addIcon("unExpand", UnExpand);
|
||||
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({
|
||||
name: "IconifyIconOffline",
|
||||
components: { IconifyIcon },
|
||||
|
||||
@@ -11,7 +11,6 @@ export interface iconType {
|
||||
horizontalAlign?: boolean;
|
||||
verticalAlign?: boolean;
|
||||
align?: string;
|
||||
online?: boolean;
|
||||
onLoad?: Function;
|
||||
includes?: Function;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { reactive, getCurrentInstance, onBeforeMount, onUnmounted } from "vue";
|
||||
import { deviceDetection } from "@pureadmin/utils";
|
||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
import { mapJson } from "/@/api/mock";
|
||||
import car from "/@/assets/car.png";
|
||||
import { mapJson } from "@/api/mock";
|
||||
import car from "@/assets/car.png";
|
||||
|
||||
export interface MapConfigureInter {
|
||||
on: Fn;
|
||||
@@ -39,8 +39,8 @@ const complete = (): void => {
|
||||
|
||||
onBeforeMount(() => {
|
||||
if (!instance) return;
|
||||
let { MapConfigure } = instance.appContext.config.globalProperties.$config;
|
||||
let { options } = MapConfigure;
|
||||
const { MapConfigure } = instance.appContext.config.globalProperties.$config;
|
||||
const { options } = MapConfigure;
|
||||
|
||||
AMapLoader.load({
|
||||
key: MapConfigure.amapKey,
|
||||
@@ -67,10 +67,10 @@ onBeforeMount(() => {
|
||||
gridSize: 80,
|
||||
maxZoom: 14,
|
||||
renderMarker(ctx) {
|
||||
let { marker, data } = ctx;
|
||||
const { marker, data } = ctx;
|
||||
if (Array.isArray(data) && data[0]) {
|
||||
var { driver, plateNumber, orientation } = data[0];
|
||||
var content = `<img style="transform: scale(1) rotate(${
|
||||
const { driver, plateNumber, orientation } = data[0];
|
||||
const content = `<img style="transform: scale(1) rotate(${
|
||||
360 - Number(orientation)
|
||||
}deg);" src='${car}' />`;
|
||||
marker.setContent(content);
|
||||
@@ -93,7 +93,7 @@ onBeforeMount(() => {
|
||||
// 获取模拟车辆信息
|
||||
mapJson()
|
||||
.then(({ data }) => {
|
||||
let points: object = data.map(v => {
|
||||
const points: object = data.map(v => {
|
||||
return {
|
||||
lnglat: [v.lng, v.lat],
|
||||
...v
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import "./index.scss";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { isString } from "@pureadmin/utils";
|
||||
import { propTypes } from "/@/utils/propTypes";
|
||||
import { propTypes } from "@/utils/propTypes";
|
||||
import { IconifyIconOffline } from "../../ReIcon";
|
||||
import QRCode, { QRCodeRenderersOptions } from "qrcode";
|
||||
|
||||
|
||||
@@ -28,16 +28,16 @@ const emit = defineEmits<{
|
||||
(e: "scrollEnd"): void;
|
||||
}>();
|
||||
|
||||
let xPos = ref<number>(0);
|
||||
let yPos = ref<number>(0);
|
||||
let delay = ref<number>(0);
|
||||
let height = ref<number>(0);
|
||||
const xPos = ref<number>(0);
|
||||
const yPos = ref<number>(0);
|
||||
const delay = ref<number>(0);
|
||||
const height = ref<number>(0);
|
||||
// 外容器宽度
|
||||
let width = ref<number>(0);
|
||||
const width = ref<number>(0);
|
||||
// 内容实际宽度
|
||||
let realBoxWidth = ref<number>(0);
|
||||
let realBoxHeight = ref<number>(0);
|
||||
let copyHtml = ref("");
|
||||
const realBoxWidth = ref<number>(0);
|
||||
const realBoxHeight = ref<number>(0);
|
||||
const copyHtml = ref("");
|
||||
// single 单步滚动的定时器
|
||||
let singleWaitTime = null;
|
||||
// move动画的animationFrame定时器
|
||||
@@ -52,7 +52,7 @@ let isHover = false;
|
||||
let ease = "ease-in";
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
let { classOption } = props;
|
||||
const { classOption } = props;
|
||||
|
||||
if (classOption["key"] === undefined) {
|
||||
classOption["key"] = 0;
|
||||
@@ -68,15 +68,15 @@ const realBox = templateRef<HTMLElement | null>(
|
||||
null
|
||||
);
|
||||
|
||||
let leftSwitchState = computed(() => {
|
||||
const leftSwitchState = computed(() => {
|
||||
return unref(xPos) < 0;
|
||||
});
|
||||
|
||||
let rightSwitchState = computed(() => {
|
||||
const rightSwitchState = computed(() => {
|
||||
return Math.abs(unref(xPos)) < unref(realBoxWidth) - unref(width);
|
||||
});
|
||||
|
||||
let defaultOption = computed(() => {
|
||||
const defaultOption = computed(() => {
|
||||
return {
|
||||
//步长
|
||||
step: 1,
|
||||
@@ -105,7 +105,7 @@ let defaultOption = computed(() => {
|
||||
};
|
||||
});
|
||||
|
||||
let options = computed(() => {
|
||||
const options = computed(() => {
|
||||
// @ts-expect-error
|
||||
return copyObj({}, unref(defaultOption), classOption);
|
||||
});
|
||||
@@ -114,11 +114,11 @@ const leftSwitchClass = computed(() => {
|
||||
return unref(leftSwitchState) ? "" : unref(options).switchDisabledClass;
|
||||
});
|
||||
|
||||
let rightSwitchClass = computed(() => {
|
||||
const rightSwitchClass = computed(() => {
|
||||
return unref(rightSwitchState) ? "" : unref(options).switchDisabledClass;
|
||||
});
|
||||
|
||||
let leftSwitch = computed((): CSSProperties => {
|
||||
const leftSwitch = computed((): CSSProperties => {
|
||||
return {
|
||||
position: "absolute",
|
||||
margin: `${unref(height) / 2}px 0 0 -${unref(options).switchOffset}px`,
|
||||
@@ -126,7 +126,7 @@ let leftSwitch = computed((): CSSProperties => {
|
||||
};
|
||||
});
|
||||
|
||||
let rightSwitch = computed((): CSSProperties => {
|
||||
const rightSwitch = computed((): CSSProperties => {
|
||||
return {
|
||||
position: "absolute",
|
||||
margin: `${unref(height) / 2}px 0 0 ${
|
||||
@@ -136,19 +136,19 @@ let rightSwitch = computed((): CSSProperties => {
|
||||
};
|
||||
});
|
||||
|
||||
let isHorizontal = computed(() => {
|
||||
const isHorizontal = computed(() => {
|
||||
return (
|
||||
unref(options).direction !== "bottom" && unref(options).direction !== "top"
|
||||
);
|
||||
});
|
||||
|
||||
let float = computed((): CSSProperties => {
|
||||
const float = computed((): CSSProperties => {
|
||||
return unref(isHorizontal)
|
||||
? { float: "left", overflow: "hidden" }
|
||||
: { overflow: "hidden" };
|
||||
});
|
||||
|
||||
let pos = computed(() => {
|
||||
const pos = computed(() => {
|
||||
return {
|
||||
transform: `translate(${unref(xPos)}px,${unref(yPos)}px)`,
|
||||
transition: `all ${ease} ${unref(delay)}ms`,
|
||||
@@ -156,45 +156,45 @@ let pos = computed(() => {
|
||||
};
|
||||
});
|
||||
|
||||
let navigation = computed(() => {
|
||||
const navigation = computed(() => {
|
||||
return unref(options).navigation;
|
||||
});
|
||||
|
||||
let autoPlay = computed(() => {
|
||||
const autoPlay = computed(() => {
|
||||
if (unref(navigation)) return false;
|
||||
return unref(options).autoPlay;
|
||||
});
|
||||
|
||||
let scrollSwitch = computed(() => {
|
||||
const scrollSwitch = computed(() => {
|
||||
// 从 props 解构出来的 属性 不再具有响应性.
|
||||
return (props.data as any).length >= unref(options).limitMoveNum;
|
||||
});
|
||||
|
||||
let hoverStopSwitch = computed(() => {
|
||||
const hoverStopSwitch = computed(() => {
|
||||
return unref(options).hoverStop && unref(autoPlay) && unref(scrollSwitch);
|
||||
});
|
||||
|
||||
let canTouchScroll = computed(() => {
|
||||
const canTouchScroll = computed(() => {
|
||||
return unref(options).openTouch;
|
||||
});
|
||||
|
||||
let baseFontSize = computed(() => {
|
||||
const baseFontSize = computed(() => {
|
||||
return unref(options).isSingleRemUnit
|
||||
? parseInt(window.getComputedStyle(document.documentElement, null).fontSize)
|
||||
: 1;
|
||||
});
|
||||
|
||||
let realSingleStopWidth = computed(() => {
|
||||
const realSingleStopWidth = computed(() => {
|
||||
return unref(options).singleWidth * unref(baseFontSize);
|
||||
});
|
||||
|
||||
let realSingleStopHeight = computed(() => {
|
||||
const realSingleStopHeight = computed(() => {
|
||||
return unref(options).singleHeight * unref(baseFontSize);
|
||||
});
|
||||
|
||||
let step = computed(() => {
|
||||
const step = computed(() => {
|
||||
let singleStep;
|
||||
let step = unref(options).step;
|
||||
const step = unref(options).step;
|
||||
if (unref(isHorizontal)) {
|
||||
singleStep = unref(realSingleStopWidth);
|
||||
} else {
|
||||
@@ -275,7 +275,7 @@ function touchMove(e) {
|
||||
return;
|
||||
const touch = e.targetTouches[0];
|
||||
const { direction } = unref(options);
|
||||
let endPos = {
|
||||
const endPos = {
|
||||
x: touch.pageX - startPos.x,
|
||||
y: touch.pageY - startPos.y
|
||||
};
|
||||
@@ -300,18 +300,19 @@ function touchMove(e) {
|
||||
|
||||
function touchEnd() {
|
||||
if (!unref(canTouchScroll)) return;
|
||||
let timer;
|
||||
// eslint-disable-next-line prefer-const
|
||||
let timer: any;
|
||||
const direction = unref(options).direction;
|
||||
delay.value = 50;
|
||||
if (direction === "top") {
|
||||
if (unref(yPos) > 0) yPos.value = 0;
|
||||
} else if (direction === "bottom") {
|
||||
let h = (unref(realBoxHeight) / 2) * -1;
|
||||
const h = (unref(realBoxHeight) / 2) * -1;
|
||||
if (unref(yPos) < h) yPos.value = h;
|
||||
} else if (direction === "left") {
|
||||
if (unref(xPos) > 0) xPos.value = 0;
|
||||
} else if (direction === "right") {
|
||||
let w = unref(realBoxWidth) * -1;
|
||||
const w = unref(realBoxWidth) * -1;
|
||||
if (unref(xPos) < w) xPos.value = w;
|
||||
}
|
||||
if (timer) clearTimeout(timer);
|
||||
@@ -339,7 +340,7 @@ function scrollMove() {
|
||||
const h = unref(realBoxHeight) / 2;
|
||||
//宽度
|
||||
const w = unref(realBoxWidth) / 2;
|
||||
let { direction, waitTime } = unref(options);
|
||||
const { direction, waitTime } = unref(options);
|
||||
if (direction === "top") {
|
||||
// 上
|
||||
if (Math.abs(unref(yPos)) >= h) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineComponent, ref, computed, PropType } from "vue";
|
||||
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { IconifyIconOffline } from "../../ReIcon";
|
||||
|
||||
export const loadingSvg = `
|
||||
|
||||
@@ -31,7 +31,6 @@ const getConfig = (key?: string): ServerConfigs => {
|
||||
export const getServerConfig = async (app: App): Promise<undefined> => {
|
||||
app.config.globalProperties.$config = getConfig();
|
||||
return axios({
|
||||
baseURL: "",
|
||||
method: "get",
|
||||
url: `${VITE_PUBLIC_PATH}serverConfig.json`
|
||||
})
|
||||
@@ -44,8 +43,6 @@ export const getServerConfig = async (app: App): Promise<undefined> => {
|
||||
// 设置全局配置
|
||||
setConfig($config);
|
||||
}
|
||||
// 设置全局baseURL
|
||||
app.config.globalProperties.$baseUrl = $config.baseURL;
|
||||
return $config;
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { hasAuth } from "/@/router/utils";
|
||||
import { hasAuth } from "@/router/utils";
|
||||
import { Directive, type DirectiveBinding } from "vue";
|
||||
|
||||
export const auth: Directive = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Directive, type DirectiveBinding, type VNode } from "vue";
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
import type { Erd } from "element-resize-detector";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
|
||||
const erd: Erd = elementResizeDetectorMaker({
|
||||
strategy: "scroll"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import backTop from "/@/assets/svg/back_top.svg?component";
|
||||
import backTop from "@/assets/svg/back_top.svg?component";
|
||||
import { h, computed, Transition, defineComponent } from "vue";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
|
||||
const props = defineProps({
|
||||
fixedHeader: Boolean
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
import Search from "./search/index.vue";
|
||||
import Notice from "./notice/index.vue";
|
||||
import mixNav from "./sidebar/mixNav.vue";
|
||||
import avatars from "/@/assets/avatars.jpg";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import Breadcrumb from "./sidebar/breadCrumb.vue";
|
||||
import topCollapse from "./sidebar/topCollapse.vue";
|
||||
import { useTranslationLang } from "../hooks/useTranslationLang";
|
||||
import globalization from "/@/assets/svg/globalization.svg?component";
|
||||
import globalization from "@/assets/svg/globalization.svg?component";
|
||||
|
||||
const {
|
||||
layout,
|
||||
@@ -82,8 +81,11 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</el-dropdown>
|
||||
<!-- 退出登录 -->
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link navbar-bg-hover">
|
||||
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
|
||||
<span class="el-dropdown-link navbar-bg-hover select-none">
|
||||
<img
|
||||
src="https://avatars.githubusercontent.com/u/44761321?v=4"
|
||||
:style="avatarsStyle"
|
||||
/>
|
||||
<p v-if="username" class="dark:text-white">{{ username }}</p>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
import { ref } from "vue";
|
||||
import { noticesData } from "./data";
|
||||
import NoticeList from "./noticeList.vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { Tabs, TabPane } from "@pureadmin/components";
|
||||
|
||||
const dropdownDom = templateRef<ElRef | null>("dropdownDom", null);
|
||||
const activeName = ref(noticesData[0].name);
|
||||
const dropdownDom = ref();
|
||||
const activeKey = ref(noticesData[0].key);
|
||||
|
||||
const notices = ref(noticesData);
|
||||
|
||||
let noticesNum = ref(0);
|
||||
const noticesNum = ref(0);
|
||||
notices.value.forEach(notice => {
|
||||
noticesNum.value += notice.list.length;
|
||||
});
|
||||
@@ -33,7 +33,8 @@ function tabClick() {
|
||||
<Tabs
|
||||
centered
|
||||
class="dropdown-tabs"
|
||||
v-model:activeName="activeName"
|
||||
:tabBarStyle="{ marginLeft: notices?.length > 4 ? '8px' : '0' }"
|
||||
v-model:activeKey="activeKey"
|
||||
@tabClick="tabClick"
|
||||
>
|
||||
<template v-for="item in notices" :key="item.key">
|
||||
|
||||
@@ -24,11 +24,11 @@ function hoverTitle() {
|
||||
|
||||
function hoverDescription(event, description) {
|
||||
// currentWidth 为文本在页面中所占的宽度,创建标签,加入到页面,获取currentWidth ,最后在移除
|
||||
let tempTag = document.createElement("span");
|
||||
const tempTag = document.createElement("span");
|
||||
tempTag.innerText = description;
|
||||
tempTag.className = "getDescriptionWidth";
|
||||
document.querySelector("body").appendChild(tempTag);
|
||||
let currentWidth = (
|
||||
const currentWidth = (
|
||||
document.querySelector(".getDescriptionWidth") as HTMLSpanElement
|
||||
).offsetWidth;
|
||||
document.querySelector(".getDescriptionWidth").remove();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { onClickOutside } from "@vueuse/core";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
|
||||
let show = ref<Boolean>(false);
|
||||
const show = ref<Boolean>(false);
|
||||
const target = ref(null);
|
||||
onClickOutside(target, (event: any) => {
|
||||
if (event.clientX > target.value.offsetLeft) return;
|
||||
@@ -21,7 +21,7 @@ emitter.on("openPanel", () => {
|
||||
<div ref="target" class="right-panel bg-bg_color">
|
||||
<div class="right-panel-items">
|
||||
<div class="project-configuration">
|
||||
<h3 class="dark:text-white">项目配置</h3>
|
||||
<h4 class="dark:text-white">项目配置</h4>
|
||||
<span title="关闭配置">
|
||||
<IconifyIconOffline
|
||||
class="dark:text-white"
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import enterOutlined from "/@/assets/svg/enter_outlined.svg?component";
|
||||
import mdiKeyboardEsc from "/@/assets/svg/mdi_keyboard_esc.svg?component";
|
||||
<script setup lang="ts">
|
||||
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-footer {
|
||||
display: flex;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import SearchResult from "./SearchResult.vue";
|
||||
import SearchFooter from "./SearchFooter.vue";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { deleteChildren } from "@pureadmin/utils";
|
||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||
import { ref, watch, computed, nextTick, shallowRef } from "vue";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
|
||||
interface Props {
|
||||
/** 弹窗显隐 */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
|
||||
import enterOutlined from "/@/assets/svg/enter_outlined.svg?component";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { SearchModal } from "./components";
|
||||
import { useBoolean } from "../../hooks/useBoolean";
|
||||
const { bool: show, toggle } = useBoolean();
|
||||
|
||||
@@ -8,18 +8,17 @@ import {
|
||||
nextTick,
|
||||
useCssModule
|
||||
} from "vue";
|
||||
import { getConfig } from "/@/config";
|
||||
import { getConfig } from "@/config";
|
||||
import { useRouter } from "vue-router";
|
||||
import panel from "../panel/index.vue";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { resetRouter } from "/@/router";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { removeToken } from "/@/utils/auth";
|
||||
import { routerArrays } from "/@/layout/types";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { useAppStoreHook } from "/@/store/modules/app";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import { useDataThemeChange } from "/@/layout/hooks/useDataThemeChange";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
import { resetRouter } from "@/router";
|
||||
import { removeToken } from "@/utils/auth";
|
||||
import { routerArrays } from "@/layout/types";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { useAppStoreHook } from "@/store/modules/app";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||
import {
|
||||
useDark,
|
||||
debounce,
|
||||
@@ -29,8 +28,8 @@ import {
|
||||
} from "@pureadmin/utils";
|
||||
import { toggleTheme } from "@pureadmin/theme/dist/browser-utils";
|
||||
|
||||
import dayIcon from "/@/assets/svg/day.svg?component";
|
||||
import darkIcon from "/@/assets/svg/dark.svg?component";
|
||||
import dayIcon from "@/assets/svg/day.svg?component";
|
||||
import darkIcon from "@/assets/svg/dark.svg?component";
|
||||
|
||||
const router = useRouter();
|
||||
const { device } = useNav();
|
||||
@@ -38,9 +37,9 @@ const { isDark } = useDark();
|
||||
const { isSelect } = useCssModule();
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
|
||||
const mixRef = templateRef<HTMLElement | null>("mixRef", null);
|
||||
const verticalRef = templateRef<HTMLElement | null>("verticalRef", null);
|
||||
const horizontalRef = templateRef<HTMLElement | null>("horizontalRef", null);
|
||||
const mixRef = ref();
|
||||
const verticalRef = ref();
|
||||
const horizontalRef = ref();
|
||||
|
||||
const {
|
||||
body,
|
||||
@@ -54,8 +53,8 @@ const {
|
||||
|
||||
/* body添加layout属性,作用于src/style/sidebar.scss */
|
||||
if (unref(layoutTheme)) {
|
||||
let layout = unref(layoutTheme).layout;
|
||||
let theme = unref(layoutTheme).theme;
|
||||
const layout = unref(layoutTheme).layout;
|
||||
const theme = unref(layoutTheme).theme;
|
||||
toggleTheme({
|
||||
scopeName: `layout-theme-${theme}`
|
||||
});
|
||||
@@ -119,13 +118,13 @@ const weekChange = (value): void => {
|
||||
};
|
||||
|
||||
const tagsChange = () => {
|
||||
let showVal = settings.tabsVal;
|
||||
const showVal = settings.tabsVal;
|
||||
storageConfigureChange("hideTabs", showVal);
|
||||
emitter.emit("tagViewsChange", showVal as unknown as string);
|
||||
};
|
||||
|
||||
const multiTagsCacheChange = () => {
|
||||
let multiTagsCache = settings.multiTagsCache;
|
||||
const multiTagsCache = settings.multiTagsCache;
|
||||
storageConfigureChange("multiTagsCache", multiTagsCache);
|
||||
useMultiTagsStoreHook().multiTagsCacheChange(multiTagsCache);
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { isEqual } from "lodash-unified";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { isEqual } from "@pureadmin/utils";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { ref, watch, onMounted, toRaw } from "vue";
|
||||
import { getParentPaths, findRouteByPath } from "/@/router/utils";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { useRoute, useRouter, RouteLocationMatched } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
@@ -3,11 +3,10 @@ import Search from "../search/index.vue";
|
||||
import Notice from "../notice/index.vue";
|
||||
import { ref, watch, nextTick } from "vue";
|
||||
import SidebarItem from "./sidebarItem.vue";
|
||||
import avatars from "/@/assets/avatars.jpg";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import globalization from "/@/assets/svg/globalization.svg?component";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import globalization from "@/assets/svg/globalization.svg?component";
|
||||
|
||||
const menuRef = ref();
|
||||
|
||||
@@ -97,7 +96,10 @@ watch(
|
||||
<!-- 退出登录 -->
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link navbar-bg-hover">
|
||||
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
|
||||
<img
|
||||
src="https://avatars.githubusercontent.com/u/44761321?v=4"
|
||||
:style="avatarsStyle"
|
||||
/>
|
||||
<p v-if="username" class="dark:text-white">{{ username }}</p>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
|
||||
const props = defineProps({
|
||||
collapse: Boolean
|
||||
@@ -9,7 +9,7 @@ const { title } = useNav();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="sidebar-logo-container" :class="{ collapse: props.collapse }">
|
||||
<div class="sidebar-logo-container" :class="{ collapses: props.collapse }">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link
|
||||
v-if="props.collapse"
|
||||
@@ -65,7 +65,7 @@ const { title } = useNav();
|
||||
}
|
||||
}
|
||||
|
||||
.collapse {
|
||||
.collapses {
|
||||
.sidebar-logo {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import Search from "../search/index.vue";
|
||||
import Notice from "../notice/index.vue";
|
||||
import avatars from "/@/assets/avatars.jpg";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { ref, toRaw, watch, onMounted, nextTick } from "vue";
|
||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
|
||||
import { getParentPaths, findRouteByPath } from "/@/router/utils";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import globalization from "/@/assets/svg/globalization.svg?component";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import globalization from "@/assets/svg/globalization.svg?component";
|
||||
|
||||
const menuRef = ref();
|
||||
let defaultActive = ref(null);
|
||||
const defaultActive = ref(null);
|
||||
|
||||
const { t, route, locale, translationCh, translationEn } =
|
||||
useTranslationLang(menuRef);
|
||||
@@ -128,8 +127,11 @@ watch(
|
||||
</el-dropdown>
|
||||
<!-- 退出登录 -->
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link navbar-bg-hover">
|
||||
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
|
||||
<span class="el-dropdown-link navbar-bg-hover select-none">
|
||||
<img
|
||||
src="https://avatars.githubusercontent.com/u/44761321?v=4"
|
||||
:style="avatarsStyle"
|
||||
/>
|
||||
<p v-if="username" class="dark:text-white">{{ username }}</p>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import path from "path";
|
||||
import { getConfig } from "@/config";
|
||||
import { childrenType } from "../../types";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import { ref, toRaw, PropType, nextTick, computed, CSSProperties } from "vue";
|
||||
|
||||
const { layout, isCollapse } = useNav();
|
||||
@@ -76,6 +77,10 @@ const getSpanStyle = computed(() => {
|
||||
};
|
||||
});
|
||||
|
||||
const expandCloseIcon = computed(() => {
|
||||
return getConfig()?.MenuArrowIconNoTransition ? "expand-close-icon" : "";
|
||||
});
|
||||
|
||||
const onlyOneChild: childrenType = ref(null);
|
||||
// 存放菜单是否存在showTooltip属性标识
|
||||
const hoverMenuMap = new WeakMap();
|
||||
@@ -212,7 +217,15 @@ function resolvePath(routePath) {
|
||||
</el-menu-item>
|
||||
</template>
|
||||
|
||||
<el-sub-menu v-else ref="subMenu" :index="resolvePath(props.item.path)">
|
||||
<el-sub-menu
|
||||
v-else
|
||||
ref="subMenu"
|
||||
: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>
|
||||
<div v-if="toRaw(props.item.meta.icon)" class="sub-menu-icon">
|
||||
<component
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import Logo from "./logo.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
import SidebarItem from "./sidebarItem.vue";
|
||||
import leftCollapse from "./leftCollapse.vue";
|
||||
import type { StorageConfigs } from "/#/index";
|
||||
import { useNav } from "/@/layout/hooks/useNav";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { storageLocal } from "@pureadmin/utils";
|
||||
import { ref, computed, watch, onBeforeMount } from "vue";
|
||||
import { findRouteByPath, getParentPaths } from "/@/router/utils";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import { findRouteByPath, getParentPaths } from "@/router/utils";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
|
||||
const route = useRoute();
|
||||
const showLogo = ref(
|
||||
@@ -19,7 +19,7 @@ const showLogo = ref(
|
||||
const { routers, device, pureApp, isCollapse, menuSelect, toggleSideBar } =
|
||||
useNav();
|
||||
|
||||
let subMenuData = ref([]);
|
||||
const subMenuData = ref([]);
|
||||
|
||||
const menuData = computed(() => {
|
||||
return pureApp.layout === "mix" && device.value !== "mobile"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
import { RouteConfigs } from "../../types";
|
||||
import { useTags } from "../../hooks/useTag";
|
||||
import { routerArrays } from "/@/layout/types";
|
||||
import { routerArrays } from "@/layout/types";
|
||||
import { isEqual, isEmpty } from "lodash-unified";
|
||||
import { useSettingStoreHook } from "/@/store/modules/settings";
|
||||
import { useSettingStoreHook } from "@/store/modules/settings";
|
||||
import { ref, watch, unref, nextTick, onBeforeMount } from "vue";
|
||||
import { handleAliveRoute, delAliveRoutes } from "/@/router/utils";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import { handleAliveRoute, delAliveRoutes } from "@/router/utils";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { useResizeObserver, useDebounceFn, useFullscreen } from "@vueuse/core";
|
||||
|
||||
const {
|
||||
@@ -42,7 +42,7 @@ const {
|
||||
const tabDom = ref();
|
||||
const containerDom = ref();
|
||||
const scrollbarDom = ref();
|
||||
let isShowArrow = ref(false);
|
||||
const isShowArrow = ref(false);
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
|
||||
const dynamicTagView = () => {
|
||||
@@ -129,7 +129,7 @@ function dynamicRouteTag(value: string, parentPath: string): void {
|
||||
function concatPath(arr: object[], value: string, parentPath: string) {
|
||||
if (!hasValue) {
|
||||
arr.forEach((arrItem: any) => {
|
||||
let pathConcat = parentPath + arrItem.path;
|
||||
const pathConcat = parentPath + arrItem.path;
|
||||
if (arrItem.path === value || pathConcat === value) {
|
||||
useMultiTagsStoreHook().handleTags("push", {
|
||||
path: value,
|
||||
@@ -160,7 +160,7 @@ function onFresh() {
|
||||
function deleteDynamicTag(obj: any, current: any, tag?: string) {
|
||||
// 存放被删除的缓存路由
|
||||
let delAliveRouteList = [];
|
||||
let valueIndex: number = multiTags.value.findIndex((item: any) => {
|
||||
const valueIndex: number = multiTags.value.findIndex((item: any) => {
|
||||
if (item.query) {
|
||||
if (item.path === obj.path) {
|
||||
return item.query === obj.query;
|
||||
@@ -199,7 +199,7 @@ function deleteDynamicTag(obj: any, current: any, tag?: string) {
|
||||
// 从当前匹配到的路径中删除
|
||||
spliceRoute(valueIndex, 1);
|
||||
}
|
||||
let newRoute = useMultiTagsStoreHook().handleTags("slice");
|
||||
const newRoute = useMultiTagsStoreHook().handleTags("slice");
|
||||
if (current === route.path) {
|
||||
// 删除缓存路由
|
||||
tag
|
||||
@@ -339,8 +339,8 @@ function showMenuModel(
|
||||
query: object = {},
|
||||
refresh = false
|
||||
) {
|
||||
let allRoute = multiTags.value;
|
||||
let routeLength = multiTags.value.length;
|
||||
const allRoute = multiTags.value;
|
||||
const routeLength = multiTags.value.length;
|
||||
let currentIndex = -1;
|
||||
if (isEmpty(query)) {
|
||||
currentIndex = allRoute.findIndex(v => v.path === currentPath);
|
||||
@@ -499,7 +499,7 @@ onMounted(() => {
|
||||
<IconifyIconOffline icon="arrow-left-s-line" @click="handleScroll(200)" />
|
||||
</span>
|
||||
<div ref="scrollbarDom" class="scroll-container">
|
||||
<div class="tab" ref="tabDom" :style="getTabStyle">
|
||||
<div class="tab select-none" ref="tabDom" :style="getTabStyle">
|
||||
<div
|
||||
:ref="'dynamic' + index"
|
||||
v-for="(item, index) in multiTags"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRoute } from "vue-router";
|
||||
import { ref, unref, onMounted, nextTick } from "vue";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ref } from "vue";
|
||||
import { getConfig } from "/@/config";
|
||||
import { getConfig } from "@/config";
|
||||
import { find } from "lodash-unified";
|
||||
import { useLayout } from "./useLayout";
|
||||
import { themeColorsType } from "../types";
|
||||
import { TinyColor } from "@ctrl/tinycolor";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import {
|
||||
darken,
|
||||
lighten,
|
||||
@@ -69,7 +69,7 @@ export function useDataThemeChange() {
|
||||
return new TinyColor(color).shade(10).toString();
|
||||
};
|
||||
|
||||
/** 设置ep主题色 */
|
||||
/** 设置 `element-plus` 主题色 */
|
||||
const setEpThemeColor = (color: string) => {
|
||||
useEpThemeStoreHook().setEpThemeColor(color);
|
||||
body.style.setProperty("--el-color-primary-active", shadeBgColor(color));
|
||||
|
||||
@@ -2,7 +2,7 @@ import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { routerArrays } from "../types";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { useMultiTagsStore } from "/@/store/modules/multiTags";
|
||||
import { useMultiTagsStore } from "@/store/modules/multiTags";
|
||||
|
||||
export function useLayout() {
|
||||
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
import { computed } from "vue";
|
||||
import { getConfig } from "/@/config";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { getConfig } from "@/config";
|
||||
import { useRouter } from "vue-router";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
import { routeMetaType } from "../types";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { router, remainingPaths } from "/@/router";
|
||||
import { useAppStoreHook } from "/@/store/modules/app";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { router, remainingPaths } from "@/router";
|
||||
import { useAppStoreHook } from "@/store/modules/app";
|
||||
import { i18nChangeLanguage } from "@wangeditor/editor";
|
||||
import { useUserStoreHook } from "/@/store/modules/user";
|
||||
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
||||
import { useUserStoreHook } from "@/store/modules/user";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
|
||||
const errorInfo = "当前路由配置不正确,请检查配置";
|
||||
|
||||
export function useNav() {
|
||||
const pureApp = useAppStoreHook();
|
||||
const routers = useRouter().options.routes;
|
||||
const { wholeMenus } = storeToRefs(usePermissionStoreHook());
|
||||
|
||||
/** 用户名 */
|
||||
const username = computed(() => {
|
||||
@@ -99,6 +102,7 @@ export function useNav() {
|
||||
}
|
||||
|
||||
function menuSelect(indexPath: string, routers): void {
|
||||
if (wholeMenus.value.length === 0) return;
|
||||
if (isRemaining(indexPath)) return;
|
||||
let parentPath = "";
|
||||
const parentPathIndex = indexPath.lastIndexOf("/");
|
||||
|
||||
@@ -9,13 +9,13 @@ import {
|
||||
getCurrentInstance
|
||||
} from "vue";
|
||||
import { tagsViewsType } from "../types";
|
||||
import { isEqual } from "lodash-unified";
|
||||
import type { StorageConfigs } from "/#/index";
|
||||
import { useEventListener } from "@vueuse/core";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { transformI18n, $t } from "/@/plugins/i18n";
|
||||
import { useSettingStoreHook } from "/@/store/modules/settings";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import { isEqual, isBoolean } from "@pureadmin/utils";
|
||||
import { useSettingStoreHook } from "@/store/modules/settings";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { storageLocal, toggleClass, hasClass } from "@pureadmin/utils";
|
||||
|
||||
export function useTags() {
|
||||
@@ -106,15 +106,14 @@ export function useTags() {
|
||||
]);
|
||||
|
||||
function conditionHandle(item, previous, next) {
|
||||
if (
|
||||
Object.keys(route.query).length === 0 &&
|
||||
Object.keys(route.params).length === 0
|
||||
) {
|
||||
return route.path === item.path ? previous : next;
|
||||
} else if (Object.keys(route.query).length > 0) {
|
||||
return isEqual(route.query, item.query) ? previous : next;
|
||||
if (isBoolean(route?.meta?.showLink) && route?.meta?.showLink === false) {
|
||||
if (Object.keys(route.query).length > 0) {
|
||||
return isEqual(route.query, item.query) ? previous : next;
|
||||
} else {
|
||||
return isEqual(route.params, item.params) ? previous : next;
|
||||
}
|
||||
} else {
|
||||
return isEqual(route.params, item.params) ? previous : next;
|
||||
return route.path === item.path ? previous : next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { setType } from "./types";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
import { useLayout } from "./hooks/useLayout";
|
||||
import { useAppStoreHook } from "/@/store/modules/app";
|
||||
import { useSettingStoreHook } from "/@/store/modules/settings";
|
||||
import { useAppStoreHook } from "@/store/modules/app";
|
||||
import { useSettingStoreHook } from "@/store/modules/settings";
|
||||
import { deviceDetection, useDark, useGlobal } from "@pureadmin/utils";
|
||||
import { h, reactive, computed, onMounted, defineComponent } from "vue";
|
||||
|
||||
@@ -13,7 +13,7 @@ import appMain from "./components/appMain.vue";
|
||||
import setting from "./components/setting/index.vue";
|
||||
import Vertical from "./components/sidebar/vertical.vue";
|
||||
import Horizontal from "./components/sidebar/horizontal.vue";
|
||||
import backTop from "/@/assets/svg/back_top.svg?component";
|
||||
import backTop from "@/assets/svg/back_top.svg?component";
|
||||
|
||||
const { isDark } = useDark();
|
||||
const { layout } = useLayout();
|
||||
@@ -70,7 +70,7 @@ let isAutoCloseSidebar = true;
|
||||
// 监听容器
|
||||
emitter.on("resize", ({ detail }) => {
|
||||
if (isMobile) return;
|
||||
let { width } = detail;
|
||||
const { width } = detail;
|
||||
width <= 760 ? setTheme("vertical") : setTheme(useAppStoreHook().layout);
|
||||
/** width app-wrapper类容器宽度
|
||||
* 0 < width <= 760 隐藏侧边栏
|
||||
|
||||
@@ -20,7 +20,6 @@ const themeColors = {
|
||||
menuHover: "#4091f7",
|
||||
subMenuBg: "#0f0303",
|
||||
subMenuActiveBg: "#4091f7",
|
||||
navTextColor: "#fff",
|
||||
menuText: "rgb(254 254 254 / 65%)",
|
||||
sidebarLogo: "#002140",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -33,7 +32,6 @@ const themeColors = {
|
||||
menuHover: "#e0ebf6",
|
||||
subMenuBg: "#fff",
|
||||
subMenuActiveBg: "#e0ebf6",
|
||||
navTextColor: "#7a80b4",
|
||||
menuText: "#7a80b4",
|
||||
sidebarLogo: "#fff",
|
||||
menuTitleHover: "#000",
|
||||
@@ -46,7 +44,6 @@ const themeColors = {
|
||||
menuHover: "#e13c39",
|
||||
subMenuBg: "#000",
|
||||
subMenuActiveBg: "#e13c39",
|
||||
navTextColor: "#red",
|
||||
menuText: "rgb(254 254 254 / 65.1%)",
|
||||
sidebarLogo: "#42090c",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -59,7 +56,6 @@ const themeColors = {
|
||||
menuHover: "#e85f33",
|
||||
subMenuBg: "#0f0603",
|
||||
subMenuActiveBg: "#e85f33",
|
||||
navTextColor: "#fff",
|
||||
menuText: "rgb(254 254 254 / 65%)",
|
||||
sidebarLogo: "#441708",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -72,7 +68,6 @@ const themeColors = {
|
||||
menuHover: "#f6da4d",
|
||||
subMenuBg: "#0f0603",
|
||||
subMenuActiveBg: "#f6da4d",
|
||||
navTextColor: "#fff",
|
||||
menuText: "rgb(254 254 254 / 65%)",
|
||||
sidebarLogo: "#443b05",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -85,7 +80,6 @@ const themeColors = {
|
||||
menuHover: "#59bfc1",
|
||||
subMenuBg: "#000",
|
||||
subMenuActiveBg: "#59bfc1",
|
||||
navTextColor: "#7a80b4",
|
||||
menuText: "#7a80b4",
|
||||
sidebarLogo: "#053434",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -98,7 +92,6 @@ const themeColors = {
|
||||
menuHover: "#60ac80",
|
||||
subMenuBg: "#000",
|
||||
subMenuActiveBg: "#60ac80",
|
||||
navTextColor: "#7a80b4",
|
||||
menuText: "#7a80b4",
|
||||
sidebarLogo: "#112f21",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -111,7 +104,6 @@ const themeColors = {
|
||||
menuHover: "#d84493",
|
||||
subMenuBg: "#000",
|
||||
subMenuActiveBg: "#d84493",
|
||||
navTextColor: "#7a80b4",
|
||||
menuText: "#7a80b4",
|
||||
sidebarLogo: "#3f0d29",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -124,7 +116,6 @@ const themeColors = {
|
||||
menuHover: "#693ac9",
|
||||
subMenuBg: "#000",
|
||||
subMenuActiveBg: "#693ac9",
|
||||
navTextColor: "#7a80b4",
|
||||
menuText: "#7a80b4",
|
||||
sidebarLogo: "#1f0c38",
|
||||
menuTitleHover: "#fff",
|
||||
@@ -147,7 +138,6 @@ export const genScssMultipleScopeVars = (): MultipleScopeVarsItem[] => {
|
||||
$menuHover: ${themeColors[key].menuHover} !default;
|
||||
$subMenuBg: ${themeColors[key].subMenuBg} !default;
|
||||
$subMenuActiveBg: ${themeColors[key].subMenuActiveBg} !default;
|
||||
$navTextColor: ${themeColors[key].navTextColor} !default;
|
||||
$menuText: ${themeColors[key].menuText} !default;
|
||||
$sidebarLogo: ${themeColors[key].sidebarLogo} !default;
|
||||
$menuTitleHover: ${themeColors[key].menuTitleHover} !default;
|
||||
|
||||
14
src/main.ts
14
src/main.ts
@@ -1,15 +1,15 @@
|
||||
import App from "./App.vue";
|
||||
import router from "./router";
|
||||
import { setupStore } from "/@/store";
|
||||
import { setupStore } from "@/store";
|
||||
import ElementPlus from "element-plus";
|
||||
import { useI18n } from "@/plugins/i18n";
|
||||
import { getServerConfig } from "./config";
|
||||
import { createApp, Directive } from "vue";
|
||||
import { useI18n } from "../src/plugins/i18n";
|
||||
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 { useTable } from "../src/plugins/vxe-table";
|
||||
import { injectResponsiveStorage } from "/@/utils/responsive";
|
||||
import { injectResponsiveStorage } from "@/utils/responsive";
|
||||
|
||||
import Table from "@pureadmin/table";
|
||||
import PureDescriptions from "@pureadmin/descriptions";
|
||||
@@ -32,7 +32,7 @@ import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
||||
const app = createApp(App);
|
||||
|
||||
// 自定义指令
|
||||
import * as directives from "/@/directives";
|
||||
import * as directives from "@/directives";
|
||||
Object.keys(directives).forEach(key => {
|
||||
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
||||
});
|
||||
@@ -48,7 +48,7 @@ app.component("IconifyIconOnline", IconifyIconOnline);
|
||||
app.component("FontIcon", FontIcon);
|
||||
|
||||
// 全局注册按钮级别权限组件
|
||||
import { Auth } from "/@/components/ReAuth";
|
||||
import { Auth } from "@/components/ReAuth";
|
||||
app.component("Auth", Auth);
|
||||
|
||||
getServerConfig(app).then(async config => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import "xe-utils";
|
||||
import "./index.scss";
|
||||
import XEUtils from "xe-utils";
|
||||
import { App, unref } from "vue";
|
||||
import { i18n } from "/@/plugins/i18n";
|
||||
import { i18n } from "@/plugins/i18n";
|
||||
import "font-awesome/css/font-awesome.min.css";
|
||||
import zh from "vxe-table/lib/locale/lang/zh-CN";
|
||||
import en from "vxe-table/lib/locale/lang/en-US";
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { getConfig } from "/@/config";
|
||||
import "@/utils/sso";
|
||||
import { getConfig } from "@/config";
|
||||
import { toRouteType } from "./types";
|
||||
import NProgress from "/@/utils/progress";
|
||||
import NProgress from "@/utils/progress";
|
||||
import { findIndex } from "lodash-unified";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { sessionKey, type DataInfo } from "/@/utils/auth";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { sessionKey, type DataInfo } from "@/utils/auth";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import {
|
||||
Router,
|
||||
createRouter,
|
||||
@@ -33,6 +34,7 @@ import pptRouter from "./modules/ppt";
|
||||
import homeRouter from "./modules/home";
|
||||
import ableRouter from "./modules/able";
|
||||
import listRouter from "./modules/list";
|
||||
import tableRouter from "./modules/table";
|
||||
import aboutRouter from "./modules/about";
|
||||
import errorRouter from "./modules/error";
|
||||
import guideRouter from "./modules/guide";
|
||||
@@ -50,6 +52,7 @@ const routes = [
|
||||
homeRouter,
|
||||
ableRouter,
|
||||
listRouter,
|
||||
tableRouter,
|
||||
aboutRouter,
|
||||
errorRouter,
|
||||
guideRouter,
|
||||
@@ -134,6 +137,10 @@ router.beforeEach((to: toRouteType, _from, next) => {
|
||||
else document.title = transformI18n(item.meta.title);
|
||||
});
|
||||
}
|
||||
/** 如果已经登录并存在登录信息后不能跳转到路由白名单,而是继续保持在当前页面 */
|
||||
function toCorrectRoute() {
|
||||
whiteList.includes(to.fullPath) ? next(_from.fullPath) : next();
|
||||
}
|
||||
if (userInfo) {
|
||||
// 无权限跳转403页面
|
||||
if (to.meta?.roles && !isOneOfArray(to.meta?.roles, userInfo?.roles)) {
|
||||
@@ -145,7 +152,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
|
||||
openLink(to?.name as string);
|
||||
NProgress.done();
|
||||
} else {
|
||||
next();
|
||||
toCorrectRoute();
|
||||
}
|
||||
} else {
|
||||
// 刷新
|
||||
@@ -175,7 +182,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
|
||||
}
|
||||
router.push(to.fullPath);
|
||||
});
|
||||
next();
|
||||
toCorrectRoute();
|
||||
}
|
||||
} else {
|
||||
if (to.path !== "/login") {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const ableRouter: RouteConfigsTable = {
|
||||
@@ -7,13 +7,13 @@ const ableRouter: RouteConfigsTable = {
|
||||
meta: {
|
||||
icon: "ubuntu-fill",
|
||||
title: $t("menus.hsAble"),
|
||||
rank: 4
|
||||
rank: 5
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/able/watermark",
|
||||
name: "WaterMark",
|
||||
component: () => import("/@/views/able/watermark.vue"),
|
||||
component: () => import("@/views/able/watermark.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsWatermark")
|
||||
}
|
||||
@@ -21,7 +21,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/print",
|
||||
name: "Print",
|
||||
component: () => import("/@/views/able/print.vue"),
|
||||
component: () => import("@/views/able/print.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsPrint")
|
||||
}
|
||||
@@ -29,7 +29,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/download",
|
||||
name: "Download",
|
||||
component: () => import("/@/views/able/download.vue"),
|
||||
component: () => import("@/views/able/download.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsDownload")
|
||||
}
|
||||
@@ -37,7 +37,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/iconSelect",
|
||||
name: "IconSelect",
|
||||
component: () => import("/@/views/able/icon-select.vue"),
|
||||
component: () => import("@/views/able/icon-select.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsIconSelect")
|
||||
}
|
||||
@@ -45,7 +45,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/timeline",
|
||||
name: "TimeLine",
|
||||
component: () => import("/@/views/able/timeline.vue"),
|
||||
component: () => import("@/views/able/timeline.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsTimeline")
|
||||
}
|
||||
@@ -53,7 +53,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/menuTree",
|
||||
name: "MenuTree",
|
||||
component: () => import("/@/views/able/menu-tree.vue"),
|
||||
component: () => import("@/views/able/menu-tree.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsMenuTree")
|
||||
}
|
||||
@@ -61,7 +61,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/lineTree",
|
||||
name: "LineTree",
|
||||
component: () => import("/@/views/able/line-tree.vue"),
|
||||
component: () => import("@/views/able/line-tree.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsLineTree")
|
||||
}
|
||||
@@ -69,7 +69,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/antTabs",
|
||||
name: "AntTabs",
|
||||
component: () => import("/@/views/able/ant-tabs.vue"),
|
||||
component: () => import("@/views/able/ant-tabs.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsAntTabs")
|
||||
}
|
||||
@@ -77,7 +77,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/antAnchor",
|
||||
name: "AntAnchor",
|
||||
component: () => import("/@/views/able/ant-anchor.vue"),
|
||||
component: () => import("@/views/able/ant-anchor.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsAntAnchor")
|
||||
}
|
||||
@@ -85,7 +85,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/antTreeSelect",
|
||||
name: "AntTreeSelect",
|
||||
component: () => import("/@/views/able/ant-treeSelect.vue"),
|
||||
component: () => import("@/views/able/ant-treeSelect.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsAntTreeSelect")
|
||||
}
|
||||
@@ -93,7 +93,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/debounce",
|
||||
name: "Debounce",
|
||||
component: () => import("/@/views/able/debounce.vue"),
|
||||
component: () => import("@/views/able/debounce.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsDebounce")
|
||||
}
|
||||
@@ -101,7 +101,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/barcode",
|
||||
name: "BarCode",
|
||||
component: () => import("/@/views/able/barcode.vue"),
|
||||
component: () => import("@/views/able/barcode.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsBarcode")
|
||||
}
|
||||
@@ -109,7 +109,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/qrcode",
|
||||
name: "QrCode",
|
||||
component: () => import("/@/views/able/qrcode.vue"),
|
||||
component: () => import("@/views/able/qrcode.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsQrcode")
|
||||
}
|
||||
@@ -117,7 +117,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/cascader",
|
||||
name: "Cascader",
|
||||
component: () => import("/@/views/able/cascader.vue"),
|
||||
component: () => import("@/views/able/cascader.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsCascader")
|
||||
}
|
||||
@@ -125,7 +125,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/swiper",
|
||||
name: "Swiper",
|
||||
component: () => import("/@/views/able/swiper.vue"),
|
||||
component: () => import("@/views/able/swiper.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsSwiper")
|
||||
}
|
||||
@@ -133,7 +133,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/virtualList",
|
||||
name: "VirtualList",
|
||||
component: () => import("/@/views/able/virtual-list/index.vue"),
|
||||
component: () => import("@/views/able/virtual-list/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsVirtualList")
|
||||
}
|
||||
@@ -141,7 +141,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/pdf",
|
||||
name: "Pdf",
|
||||
component: () => import("/@/views/able/pdf.vue"),
|
||||
component: () => import("@/views/able/pdf.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsPdf")
|
||||
}
|
||||
@@ -149,7 +149,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/execl",
|
||||
name: "Execl",
|
||||
component: () => import("/@/views/able/execl.vue"),
|
||||
component: () => import("@/views/able/execl.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsExecl")
|
||||
}
|
||||
@@ -157,7 +157,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/able/infiniteScroll",
|
||||
name: "InfiniteScroll",
|
||||
component: () => import("/@/views/able/infinite-scroll.vue"),
|
||||
component: () => import("@/views/able/infinite-scroll.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsInfiniteScroll")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const aboutRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const aboutRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/about/index",
|
||||
name: "About",
|
||||
component: () => import("/@/views/about/index.vue"),
|
||||
component: () => import("@/views/about/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsAbout")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const componentsRouter: RouteConfigsTable = {
|
||||
@@ -7,13 +7,13 @@ const componentsRouter: RouteConfigsTable = {
|
||||
meta: {
|
||||
icon: "menu",
|
||||
title: $t("menus.hscomponents"),
|
||||
rank: 5
|
||||
rank: 6
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/components/video",
|
||||
name: "Video",
|
||||
component: () => import("/@/views/components/video/index.vue"),
|
||||
component: () => import("@/views/components/video/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsvideo")
|
||||
}
|
||||
@@ -21,7 +21,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/map",
|
||||
name: "Map",
|
||||
component: () => import("/@/views/components/map/index.vue"),
|
||||
component: () => import("@/views/components/map/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsmap"),
|
||||
keepAlive: true,
|
||||
@@ -33,7 +33,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/draggable",
|
||||
name: "Draggable",
|
||||
component: () => import("/@/views/components/draggable/index.vue"),
|
||||
component: () => import("@/views/components/draggable/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsdraggable"),
|
||||
transition: {
|
||||
@@ -45,7 +45,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/splitPane",
|
||||
name: "SplitPane",
|
||||
component: () => import("/@/views/components/split-pane/index.vue"),
|
||||
component: () => import("@/views/components/split-pane/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hssplitPane"),
|
||||
extraIcon: {
|
||||
@@ -57,7 +57,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/button",
|
||||
name: "Button",
|
||||
component: () => import("/@/views/components/button/index.vue"),
|
||||
component: () => import("@/views/components/button/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsbutton")
|
||||
}
|
||||
@@ -65,7 +65,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/cropping",
|
||||
name: "Cropping",
|
||||
component: () => import("/@/views/components/cropping/index.vue"),
|
||||
component: () => import("@/views/components/cropping/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hscropping")
|
||||
}
|
||||
@@ -73,7 +73,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/countTo",
|
||||
name: "CountTo",
|
||||
component: () => import("/@/views/components/count-to/index.vue"),
|
||||
component: () => import("@/views/components/count-to/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hscountTo")
|
||||
}
|
||||
@@ -81,7 +81,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/selector",
|
||||
name: "Selector",
|
||||
component: () => import("/@/views/components/selector/index.vue"),
|
||||
component: () => import("@/views/components/selector/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsselector")
|
||||
}
|
||||
@@ -89,7 +89,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/seamlessScroll",
|
||||
name: "SeamlessScroll",
|
||||
component: () => import("/@/views/components/seamless-scroll/index.vue"),
|
||||
component: () => import("@/views/components/seamless-scroll/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsseamless")
|
||||
}
|
||||
@@ -97,7 +97,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/contextmenu",
|
||||
name: "ContextMenu",
|
||||
component: () => import("/@/views/components/contextmenu/index.vue"),
|
||||
component: () => import("@/views/components/contextmenu/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hscontextmenu")
|
||||
}
|
||||
@@ -105,7 +105,7 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/typeit",
|
||||
name: "Typeit",
|
||||
component: () => import("/@/views/components/typeit/index.vue"),
|
||||
component: () => import("@/views/components/typeit/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hstypeit")
|
||||
}
|
||||
@@ -113,10 +113,18 @@ const componentsRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/components/json-editor",
|
||||
name: "JsonEditor",
|
||||
component: () => import("/@/views/components/json-editor/index.vue"),
|
||||
component: () => import("@/views/components/json-editor/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsjsoneditor")
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/components/danmaku",
|
||||
name: "Danmaku",
|
||||
component: () => import("@/views/components/danmaku/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsdanmaku")
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const editorRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const editorRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/editor/index",
|
||||
name: "Editor",
|
||||
component: () => import("/@/views/editor/index.vue"),
|
||||
component: () => import("@/views/editor/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hseditor"),
|
||||
keepAlive: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const errorRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/error/403",
|
||||
name: "403",
|
||||
component: () => import("/@/views/error/403.vue"),
|
||||
component: () => import("@/views/error/403.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsfourZeroOne")
|
||||
}
|
||||
@@ -21,7 +21,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/error/404",
|
||||
name: "404",
|
||||
component: () => import("/@/views/error/404.vue"),
|
||||
component: () => import("@/views/error/404.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsfourZeroFour")
|
||||
}
|
||||
@@ -29,7 +29,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/error/500",
|
||||
name: "500",
|
||||
component: () => import("/@/views/error/500.vue"),
|
||||
component: () => import("@/views/error/500.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsFive")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const flowChartRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const flowChartRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/flowChart/index",
|
||||
name: "FlowChart",
|
||||
component: () => import("/@/views/flow-chart/index.vue"),
|
||||
component: () => import("@/views/flow-chart/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsflowChart")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
const IFrame = () => import("@/layout/frameView.vue");
|
||||
|
||||
const formDesignRouter: RouteConfigsTable = {
|
||||
path: "/formDesign",
|
||||
@@ -13,9 +14,11 @@ const formDesignRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/formDesign/index",
|
||||
name: "FormDesign",
|
||||
component: () => import("/@/views/form-design/index.vue"),
|
||||
component: IFrame,
|
||||
meta: {
|
||||
title: $t("menus.hsFormDesign")
|
||||
title: $t("menus.hsFormDesign"),
|
||||
frameSrc:
|
||||
"https://haixin-fang.github.io/starfish-vue3-lowcode/playground/index.html#/"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const guideRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const guideRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/guide/index",
|
||||
name: "Guide",
|
||||
component: () => import("/@/views/guide/index.vue"),
|
||||
component: () => import("@/views/guide/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsguide")
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
const Layout = () => import("/@/layout/index.vue");
|
||||
const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
const homeRouter: RouteConfigsTable = {
|
||||
path: "/",
|
||||
@@ -16,7 +16,7 @@ const homeRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/welcome",
|
||||
name: "Welcome",
|
||||
component: () => import("/@/views/welcome/index.vue"),
|
||||
component: () => import("@/views/welcome/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hshome")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const ableRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const ableRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/list/card",
|
||||
name: "ListCard",
|
||||
component: () => import("/@/views/list/card/index.vue"),
|
||||
component: () => import("@/views/list/card/index.vue"),
|
||||
meta: {
|
||||
icon: "card",
|
||||
title: $t("menus.hsListCard"),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const nestedRouter: RouteConfigsTable = {
|
||||
@@ -7,7 +7,7 @@ const nestedRouter: RouteConfigsTable = {
|
||||
meta: {
|
||||
title: $t("menus.hsmenus"),
|
||||
icon: "histogram",
|
||||
rank: 6
|
||||
rank: 7
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@@ -20,7 +20,7 @@ const nestedRouter: RouteConfigsTable = {
|
||||
children: [
|
||||
{
|
||||
path: "/nested/menu1/menu1-1",
|
||||
component: () => import("/@/views/nested/menu1/menu1-1/index.vue"),
|
||||
component: () => import("@/views/nested/menu1/menu1-1/index.vue"),
|
||||
name: "Menu1-1",
|
||||
meta: {
|
||||
title: $t("menus.hsmenu1-1"),
|
||||
@@ -38,7 +38,7 @@ const nestedRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/nested/menu1/menu1-2/menu1-2-1",
|
||||
component: () =>
|
||||
import("/@/views/nested/menu1/menu1-2/menu1-2-1/index.vue"),
|
||||
import("@/views/nested/menu1/menu1-2/menu1-2-1/index.vue"),
|
||||
name: "Menu1-2-1",
|
||||
meta: {
|
||||
title: $t("menus.hsmenu1-2-1"),
|
||||
@@ -48,7 +48,7 @@ const nestedRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/nested/menu1/menu1-2/menu1-2-2",
|
||||
component: () =>
|
||||
import("/@/views/nested/menu1/menu1-2/menu1-2-2/index.vue"),
|
||||
import("@/views/nested/menu1/menu1-2/menu1-2-2/index.vue"),
|
||||
name: "Menu1-2-2",
|
||||
meta: {
|
||||
title: $t("menus.hsmenu1-2-2"),
|
||||
@@ -63,7 +63,7 @@ const nestedRouter: RouteConfigsTable = {
|
||||
},
|
||||
{
|
||||
path: "/nested/menu1/menu1-3",
|
||||
component: () => import("/@/views/nested/menu1/menu1-3/index.vue"),
|
||||
component: () => import("@/views/nested/menu1/menu1-3/index.vue"),
|
||||
name: "Menu1-3",
|
||||
meta: {
|
||||
title: $t("menus.hsmenu1-3"),
|
||||
@@ -75,7 +75,7 @@ const nestedRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/nested/menu2",
|
||||
name: "Menu2",
|
||||
component: () => import("/@/views/nested/menu2/index.vue"),
|
||||
component: () => import("@/views/nested/menu2/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsmenu2"),
|
||||
keepAlive: true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
const IFrame = () => import("/@/layout/frameView.vue");
|
||||
const IFrame = () => import("@/layout/frameView.vue");
|
||||
|
||||
const pptRouter: RouteConfigsTable = {
|
||||
path: "/ppt",
|
||||
@@ -17,11 +17,7 @@ const pptRouter: RouteConfigsTable = {
|
||||
meta: {
|
||||
title: "PPT",
|
||||
frameSrc: "https://pipipi-pikachu.github.io/PPTist/",
|
||||
frameLoading: false,
|
||||
extraIcon: {
|
||||
svg: true,
|
||||
name: "team-iconxinpin"
|
||||
}
|
||||
frameLoading: false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
const Layout = () => import("/@/layout/index.vue");
|
||||
const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
const remainingRouter: Array<RouteConfigsTable> = [
|
||||
{
|
||||
path: "/login",
|
||||
name: "Login",
|
||||
component: () => import("/@/views/login/index.vue"),
|
||||
component: () => import("@/views/login/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hslogin"),
|
||||
showLink: false,
|
||||
@@ -26,7 +26,7 @@ const remainingRouter: Array<RouteConfigsTable> = [
|
||||
{
|
||||
path: "/redirect/:path(.*)",
|
||||
name: "Redirect",
|
||||
component: () => import("/@/layout/redirect.vue")
|
||||
component: () => import("@/layout/redirect.vue")
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -34,7 +34,7 @@ const remainingRouter: Array<RouteConfigsTable> = [
|
||||
{
|
||||
path: "/empty",
|
||||
name: "Empty",
|
||||
component: () => import("/@/views/empty/index.vue"),
|
||||
component: () => import("@/views/empty/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsempty"),
|
||||
showLink: false,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const resultRouter: RouteConfigsTable = {
|
||||
@@ -13,7 +13,7 @@ const resultRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/result/success",
|
||||
name: "Success",
|
||||
component: () => import("/@/views/result/success.vue"),
|
||||
component: () => import("@/views/result/success.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsSuccess")
|
||||
}
|
||||
@@ -21,7 +21,7 @@ const resultRouter: RouteConfigsTable = {
|
||||
{
|
||||
path: "/result/fail",
|
||||
name: "Fail",
|
||||
component: () => import("/@/views/result/fail.vue"),
|
||||
component: () => import("@/views/result/fail.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsFail")
|
||||
}
|
||||
|
||||
27
src/router/modules/table.ts
Normal file
27
src/router/modules/table.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const flowChartRouter: RouteConfigsTable = {
|
||||
path: "/pure-table",
|
||||
redirect: "/pure-table/index",
|
||||
meta: {
|
||||
icon: "mdi:table-large",
|
||||
title: "pure-admin-table",
|
||||
rank: 4
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/pure-table/index",
|
||||
name: "PureTable",
|
||||
component: () => import("@/views/pure-table/index.vue"),
|
||||
meta: {
|
||||
title: "pure-admin-table",
|
||||
extraIcon: {
|
||||
svg: true,
|
||||
name: "team-iconxinpin"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default flowChartRouter;
|
||||
@@ -10,7 +10,7 @@ import { router } from "./index";
|
||||
import { isProxy, toRaw } from "vue";
|
||||
import { loadEnv } from "../../build";
|
||||
import { useTimeoutFn } from "@vueuse/core";
|
||||
import { RouteConfigs } from "/@/layout/types";
|
||||
import { RouteConfigs } from "@/layout/types";
|
||||
import {
|
||||
isString,
|
||||
storageSession,
|
||||
@@ -18,14 +18,14 @@ import {
|
||||
isIncludeAllChildren
|
||||
} from "@pureadmin/utils";
|
||||
import { cloneDeep, intersection } from "lodash-unified";
|
||||
import { sessionKey, type DataInfo } from "/@/utils/auth";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
const IFrame = () => import("/@/layout/frameView.vue");
|
||||
import { sessionKey, type DataInfo } from "@/utils/auth";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
const IFrame = () => import("@/layout/frameView.vue");
|
||||
// https://cn.vitejs.dev/guide/features.html#glob-import
|
||||
const modulesRoutes = import.meta.glob("/src/views/**/*.{vue,tsx}");
|
||||
|
||||
// 动态路由
|
||||
import { getAsyncRoutes } from "/@/api/routes";
|
||||
import { getAsyncRoutes } from "@/api/routes";
|
||||
|
||||
/** 按照路由中meta下的rank等级升序来排序路由 */
|
||||
function ascending(arr: any[]) {
|
||||
@@ -76,7 +76,7 @@ function isOneOfArray(a: Array<string>, b: Array<string>) {
|
||||
/** 从sessionStorage里取出当前登陆用户的角色roles,过滤无权限的菜单 */
|
||||
function filterNoPermissionTree(data: RouteComponent[]) {
|
||||
const currentRoles =
|
||||
storageSession.getItem<DataInfo<number>>(sessionKey).roles ?? [];
|
||||
storageSession.getItem<DataInfo<number>>(sessionKey)?.roles ?? [];
|
||||
const newTree = cloneDeep(data).filter((v: any) =>
|
||||
isOneOfArray(v.meta?.roles, currentRoles)
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { store } from "/@/store";
|
||||
import { store } from "@/store";
|
||||
import { appType } from "./types";
|
||||
import { defineStore } from "pinia";
|
||||
import { getConfig } from "/@/config";
|
||||
import { getConfig } from "@/config";
|
||||
import type { StorageConfigs } from "/#/index";
|
||||
import { deviceDetection, storageLocal } from "@pureadmin/utils";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { store } from "/@/store";
|
||||
import { store } from "@/store";
|
||||
import { defineStore } from "pinia";
|
||||
import { getConfig } from "/@/config";
|
||||
import { getConfig } from "@/config";
|
||||
import type { StorageConfigs } from "/#/index";
|
||||
import { storageLocal } from "@pureadmin/utils";
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { store } from "/@/store";
|
||||
import { isEqual } from "lodash-unified";
|
||||
import { store } from "@/store";
|
||||
import { isEqual } from "@pureadmin/utils";
|
||||
import type { StorageConfigs } from "/#/index";
|
||||
import { routerArrays } from "/@/layout/types";
|
||||
import { routerArrays } from "@/layout/types";
|
||||
import { multiType, positionType } from "./types";
|
||||
import { isUrl, storageLocal } from "@pureadmin/utils";
|
||||
|
||||
@@ -11,11 +11,11 @@ export const useMultiTagsStore = defineStore({
|
||||
state: () => ({
|
||||
// 存储标签页信息(路由信息)
|
||||
multiTags: storageLocal.getItem<StorageConfigs>("responsive-configure")
|
||||
.multiTagsCache
|
||||
?.multiTagsCache
|
||||
? storageLocal.getItem<StorageConfigs>("responsive-tags")
|
||||
: [...routerArrays],
|
||||
multiTagsCache: storageLocal.getItem<StorageConfigs>("responsive-configure")
|
||||
.multiTagsCache
|
||||
?.multiTagsCache
|
||||
}),
|
||||
getters: {
|
||||
getMultiTagsCache() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { store } from "/@/store";
|
||||
import { store } from "@/store";
|
||||
import { cacheType } from "./types";
|
||||
import { constantMenus } from "/@/router";
|
||||
import { ascending, filterTree, filterNoPermissionTree } from "/@/router/utils";
|
||||
import { constantMenus } from "@/router";
|
||||
import { ascending, filterTree, filterNoPermissionTree } from "@/router/utils";
|
||||
|
||||
export const usePermissionStore = defineStore({
|
||||
id: "pure-permission",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { store } from "/@/store";
|
||||
import { store } from "@/store";
|
||||
import { setType } from "./types";
|
||||
import { getConfig } from "/@/config";
|
||||
import { getConfig } from "@/config";
|
||||
|
||||
export const useSettingStore = defineStore({
|
||||
id: "pure-setting",
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { store } from "/@/store";
|
||||
import { store } from "@/store";
|
||||
import { userType } from "./types";
|
||||
import { routerArrays } from "/@/layout/types";
|
||||
import { router, resetRouter } from "/@/router";
|
||||
import { routerArrays } from "@/layout/types";
|
||||
import { router, resetRouter } from "@/router";
|
||||
import { storageSession } from "@pureadmin/utils";
|
||||
import { getLogin, refreshTokenApi } from "/@/api/user";
|
||||
import { UserResult, RefreshTokenResult } from "/@/api/user";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import {
|
||||
type DataInfo,
|
||||
setToken,
|
||||
removeToken,
|
||||
sessionKey
|
||||
} from "/@/utils/auth";
|
||||
import { getLogin, refreshTokenApi } from "@/api/user";
|
||||
import { UserResult, RefreshTokenResult } from "@/api/user";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { type DataInfo, setToken, removeToken, sessionKey } from "@/utils/auth";
|
||||
|
||||
export const useUserStore = defineStore({
|
||||
id: "pure-user",
|
||||
state: (): userType => ({
|
||||
// 用户名
|
||||
username:
|
||||
storageSession.getItem<DataInfo<number>>(sessionKey)?.username ?? "",
|
||||
// 页面级别权限
|
||||
@@ -63,9 +59,9 @@ export const useUserStore = defineStore({
|
||||
this.username = "";
|
||||
this.roles = [];
|
||||
removeToken();
|
||||
router.push("/login");
|
||||
useMultiTagsStoreHook().handleTags("equal", [...routerArrays]);
|
||||
resetRouter();
|
||||
router.push("/login");
|
||||
},
|
||||
/** 刷新`token` */
|
||||
async handRefreshToken(data) {
|
||||
|
||||
@@ -129,7 +129,7 @@ html.dark {
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
.vxe-button.type--button.size--medium:hover {
|
||||
.vxe-button.type--button:hover {
|
||||
background: var(--el-color-primary) !important;
|
||||
}
|
||||
|
||||
@@ -170,6 +170,12 @@ html.dark {
|
||||
}
|
||||
}
|
||||
|
||||
/* intro.js */
|
||||
.introjs-tooltip-title,
|
||||
.introjs-tooltiptext {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
/* element-plus */
|
||||
.el-table__cell {
|
||||
background: var(--el-bg-color);
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
filter: invert(80%);
|
||||
}
|
||||
|
||||
/* 重置 vxe-table 中 pager 样式 */
|
||||
/* 重置 vxe-table 样式 */
|
||||
.vxe-button.type--button.theme--primary:hover,
|
||||
.vxe-pager .vxe-pager--num-btn:not(.is--disabled).is--active {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
@@ -44,16 +44,6 @@ abbr:where([title]) {
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
|
||||
@@ -68,10 +68,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.el-popper.is-light {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.sidebar-container {
|
||||
/* 展开动画 */
|
||||
transition: width var(--pure-transition-duration);
|
||||
@@ -233,11 +229,9 @@
|
||||
.search-container,
|
||||
/* 告警 */
|
||||
.dropdown-badge,
|
||||
/* 全屏 */
|
||||
.screen-full,
|
||||
/* 国际化 */
|
||||
.globalization,
|
||||
/* 登录名 */
|
||||
/* 用户名 */
|
||||
.el-dropdown-link,
|
||||
/* 设置 */
|
||||
.set-icon {
|
||||
@@ -587,11 +581,9 @@ body[layout="vertical"] {
|
||||
.search-container,
|
||||
/* 告警 */
|
||||
.dropdown-badge,
|
||||
/* 全屏 */
|
||||
.screen-full,
|
||||
/* 国际化 */
|
||||
.globalization,
|
||||
/* 登录名 */
|
||||
/* 用户名 */
|
||||
.el-dropdown-link,
|
||||
/* 设置 */
|
||||
.set-icon {
|
||||
|
||||
@@ -40,16 +40,3 @@
|
||||
.breadcrumb-leave-active {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 重置el-menu的展开收起动画时长
|
||||
* @see {@link https://github.com/element-plus/element-plus/issues/4509#issuecomment-980165001}
|
||||
*/
|
||||
.outer-most .el-collapse-transition-leave-active,
|
||||
.outer-most .el-collapse-transition-enter-active {
|
||||
transition: 0.12s all ease-in-out !important;
|
||||
}
|
||||
|
||||
.horizontal-collapse-transition {
|
||||
transition: var(--pure-transition-duration) all !important;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user