mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-13 21:33:42 +08:00
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
83862ba76e | ||
|
060c0a91c7 | ||
|
76649e2a08 | ||
|
ddf3823a55 | ||
|
e75fd73f34 | ||
|
1f4647b995 | ||
|
910dfca8bb | ||
|
ffb48b15bc | ||
|
e6086f0f35 | ||
|
9b05d73e6d | ||
|
bd69c00e74 | ||
|
d08a3817d1 | ||
|
d0380ce5cb | ||
|
756f84ab1d | ||
|
5a4f844d24 | ||
|
59faf15229 | ||
|
5bd96b8dd3 | ||
|
8efdb10d86 | ||
|
2aa85c6f93 | ||
|
3ad438984e | ||
|
f1850416c8 | ||
|
086bad474e | ||
|
42b121a117 | ||
|
db64b0e2e9 | ||
|
40d0f8ac1c | ||
|
87b18386f5 | ||
|
4c1c7e6599 | ||
|
ac78b9a394 | ||
|
e379d6ce67 | ||
|
64fc0996e3 | ||
|
bc8dc47d7f |
@@ -1,5 +1,5 @@
|
|||||||
# backend service base url, prod environment
|
# backend service base url, prod environment
|
||||||
VITE_SERVICE_BASE_URL=https://mock.apifox.com/m1/3109515-0-default
|
VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
|
||||||
|
|
||||||
# other backend service base url, prod environment
|
# other backend service base url, prod environment
|
||||||
VITE_OTHER_SERVICE_BASE_URL= `{
|
VITE_OTHER_SERVICE_BASE_URL= `{
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# backend service base url, test environment
|
# backend service base url, test environment
|
||||||
VITE_SERVICE_BASE_URL=https://mock.apifox.com/m1/3109515-0-default
|
VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
|
||||||
|
|
||||||
# other backend service base url, test environment
|
# other backend service base url, test environment
|
||||||
VITE_OTHER_SERVICE_BASE_URL= `{
|
VITE_OTHER_SERVICE_BASE_URL= `{
|
||||||
|
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -12,7 +12,7 @@
|
|||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "TS Debugger",
|
"name": "TS Debugger",
|
||||||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/tsx",
|
"runtimeExecutable": "tsx",
|
||||||
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"],
|
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"],
|
||||||
"program": "${file}"
|
"program": "${file}"
|
||||||
}
|
}
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -14,5 +14,6 @@
|
|||||||
"i18n-ally.localesPaths": ["src/locales/langs"],
|
"i18n-ally.localesPaths": ["src/locales/langs"],
|
||||||
"prettier.enable": false,
|
"prettier.enable": false,
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"unocss.root": ["./"]
|
"unocss.root": ["./"],
|
||||||
|
"vue.server.hybridMode": true
|
||||||
}
|
}
|
||||||
|
95
CHANGELOG.md
95
CHANGELOG.md
@@ -1,6 +1,101 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## [v1.1.5](https://github.com/soybeanjs/soybean-admin/compare/v1.1.4...v1.1.5) (2024-06-06)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **projects**: fix register name, CodeLogin => Register - by @m-xlsea in https://github.com/soybeanjs/soybean-admin/issues/478 [<samp>(ddf38)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ddf3823)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**: update deps - by @soybeanjs [<samp>(060c0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/060c0a9)
|
||||||
|
- **projects**: update vscode settings: vue official - by @soybeanjs [<samp>(76649)</samp>](https://github.com/soybeanjs/soybean-admin/commit/76649e2)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/m-xlsea)
|
||||||
|
|
||||||
|
## [v1.1.4](https://github.com/honghuangdc/soybean-admin/compare/v1.1.3...v1.1.4) (2024-06-06)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **utils**: modalLogout bug when esc is pressed - by @sigma-plus in https://github.com/honghuangdc/soybean-admin/issues/470 [<samp>(bd69c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/bd69c00)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **projects**: optimize RouteMeta remarks - by @soybeanjs [<samp>(ffb48)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ffb48b1)
|
||||||
|
|
||||||
|
### 📖 Documentation
|
||||||
|
|
||||||
|
- **projects**:
|
||||||
|
- update CHANGELOG - by @soybeanjs [<samp>(756f8)</samp>](https://github.com/honghuangdc/soybean-admin/commit/756f84a)
|
||||||
|
- update Node&pnpm version - by @Azir-11 in https://github.com/honghuangdc/soybean-admin/issues/472 [<samp>(9b05d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/9b05d73)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**:
|
||||||
|
- update deps - by @soybeanjs [<samp>(d0380)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d0380ce)
|
||||||
|
- update deps - by @soybeanjs [<samp>(1f464)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1f4647b)
|
||||||
|
- **projects**:
|
||||||
|
- close http proxy - by @soybeanjs [<samp>(d08a3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d08a381)
|
||||||
|
- update mock url - by @soybeanjs [<samp>(e6086)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e6086f0)
|
||||||
|
- update vscode settings - by @soybeanjs [<samp>(910df)</samp>](https://github.com/honghuangdc/soybean-admin/commit/910dfca)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/Azir-11) [](https://github.com/sigma-plus)
|
||||||
|
|
||||||
|
## [v1.1.3](https://github.com/soybeanjs/soybean-admin/compare/v1.1.2...v1.1.3) (2024-06-02)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **components**:
|
||||||
|
- Fix the issue of search box popping up repeatedly due to carriage return - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/468 [<samp>(5bd96)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5bd96b8)
|
||||||
|
- **projects**:
|
||||||
|
- fix click menu search. fixed #466, close #467 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/466 and https://github.com/soybeanjs/soybean-admin/issues/467 [<samp>(8efdb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/8efdb10)
|
||||||
|
- fix reCacheRoute. fixed #464 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/464 [<samp>(59faf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/59faf15)
|
||||||
|
- **styles**:
|
||||||
|
- fix FirstLevelMenu style. fixed #450 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/450 [<samp>(db64b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/db64b0e)
|
||||||
|
- fix PinToggler style. fixed #451 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/451 [<samp>(42b12)</samp>](https://github.com/soybeanjs/soybean-admin/commit/42b121a)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **components**: accuracy draggable area for TableColumnSetting with animation - by @orangelckc in https://github.com/soybeanjs/soybean-admin/issues/465 [<samp>(2aa85)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2aa85c6)
|
||||||
|
- **projects**: unocss border shortcut - by @soybeanjs [<samp>(40d0f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/40d0f8a)
|
||||||
|
|
||||||
|
### 📖 Documentation
|
||||||
|
|
||||||
|
- **projects**: update CHANGELOG - by @soybeanjs [<samp>(87b18)</samp>](https://github.com/soybeanjs/soybean-admin/commit/87b1838)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **other**:
|
||||||
|
- correct spell mistake - by @orangelckc in https://github.com/soybeanjs/soybean-admin/issues/460 [<samp>(086ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/086bad4)
|
||||||
|
- correct spell mistake - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/462 [<samp>(f1850)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f185041)
|
||||||
|
- **projects**:
|
||||||
|
- update vscode launch.json - by @soybeanjs [<samp>(4c1c7)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4c1c7e6)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/Azir-11) [](https://github.com/orangelckc)
|
||||||
|
|
||||||
|
## [v1.1.2](https://github.com/soybeanjs/soybean-admin/compare/v1.1.1...v1.1.2) (2024-05-24)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **projects**:
|
||||||
|
- fix header style & fix button highlight when click global-tab. fixed #446 - by @honghuangdc in https://github.com/soybeanjs/soybean-admin/issues/446 [<samp>(64fc0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/64fc099)
|
||||||
|
- fix multi tab page only render once. fixed #441 - by @honghuangdc in https://github.com/soybeanjs/soybean-admin/issues/441 [<samp>(e379d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e379d6c)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **projects**: optimize code - by @honghuangdc [<samp>(bc8dc)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bc8dc47)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/honghuangdc)
|
||||||
|
|
||||||
## [v1.1.1](https://github.com/soybeanjs/soybean-admin/compare/v1.1.0...v1.1.1) (2024-05-20)
|
## [v1.1.1](https://github.com/soybeanjs/soybean-admin/compare/v1.1.0...v1.1.1) (2024-05-20)
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
@@ -1,5 +1,86 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
## [v1.1.3](https://github.com/soybeanjs/soybean-admin/compare/v1.1.2...v1.1.3) (2024-06-02)
|
||||||
|
|
||||||
|
### 🐞 错误修复
|
||||||
|
|
||||||
|
- **组件**:
|
||||||
|
- 修复了由于回车导致搜索框反复弹出的问题 - 由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/468 中修复 [<samp>(5bd96)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5bd96b8)
|
||||||
|
- **项目**:
|
||||||
|
- 修复点击菜单搜索。修复了 #466,关闭 #467 - 由 @soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/466 和 https://github.com/soybeanjs/soybean-admin/issues/467 中修复 [<samp>(8efdb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/8efdb10)
|
||||||
|
- 修复 reCacheRoute。修复了 #464 - 由 @soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/464 中修复 [<samp>(59faf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/59faf15)
|
||||||
|
- **样式**:
|
||||||
|
- 修复 FirstLevelMenu 样式。修复了 #450 - 由 @soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/450 中修复 [<samp>(db64b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/db64b0e)
|
||||||
|
- 修复 PinToggler 样式。修复了 #451 - 由 @soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/451 中修复 [<samp>(42b12)</samp>](https://github.com/soybeanjs/soybean-admin/commit/42b121a)
|
||||||
|
|
||||||
|
### 🛠 优化
|
||||||
|
|
||||||
|
- **组件**: 提高 TableColumnSetting 的拖动区域精度,带有动画 - 由 @orangelckc 在 https://github.com/soybeanjs/soybean-admin/issues/465 中优化 [<samp>(2aa85)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2aa85c6)
|
||||||
|
- **项目**: unocss 边框快捷方式 - 由 @soybeanjs 优化 [<samp>(40d0f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/40d0f8a)
|
||||||
|
|
||||||
|
### 📖 文档
|
||||||
|
|
||||||
|
- **项目**: 更新 CHANGELOG - 由 @soybeanjs 更新 [<samp>(87b18)</samp>](https://github.com/soybeanjs/soybean-admin/commit/87b1838)
|
||||||
|
|
||||||
|
### 🏡 杂项
|
||||||
|
|
||||||
|
- **其他**:
|
||||||
|
- 纠正拼写错误 - 由 @orangelckc 在 https://github.com/soybeanjs/soybean-admin/issues/460 中纠正 [<samp>(086ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/086bad4)
|
||||||
|
- 纠正拼写错误 - 由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/462 中纠正 [<samp>(f1850)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f185041)
|
||||||
|
- **项目**:
|
||||||
|
- 更新 vscode launch.json - 由 @soybeanjs 更新 [<samp>(4c1c7)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4c1c7e6)
|
||||||
|
|
||||||
|
### ❤️ 贡献者
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/Azir-11) [](https://github.com/orangelckc)
|
||||||
|
|
||||||
|
## [v1.1.2](https://github.com/soybeanjs/soybean-admin/compare/v1.1.1...v1.1.2) (2024-05-24)
|
||||||
|
|
||||||
|
### 🐞 错误修复
|
||||||
|
|
||||||
|
- **项目**:
|
||||||
|
- 修复头部样式 & 修复点击全局标签时按钮高亮。修复了 #446 - 由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/446 [<samp>(64fc0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/64fc099)
|
||||||
|
- 修复多标签页只渲染一次。修复了 #441 - 由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/441 [<samp>(e379d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e379d6c)
|
||||||
|
|
||||||
|
### 🛠 优化
|
||||||
|
|
||||||
|
- **项目**: 优化代码 - 由 @honghuangdc [<samp>(bc8dc)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bc8dc47)
|
||||||
|
|
||||||
|
### ❤️ 贡献者
|
||||||
|
|
||||||
|
[](https://github.com/honghuangdc)
|
||||||
|
|
||||||
|
## [v1.1.1](https://github.com/soybeanjs/soybean-admin/compare/v1.1.0...v1.1.1) (2024-05-20)
|
||||||
|
|
||||||
|
### 🚀 功能
|
||||||
|
|
||||||
|
- **hooks**: 为 useEcharts 添加 setOptions - 由 @honghuangdc 提交 [<samp>(e4d53)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e4d53aa)
|
||||||
|
|
||||||
|
### 🐞 修复错误
|
||||||
|
|
||||||
|
- **projects**:
|
||||||
|
- 修复 useRouter。修复了 #436 - 由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/436 提交 [<samp>(0774a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/0774a51)
|
||||||
|
- 在动态路由模式下获取路由时添加错误处理。修复了 440 - 由 @honghuangdc 提交 [<samp>(57b4a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/57b4a9d)
|
||||||
|
- **styles**:
|
||||||
|
- 修复 useTable 类型 - 由 @honghuangdc 提交 [<samp>(07124)</samp>](https://github.com/soybeanjs/soybean-admin/commit/071241f)
|
||||||
|
|
||||||
|
### 📖 文档
|
||||||
|
|
||||||
|
- **projects**:
|
||||||
|
- 更新 CHANGELOG - 由 @honghuangdc 提交 [<samp>(19783)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1978397)
|
||||||
|
- 更新 README.md - 由 @honghuangdc 提交 [<samp>(fa56e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/fa56e9c)
|
||||||
|
- 更新 README.md - 由 @honghuangdc 提交 [<samp>(419ea)</samp>](https://github.com/soybeanjs/soybean-admin/commit/419ea42)
|
||||||
|
|
||||||
|
### 🏡 杂项
|
||||||
|
|
||||||
|
- **projects**:
|
||||||
|
- 更新依赖并修复 TS 错误 - 由 @honghuangdc 提交 [<samp>(4ea9c)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4ea9c85)
|
||||||
|
- 更新 eslint-config 并修复代码 - 由 @honghuangdc 提交 [<samp>(68ea9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/68ea974)
|
||||||
|
- 更新 @elegant-router/vue 并为 resolve route 添加错误处理。修复了 #442 - 由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/442 提交 [<samp>(24ff8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/24ff852)
|
||||||
|
|
||||||
|
### ❤️ 贡献者
|
||||||
|
|
||||||
|
[](https://github.com/honghuangdc)
|
||||||
|
|
||||||
## [v1.1.0](https://github.com/honghuangdc/soybean-admin/compare/v1.0.9...v1.1.0) (2024-05-07)
|
## [v1.1.0](https://github.com/honghuangdc/soybean-admin/compare/v1.0.9...v1.1.0) (2024-05-07)
|
||||||
|
|
||||||
|
@@ -78,8 +78,8 @@
|
|||||||
Make sure your environment meets the following requirements:
|
Make sure your environment meets the following requirements:
|
||||||
|
|
||||||
- **git**: you need git to clone and manage project versions.
|
- **git**: you need git to clone and manage project versions.
|
||||||
- **NodeJS**: >=18.0.0, recommended 18.19.0 or higher.
|
- **NodeJS**: >=18.12.0, recommended 18.19.0 or higher.
|
||||||
- **pnpm**: >= 8.0.0, recommended 8.14.0 or higher.
|
- **pnpm**: >= 8.7.0, recommended 8.14.0 or higher.
|
||||||
|
|
||||||
**Clone Project**
|
**Clone Project**
|
||||||
|
|
||||||
|
@@ -77,8 +77,8 @@
|
|||||||
确保你的环境满足以下要求:
|
确保你的环境满足以下要求:
|
||||||
|
|
||||||
- **git**: 你需要git来克隆和管理项目版本。
|
- **git**: 你需要git来克隆和管理项目版本。
|
||||||
- **NodeJS**: >=18.0.0,推荐 18.19.0 或更高。
|
- **NodeJS**: >=18.12.0,推荐 18.19.0 或更高。
|
||||||
- **pnpm**: >= 8.0.0,推荐 8.14.0 或更高。
|
- **pnpm**: >= 8.7.0,推荐 8.14.0 或更高。
|
||||||
|
|
||||||
**克隆项目**
|
**克隆项目**
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ export default defineConfig(
|
|||||||
'vue/multi-word-component-names': [
|
'vue/multi-word-component-names': [
|
||||||
'warn',
|
'warn',
|
||||||
{
|
{
|
||||||
ignores: ['index', 'App', '[id]', '[url]']
|
ignores: ['index', 'App', 'Register', '[id]', '[url]']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'vue/component-name-in-template-casing': [
|
'vue/component-name-in-template-casing': [
|
||||||
|
43
package.json
43
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "soybean-admin",
|
"name": "soybean-admin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Soybean",
|
"name": "Soybean",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"@sa/hooks": "workspace:*",
|
"@sa/hooks": "workspace:*",
|
||||||
"@sa/materials": "workspace:*",
|
"@sa/materials": "workspace:*",
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"@vueuse/core": "10.9.0",
|
"@vueuse/core": "10.10.0",
|
||||||
"clipboard": "2.0.11",
|
"clipboard": "2.0.11",
|
||||||
"dayjs": "1.11.11",
|
"dayjs": "1.11.11",
|
||||||
"echarts": "5.5.0",
|
"echarts": "5.5.0",
|
||||||
@@ -61,42 +61,43 @@
|
|||||||
"naive-ui": "2.38.2",
|
"naive-ui": "2.38.2",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
|
"tailwind-merge": "^2.3.0",
|
||||||
"vue": "3.4.27",
|
"vue": "3.4.27",
|
||||||
"vue-draggable-plus": "0.4.1",
|
"vue-draggable-plus": "0.5.0",
|
||||||
"vue-i18n": "9.13.1",
|
"vue-i18n": "9.13.1",
|
||||||
"vue-router": "4.3.2"
|
"vue-router": "4.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@elegant-router/vue": "0.3.7",
|
"@elegant-router/vue": "0.3.7",
|
||||||
"@iconify/json": "2.2.211",
|
"@iconify/json": "2.2.216",
|
||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.3.5",
|
"@soybeanjs/eslint-config": "1.3.6",
|
||||||
"@types/lodash-es": "4.17.12",
|
"@types/lodash-es": "4.17.12",
|
||||||
"@types/node": "20.12.12",
|
"@types/node": "20.14.2",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@unocss/eslint-config": "0.60.2",
|
"@unocss/eslint-config": "0.60.4",
|
||||||
"@unocss/preset-icons": "0.60.2",
|
"@unocss/preset-icons": "0.60.4",
|
||||||
"@unocss/preset-uno": "0.60.2",
|
"@unocss/preset-uno": "0.60.4",
|
||||||
"@unocss/transformer-directives": "0.60.2",
|
"@unocss/transformer-directives": "0.60.4",
|
||||||
"@unocss/transformer-variant-group": "0.60.2",
|
"@unocss/transformer-variant-group": "0.60.4",
|
||||||
"@unocss/vite": "0.60.2",
|
"@unocss/vite": "0.60.4",
|
||||||
"@vitejs/plugin-vue": "5.0.4",
|
"@vitejs/plugin-vue": "5.0.5",
|
||||||
"@vitejs/plugin-vue-jsx": "3.1.0",
|
"@vitejs/plugin-vue-jsx": "4.0.0",
|
||||||
"eslint": "9.3.0",
|
"eslint": "9.4.0",
|
||||||
"eslint-plugin-vue": "9.26.0",
|
"eslint-plugin-vue": "9.26.0",
|
||||||
"lint-staged": "15.2.2",
|
"lint-staged": "15.2.5",
|
||||||
"sass": "1.77.2",
|
"sass": "1.77.4",
|
||||||
"simple-git-hooks": "2.11.1",
|
"simple-git-hooks": "2.11.1",
|
||||||
"tsx": "4.10.5",
|
"tsx": "4.12.0",
|
||||||
"typescript": "5.4.5",
|
"typescript": "5.4.5",
|
||||||
"unplugin-icons": "0.19.0",
|
"unplugin-icons": "0.19.0",
|
||||||
"unplugin-vue-components": "0.27.0",
|
"unplugin-vue-components": "0.27.0",
|
||||||
"vite": "5.2.11",
|
"vite": "5.2.12",
|
||||||
"vite-plugin-progress": "0.0.7",
|
"vite-plugin-progress": "0.0.7",
|
||||||
"vite-plugin-svg-icons": "2.0.1",
|
"vite-plugin-svg-icons": "2.0.1",
|
||||||
"vite-plugin-vue-devtools": "7.2.0",
|
"vite-plugin-vue-devtools": "7.2.1",
|
||||||
"vue-eslint-parser": "9.4.2",
|
"vue-eslint-parser": "9.4.3",
|
||||||
"vue-tsc": "2.0.19"
|
"vue-tsc": "2.0.19"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/axios",
|
"name": "@sa/axios",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"axios": "1.6.8",
|
"axios": "1.7.2",
|
||||||
"axios-retry": "4.2.0",
|
"axios-retry": "4.4.0",
|
||||||
"qs": "6.12.1"
|
"qs": "6.12.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/color",
|
"name": "@sa/color",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/hooks",
|
"name": "@sa/hooks",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/materials",
|
"name": "@sa/materials",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -36,7 +36,7 @@ defineSlots<Slots>();
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class=":soy: relative inline-flex cursor-pointer items-center justify-center gap-12px whitespace-nowrap border-1px rounded-4px border-solid px-12px py-4px"
|
class=":soy: relative inline-flex cursor-pointer items-center justify-center gap-12px whitespace-nowrap border-(1px solid) rounded-4px px-12px py-4px"
|
||||||
:class="[
|
:class="[
|
||||||
style['button-tab'],
|
style['button-tab'],
|
||||||
{ [style['button-tab_dark']]: darkMode },
|
{ [style['button-tab_dark']]: darkMode },
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/fetch",
|
"name": "@sa/fetch",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/scripts",
|
"name": "@sa/scripts",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sa": "./bin.ts"
|
"sa": "./bin.ts"
|
||||||
},
|
},
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@soybeanjs/changelog": "0.3.23",
|
"@soybeanjs/changelog": "0.3.24",
|
||||||
"bumpp": "9.4.1",
|
"bumpp": "9.4.1",
|
||||||
"c12": "1.10.0",
|
"c12": "1.10.0",
|
||||||
"cac": "6.7.14",
|
"cac": "6.7.14",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/uno-preset",
|
"name": "@sa/uno-preset",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/utils",
|
"name": "@sa/utils",
|
||||||
"version": "1.1.1",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
2069
pnpm-lock.yaml
generated
2069
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -21,10 +21,10 @@ const columns = defineModel<NaiveUI.TableColumnCheck[]>('columns', {
|
|||||||
{{ $t('common.columnSetting') }}
|
{{ $t('common.columnSetting') }}
|
||||||
</NButton>
|
</NButton>
|
||||||
</template>
|
</template>
|
||||||
<VueDraggable v-model="columns">
|
<VueDraggable v-model="columns" :animation="150" filter=".none_draggable">
|
||||||
<div v-for="item in columns" :key="item.key" class="h-36px flex-y-center rd-4px hover:(bg-primary bg-opacity-20)">
|
<div v-for="item in columns" :key="item.key" class="h-36px flex-y-center rd-4px hover:(bg-primary bg-opacity-20)">
|
||||||
<icon-mdi-drag class="mr-8px cursor-move text-icon" />
|
<icon-mdi-drag class="mr-8px h-full cursor-move text-icon" />
|
||||||
<NCheckbox v-model:checked="item.checked">
|
<NCheckbox v-model:checked="item.checked" class="none_draggable flex-1">
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</NCheckbox>
|
</NCheckbox>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
|
||||||
import { createReusableTemplate } from '@vueuse/core';
|
|
||||||
import type { PopoverPlacement } from 'naive-ui';
|
import type { PopoverPlacement } from 'naive-ui';
|
||||||
|
import { twMerge } from 'tailwind-merge';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'ButtonIcon',
|
name: 'ButtonIcon',
|
||||||
@@ -21,60 +20,29 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
class: 'h-36px text-icon',
|
class: '',
|
||||||
icon: '',
|
icon: '',
|
||||||
tooltipContent: '',
|
tooltipContent: '',
|
||||||
tooltipPlacement: 'bottom',
|
tooltipPlacement: 'bottom',
|
||||||
zIndex: 98
|
zIndex: 98
|
||||||
});
|
});
|
||||||
|
|
||||||
interface ButtonProps {
|
const DEFAULT_CLASS = 'h-[36px] text-icon';
|
||||||
className: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [DefineButton, Button] = createReusableTemplate<ButtonProps>();
|
|
||||||
|
|
||||||
const cls = computed(() => {
|
|
||||||
let clsStr = props.class;
|
|
||||||
|
|
||||||
if (!clsStr.includes('h-')) {
|
|
||||||
clsStr += ' h-36px';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!clsStr.includes('text-')) {
|
|
||||||
clsStr += ' text-icon';
|
|
||||||
}
|
|
||||||
|
|
||||||
return clsStr;
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- define component start: Button -->
|
<NTooltip :placement="tooltipPlacement" :z-index="zIndex" :disabled="!tooltipContent">
|
||||||
<DefineButton v-slot="{ $slots, className }">
|
|
||||||
<NButton quaternary :class="className">
|
|
||||||
<div class="flex-center gap-8px">
|
|
||||||
<component :is="$slots.default" />
|
|
||||||
</div>
|
|
||||||
</NButton>
|
|
||||||
</DefineButton>
|
|
||||||
<!-- define component end: Button -->
|
|
||||||
|
|
||||||
<NTooltip v-if="tooltipContent" :placement="tooltipPlacement" :z-index="zIndex">
|
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<Button :class-name="cls" v-bind="$attrs">
|
<NButton quaternary :class="twMerge(DEFAULT_CLASS, props.class)" v-bind="$attrs">
|
||||||
<slot>
|
<div class="flex-center gap-8px">
|
||||||
<SvgIcon :icon="icon" />
|
<slot>
|
||||||
</slot>
|
<SvgIcon :icon="icon" />
|
||||||
</Button>
|
</slot>
|
||||||
|
</div>
|
||||||
|
</NButton>
|
||||||
</template>
|
</template>
|
||||||
{{ tooltipContent }}
|
{{ tooltipContent }}
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
<Button v-else :class-name="cls" v-bind="$attrs">
|
|
||||||
<slot>
|
|
||||||
<SvgIcon :icon="icon" />
|
|
||||||
</slot>
|
|
||||||
</Button>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@@ -3,6 +3,7 @@ import { computed } from 'vue';
|
|||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { useRouteStore } from '@/store/modules/route';
|
import { useRouteStore } from '@/store/modules/route';
|
||||||
|
import { useTabStore } from '@/store/modules/tab';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'GlobalContent'
|
name: 'GlobalContent'
|
||||||
@@ -20,6 +21,7 @@ withDefaults(defineProps<Props>(), {
|
|||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
|
const tabStore = useTabStore();
|
||||||
|
|
||||||
const transitionName = computed(() => (themeStore.page.animate ? themeStore.page.animateMode : ''));
|
const transitionName = computed(() => (themeStore.page.animate ? themeStore.page.animateMode : ''));
|
||||||
</script>
|
</script>
|
||||||
@@ -36,7 +38,7 @@ const transitionName = computed(() => (themeStore.page.animate ? themeStore.page
|
|||||||
<component
|
<component
|
||||||
:is="Component"
|
:is="Component"
|
||||||
v-if="appStore.reloadFlag"
|
v-if="appStore.reloadFlag"
|
||||||
:key="route.path"
|
:key="tabStore.getTabIdByRoute(route)"
|
||||||
:class="{ 'p-16px': showPadding }"
|
:class="{ 'p-16px': showPadding }"
|
||||||
class="flex-grow bg-layout transition-300"
|
class="flex-grow bg-layout transition-300"
|
||||||
/>
|
/>
|
||||||
|
@@ -47,7 +47,7 @@ const headerMenus = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DarkModeContainer class="h-full flex-y-center shadow-header">
|
<DarkModeContainer class="h-full flex-y-center px-12px shadow-header">
|
||||||
<GlobalLogo v-if="showLogo" class="h-full" :style="{ width: themeStore.sider.width + 'px' }" />
|
<GlobalLogo v-if="showLogo" class="h-full" :style="{ width: themeStore.sider.width + 'px' }" />
|
||||||
<HorizontalMenu v-if="showMenu" mode="horizontal" :menus="headerMenus" class="px-12px" />
|
<HorizontalMenu v-if="showMenu" mode="horizontal" :menus="headerMenus" class="px-12px" />
|
||||||
<div v-else class="h-full flex-y-center flex-1-hidden">
|
<div v-else class="h-full flex-y-center flex-1-hidden">
|
||||||
|
@@ -68,7 +68,7 @@ function handleClickMixMenu(menu: App.Global.Menu) {
|
|||||||
<component :is="icon" :class="[isMini ? 'text-icon-small' : 'text-icon-large']" />
|
<component :is="icon" :class="[isMini ? 'text-icon-small' : 'text-icon-large']" />
|
||||||
<p
|
<p
|
||||||
class="w-full ellipsis-text text-center text-12px transition-height-300"
|
class="w-full ellipsis-text text-center text-12px transition-height-300"
|
||||||
:class="[isMini ? 'h-0 pt-0' : 'h-24px pt-4px']"
|
:class="[isMini ? 'h-0 pt-0' : 'h-20px pt-4px']"
|
||||||
>
|
>
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</p>
|
</p>
|
||||||
|
@@ -55,8 +55,8 @@ function handleResetActiveMenu() {
|
|||||||
:inverted="siderInverted"
|
:inverted="siderInverted"
|
||||||
:style="{ width: showDrawer ? themeStore.sider.mixChildMenuWidth + 'px' : '0px' }"
|
:style="{ width: showDrawer ? themeStore.sider.mixChildMenuWidth + 'px' : '0px' }"
|
||||||
>
|
>
|
||||||
<header class="flex-y-center justify-between" :style="{ height: themeStore.header.height + 'px' }">
|
<header class="flex-y-center justify-between px-12px" :style="{ height: themeStore.header.height + 'px' }">
|
||||||
<h2 class="pl-8px text-16px text-primary font-bold">{{ $t('system.title') }}</h2>
|
<h2 class="text-16px text-primary font-bold">{{ $t('system.title') }}</h2>
|
||||||
<PinToggler
|
<PinToggler
|
||||||
:pin="appStore.mixSiderFixed"
|
:pin="appStore.mixSiderFixed"
|
||||||
:class="{ 'text-white:88 !hover:text-white': siderInverted }"
|
:class="{ 'text-white:88 !hover:text-white': siderInverted }"
|
||||||
|
@@ -34,9 +34,9 @@ function search() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
visible.value = false;
|
|
||||||
// handle with setTimeout to prevent user from seeing some operations
|
// handle with setTimeout to prevent user from seeing some operations
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
visible.value = false;
|
||||||
resultOptions.value = [];
|
resultOptions.value = [];
|
||||||
keyword.value = '';
|
keyword.value = '';
|
||||||
}, 200);
|
}, 200);
|
||||||
@@ -112,7 +112,7 @@ registerShortcut();
|
|||||||
|
|
||||||
<div class="mt-20px">
|
<div class="mt-20px">
|
||||||
<NEmpty v-if="resultOptions.length === 0" :description="$t('common.noData')" />
|
<NEmpty v-if="resultOptions.length === 0" :description="$t('common.noData')" />
|
||||||
<SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter.prevent="handleEnter" />
|
<SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter="handleEnter" />
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<SearchFooter v-if="!isMobile" />
|
<SearchFooter v-if="!isMobile" />
|
||||||
|
@@ -141,6 +141,10 @@ function init() {
|
|||||||
tabStore.initTabStore(route);
|
tabStore.initTabStore(route);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeFocus() {
|
||||||
|
(document.activeElement as HTMLElement)?.blur();
|
||||||
|
}
|
||||||
|
|
||||||
// watch
|
// watch
|
||||||
watch(
|
watch(
|
||||||
() => route.fullPath,
|
() => route.fullPath,
|
||||||
@@ -162,7 +166,11 @@ init();
|
|||||||
<template>
|
<template>
|
||||||
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
|
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
|
||||||
<div ref="bsWrapper" class="h-full flex-1-hidden">
|
<div ref="bsWrapper" class="h-full flex-1-hidden">
|
||||||
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: appStore.isMobile }">
|
<BetterScroll
|
||||||
|
ref="bsScroll"
|
||||||
|
:options="{ scrollX: true, scrollY: false, click: appStore.isMobile }"
|
||||||
|
@click="removeFocus"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
ref="tabRef"
|
ref="tabRef"
|
||||||
class="h-full flex pr-18px"
|
class="h-full flex pr-18px"
|
||||||
|
@@ -46,7 +46,7 @@ export function createRouteGuard(router: Router) {
|
|||||||
next({ name: rootRoute });
|
next({ name: rootRoute });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// if is is constant route, then it is allowed to access directly
|
// if it is constant route, then it is allowed to access directly
|
||||||
{
|
{
|
||||||
condition: !needLogin,
|
condition: !needLogin,
|
||||||
callback: () => {
|
callback: () => {
|
||||||
|
@@ -64,9 +64,10 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt
|
|||||||
|
|
||||||
window.$dialog?.error({
|
window.$dialog?.error({
|
||||||
title: 'Error',
|
title: 'Error',
|
||||||
content: response.data.code,
|
content: response.data.msg,
|
||||||
positiveText: $t('common.confirm'),
|
positiveText: $t('common.confirm'),
|
||||||
maskClosable: false,
|
maskClosable: false,
|
||||||
|
closeOnEsc: false,
|
||||||
onPositiveClick() {
|
onPositiveClick() {
|
||||||
logoutAndCleanup();
|
logoutAndCleanup();
|
||||||
},
|
},
|
||||||
|
@@ -123,7 +123,7 @@ export const useAppStore = defineStore(SetupStoreId.App, () => {
|
|||||||
// update tabs by locale
|
// update tabs by locale
|
||||||
tabStore.updateTabsByLocale();
|
tabStore.updateTabsByLocale();
|
||||||
|
|
||||||
// sey dayjs locale
|
// set dayjs locale
|
||||||
setDayjsLocale(locale.value);
|
setDayjsLocale(locale.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -97,13 +97,19 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
/** Cache routes */
|
/** Cache routes */
|
||||||
const cacheRoutes = ref<RouteKey[]>([]);
|
const cacheRoutes = ref<RouteKey[]>([]);
|
||||||
|
|
||||||
|
/** All cache routes */
|
||||||
|
const allCacheRoutes = shallowRef<RouteKey[]>([]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get cache routes
|
* Get cache routes
|
||||||
*
|
*
|
||||||
* @param routes Vue routes
|
* @param routes Vue routes
|
||||||
*/
|
*/
|
||||||
function getCacheRoutes(routes: RouteRecordRaw[]) {
|
function getCacheRoutes(routes: RouteRecordRaw[]) {
|
||||||
cacheRoutes.value = getCacheRouteNames(routes);
|
const alls = getCacheRouteNames(routes);
|
||||||
|
|
||||||
|
cacheRoutes.value = alls;
|
||||||
|
allCacheRoutes.value = [...alls];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,12 +136,23 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
cacheRoutes.value.splice(index, 1);
|
cacheRoutes.value.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is cached route
|
||||||
|
*
|
||||||
|
* @param routeKey
|
||||||
|
*/
|
||||||
|
function isCachedRoute(routeKey: RouteKey) {
|
||||||
|
return allCacheRoutes.value.includes(routeKey);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Re cache routes by route key
|
* Re cache routes by route key
|
||||||
*
|
*
|
||||||
* @param routeKey
|
* @param routeKey
|
||||||
*/
|
*/
|
||||||
async function reCacheRoutesByKey(routeKey: RouteKey) {
|
async function reCacheRoutesByKey(routeKey: RouteKey) {
|
||||||
|
if (!isCachedRoute(routeKey)) return;
|
||||||
|
|
||||||
removeCacheRoutes(routeKey);
|
removeCacheRoutes(routeKey);
|
||||||
|
|
||||||
await appStore.reloadPage();
|
await appStore.reloadPage();
|
||||||
|
@@ -17,6 +17,7 @@ import {
|
|||||||
getDefaultHomeTab,
|
getDefaultHomeTab,
|
||||||
getFixedTabIds,
|
getFixedTabIds,
|
||||||
getTabByRoute,
|
getTabByRoute,
|
||||||
|
getTabIdByRoute,
|
||||||
isTabInTabs,
|
isTabInTabs,
|
||||||
updateTabByI18nKey,
|
updateTabByI18nKey,
|
||||||
updateTabsByI18nKey
|
updateTabsByI18nKey
|
||||||
@@ -288,6 +289,7 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
|||||||
setTabLabel,
|
setTabLabel,
|
||||||
resetTabLabel,
|
resetTabLabel,
|
||||||
isTabRetain,
|
isTabRetain,
|
||||||
updateTabsByLocale
|
updateTabsByLocale,
|
||||||
|
getTabIdByRoute
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
7
src/typings/router.d.ts
vendored
7
src/typings/router.d.ts
vendored
@@ -27,7 +27,7 @@ declare module 'vue-router' {
|
|||||||
/**
|
/**
|
||||||
* Is constant route
|
* Is constant route
|
||||||
*
|
*
|
||||||
* Does not need to login, and the route is defined in the front-end
|
* when it is set to true, there will be no login verification and no permission verification to access the route
|
||||||
*/
|
*/
|
||||||
constant?: boolean | null;
|
constant?: boolean | null;
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +57,10 @@ declare module 'vue-router' {
|
|||||||
* the route is "user_detail", if it is set to "user_list", the menu "user_list" will be activated
|
* the route is "user_detail", if it is set to "user_list", the menu "user_list" will be activated
|
||||||
*/
|
*/
|
||||||
activeMenu?: import('@elegant-router/types').RouteKey | null;
|
activeMenu?: import('@elegant-router/types').RouteKey | null;
|
||||||
/** By default, the same route path will use one tab, if set to true, it will use multiple tabs */
|
/**
|
||||||
|
* By default, the same route path will use one tab, even with different query, if set true, the route with
|
||||||
|
* different query will use different tabs
|
||||||
|
*/
|
||||||
multiTab?: boolean | null;
|
multiTab?: boolean | null;
|
||||||
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
|
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
|
||||||
fixedIndexInTab?: number | null;
|
fixedIndexInTab?: number | null;
|
||||||
|
@@ -6,7 +6,7 @@ import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
|||||||
import { useCaptcha } from '@/hooks/business/captcha';
|
import { useCaptcha } from '@/hooks/business/captcha';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'CodeLogin'
|
name: 'Register'
|
||||||
});
|
});
|
||||||
|
|
||||||
const { toggleLoginModule } = useRouterPush();
|
const { toggleLoginModule } = useRouterPush();
|
||||||
|
@@ -374,7 +374,6 @@ watch(
|
|||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.hideInMenu')" path="hideInMenu">
|
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.hideInMenu')" path="hideInMenu">
|
||||||
<NRadioGroup v-model:value="model.hideInMenu">
|
<NRadioGroup v-model:value="model.hideInMenu">
|
||||||
<!-- eslint-disable-next-line vue/prefer-true-attribute-shorthand -->
|
|
||||||
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
||||||
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
||||||
</NRadioGroup>
|
</NRadioGroup>
|
||||||
|
Reference in New Issue
Block a user