Compare commits

...

646 Commits

Author SHA1 Message Date
Soybean
fd087f59fa fix(packages): axios: fix json response. fixed #815 2025-09-17 17:03:30 +08:00
Soybean
9fa951aa06 chore(deps): update deps 2025-09-17 14:23:06 +08:00
Soybean
12b25e0d58 fix(types): fix proxy types 2025-08-28 00:26:29 +08:00
Soybean
e33f944a74 chore(deps): update deps 2025-08-28 00:26:12 +08:00
Azir-11
8d7f91dccf chore(other): update the ESLint validation configuration to support more file types. 2025-08-13 10:10:10 +08:00
Soybean
33ade53904 chore(readme): remove DartNode sponsorship badge from README files 2025-08-11 10:46:15 +08:00
Soybean
923eb98a5c fix(readme): update GitHub stars and forks links for gitee 2025-07-20 01:12:19 +08:00
Soybean
e89b86ce56 chore(deps): update deps 2025-07-14 00:44:44 +08:00
Azir
03dd64c543 chore(packages): update Vite version to 7 in package.json and documentation.
(cherry picked from commit ef806edd9d0c48ad8669863516d52e2eb8870d6f)
2025-07-03 22:08:50 +08:00
Soybean
aeb6369005 chore(deps): update deps 2025-07-03 22:06:30 +08:00
Soybean
133196f337 chore(vscode): remove unused vue.server.hybridMode setting from .vscode/settings.json 2025-07-03 22:02:30 +08:00
xiaobao
41191d54fb
fix(projects): Fix i18n-ally not working when setting moduleResolution to bundler. fixed #780 2025-07-03 21:59:18 +08:00
Soybean
5cb1cebd88 chore(deps): update deps 2025-06-27 18:17:05 +08:00
Junior25306
a5c4b4e3b7 chore(deps): update NodeJS and pnpm version requirements in package.json and documentation 2025-06-25 18:12:25 +08:00
Soybean
87a675bf62 chore(projects): release v1.3.15 2025-06-24 21:40:19 +08:00
Soybean
4d42dcbea8 docs(readme): add warning about upcoming V2 version and link to plan list 2025-06-24 21:39:21 +08:00
Soybean
276d836c87 refactor(iframe-page): remove unused lifecycle hooks and clean up script setup 2025-06-24 21:31:57 +08:00
Soybean
7d84062e2c fix(app): replace console.error with window.console.error for consistency 2025-06-24 21:31:17 +08:00
wenyuan
afd604212b fix(projects): ensure proper text color when themes are inverted 2025-06-24 21:20:24 +08:00
wenyuan
fcb89883fa optimize(components): optimize spacing for lang-switch dropdown options 2025-06-24 21:20:20 +08:00
Soybean
dc674ce870 chore(deps): update deps 2025-06-24 21:11:08 +08:00
Soybean
dbd995c12c chore(projects): update deps & fix moduleResolution 2025-06-24 19:29:12 +08:00
Azir
7b2e510a2f docs(other): update docs with video tutorial link. 2025-06-24 10:17:50 +08:00
chenziwen
da149e5bbd fix(types): The environment variable VITE_ICON_LOCAL_PREFIX has the wrong type. 2025-06-14 22:01:01 +08:00
wenyuan
7c3dac4212 feat(projects): add configurable user name watermark option 2025-06-10 19:05:08 +08:00
Soybean
39b89a1234 chore(projects): release v1.3.14 2025-06-09 22:40:03 +08:00
Soybean
c57f88aad2 fix(auth): remove redundant authStore declaration in resetStore function 2025-06-09 22:34:57 +08:00
Soybean
3e4e17abd8 chore(deps): update deps 2025-06-09 22:10:30 +08:00
wenyuan
e6044d0fc7 optimize(projects): optimize tab deletion logic. closed #755 2025-06-09 14:19:44 +08:00
Soybean
2ed0b6484c feat(docs): add DartNode sponsorship badge to README files 2025-06-06 22:50:17 +08:00
恕瑞玛的皇帝
222187d3b0 optimize(hooks): update detection function to cover the exceptions that occur when the request fails. 2025-05-31 13:41:02 +08:00
t8y2
75455b006c feat(theme): global search button toggle
- 在主题设置中添加全局搜索按钮的显示控制选项
- 更新多语言文件,添加全局搜索按钮显示控制的翻译
- 修改全局头部组件,根据主题设置决定是否显示全局搜索按钮
- 在主题抽屉中添加全局搜索按钮显示控制的开关
2025-05-31 13:40:42 +08:00
Azir
dfb647a82c fix(hooks): refactor useCountDown hook for improved countdown logic and clarity. 2025-05-26 15:11:01 +08:00
Azir
7fb5c72f7e fix(projects): tab closure did not remove cache correctly. 2025-05-26 15:11:01 +08:00
Soybean
41b5f49341 chore(deps): update deps 2025-05-11 22:03:37 +08:00
Soybean
f35c250a89 docs(projects): add gitcode link 2025-05-11 22:01:47 +08:00
青菜白玉汤
1ff4d82d19
feat(projects): clear tabs cache when switching users. (#744) 2025-04-30 14:46:32 +08:00
青菜白玉汤
c3abc3df09
ci(hooks): remove lint-staged in git hook. (#743) close #724 2025-04-28 19:17:43 +08:00
WgoW
a013ea2c46
docs(README): Add supporting ecosystem tools to the open-source repository (#740)
Co-authored-by: a <a@gmail.com>
2025-04-23 22:23:13 +08:00
tu6ge
61244f0f2a
chore(deps): add vscode recommend plugin (#739) close #738 2025-04-23 21:34:48 +08:00
青菜白玉汤
85e40b1943
fix(hooks): fixed the issue where loading was not properly closed in some cases. (#737) 2025-04-23 21:34:18 +08:00
WgoW
123d2c9074
feat(types): enhance Option type to support customizable label types (#735)
Co-authored-by: a <a@gmail.com>
2025-04-23 21:34:06 +08:00
Soybean
05dc11e258 feat(docs): add GitCode star badge to README files 2025-04-18 11:25:38 +08:00
青菜白玉汤
8527aa80b8
feat(utils): support quick generation of code templates. (#733) 2025-04-14 08:42:10 +08:00
青菜白玉汤
804860994e
docs(deps): update the Vite version of the project description. (#732) 2025-04-12 15:27:27 +08:00
青菜白玉汤
29698bef69
feat(projects): support vite devtools specify the editor by launchEditor option. (#730) 2025-04-04 12:00:52 +08:00
青菜白玉汤
4e1b65b6c4
optimize(hooks): remove obsolete disabling cache. (#729) 2025-04-01 11:36:27 +08:00
XiaTianYa
3cbaf4f4bf
docs(projects): update README (#726) 2025-03-21 12:40:38 +08:00
Soybean
fa305146bc chore(projects): release v1.3.13 2025-03-19 22:40:17 +08:00
Soybean
2e8cb35cfe chore(deps): update deps 2025-03-19 22:39:55 +08:00
C_7
a7c59adabc
fix(projects): fix active tab switch issue after removal (#723) 2025-03-19 22:37:35 +08:00
一寸灰
a6ecd3e083
build(deps): Restrict the minimum Node.js version. (#720) 2025-03-18 05:31:20 +08:00
青菜白玉汤
3febb65d70
docs(projects): update README (#718) 2025-03-14 14:59:55 +08:00
Soybean
5d8b782d37 chore(deps): update deps 2025-03-14 10:29:54 +08:00
Soybean
8b12ef9fd8 chore(projects): update vscode settings and launch 2025-03-14 10:26:12 +08:00
Soybean
a6a47247ff chore(projects): release v1.3.12 2025-03-12 23:09:57 +08:00
Soybean
4cc1487f46 feat(projects): support proxy log in terminal 2025-03-12 23:08:24 +08:00
Soybean
b8112613ea chore(deps): update deps 2025-03-12 22:24:59 +08:00
Soybean
a1a5c74c74
feat(projects): feat(projects): TableColumnCheck title support VNode (#716) 2025-03-11 11:30:02 +08:00
青菜白玉汤
be6080ba0f
feat(utils): support replaceTab. (#713) 2025-03-10 18:25:36 +08:00
无良芳
3e0076d466
chore(projects): update unocss preset (#712) 2025-03-06 18:17:44 +08:00
Azir
52c336d7e0 chore(deps): update deps 2025-03-05 18:15:04 +08:00
Soybean
a03becdaed feat(projects): tab support touch event 2025-02-19 10:50:12 +08:00
Soybean
15163d7011 Revert "fix(projects): fix multiple calls to the login API when clicking quickly. fixed #697 (#698)"
This reverts commit 86da767e24.
2025-02-11 23:57:16 +08:00
Soybean
132e101243 chore(deps): update deps 2025-02-11 23:49:24 +08:00
青菜白玉汤
9b9455d945
feat(projects): support loading page dark mode adaptation. (#702) 2025-01-26 22:32:05 +08:00
李鹏坤-执手对影成双
86da767e24
fix(projects): fix multiple calls to the login API when clicking quickly. fixed #697 (#698) 2025-01-25 18:38:49 +08:00
Azir
54e7d6d00a fix(projects): hidden multi-language button in login page. fix #694 2025-01-24 18:34:07 +08:00
Soybean
5cf3236475 chore(projects): release v1.3.11 2025-01-19 22:18:44 +08:00
Soybean
6489ec46ae optimize(projects): optimize code 2025-01-19 22:13:19 +08:00
Soybean
ac86247876 fix(projects): fix update notifications. fixed #691, fixed #692 2025-01-19 22:03:02 +08:00
Soybean
c9433e1710 chore(deps): update deps 2025-01-19 21:26:28 +08:00
Soybean
60dd22624b fix(projects): fix login success notification. fixed #688 2024-12-26 11:07:48 +08:00
青菜白玉汤
56760245d4
fix(hooks): The total number before assigning a value to the table is incorrect. (#687) 2024-12-25 17:51:44 +08:00
青菜白玉汤
d7aebb7dfa
feat(projects): multi language buttons support hiding. (#683) 2024-12-16 23:39:19 +08:00
Soybean
214341ee0b docs(projects): update README 2024-12-16 18:35:12 +08:00
Soybean
2849463bd6 chore(projects): release v1.3.10 2024-12-16 16:39:21 +08:00
Soybean
101b6f9000 optimize(projects): use defu to fill added theme config 2024-12-16 16:35:47 +08:00
Soybean
3e0eb72025 chore(projects): update deps & fix vite config 2024-12-16 16:16:08 +08:00
Soybean
9f4fb8c3fb fix(projects): check if init userInfo when initAuthRoute. fixed #680 2024-12-11 12:38:50 +08:00
Soybean
0dfcf18b64 optimize(projects): optimize router guard 2024-12-11 12:11:15 +08:00
Soybean
ba38119efd feat(projects): support show tab when not loggedIn 2024-12-10 16:54:15 +08:00
Soybean
ab9858c7d0 fix(projects): fix route guard hook onRouteSwitchWhenLoggedIn. fixed #680 2024-12-10 14:58:32 +08:00
一寸灰
5c6ab0b595
docs(projects): 📝 add element-plus version link (#679) 2024-12-10 14:47:32 +08:00
wzc520pyfm
b93c2036ac
chore: rename env.d.ts to vite-env.d.ts (#675) 2024-12-02 07:37:12 +08:00
Soybean
af4177e70b fix(deps): reduced eslint version to 9.14.0 2024-11-17 22:37:30 +08:00
Soybean
4eca4e3a7e chore(projects): release v1.3.9 2024-11-17 22:30:00 +08:00
Soybean
0c809de644 chore(deps): update deps 2024-11-17 22:29:04 +08:00
Soybean
a53eb10cdf feat(projects): app version notification plugin support sub deploy path. close #668 2024-11-17 22:27:00 +08:00
青菜白玉汤
d088f81345
feat(projects): support scheduled detection and update system. close #657 (#669) 2024-11-17 22:25:04 +08:00
Soybean
17d7e52216 chore(projects): add desc for base url of app 2024-11-15 22:45:28 +08:00
Soybean
91de4a8ef7 chore(deps): update deps 2024-11-15 12:41:33 +08:00
Soybean
09144dfe93
refactor(projects): refactor router guard. fix #655 (#667) 2024-11-15 12:39:57 +08:00
Soybean
9ad5d7170a optimize(projects): optimize code 2024-10-28 19:37:23 +08:00
Soybean
9d28b31c24 docs(projects): set the Chinese version of README as default 2024-10-28 10:45:48 +08:00
Soybean
0c1741096b chore(projects): release v1.3.8 2024-10-25 01:14:09 +08:00
Soybean
71e6307db2 chore(projects): update deps & fix sass usage 2024-10-25 01:12:40 +08:00
Soybean
b667eab76a refactor(projects)!: refactor route cache & support reset route cache strategy 2024-10-25 00:58:29 +08:00
Scott Hu
4b3ac11bd5 feat(packages): optimistic subpackage @sa/alova (#646) 2024-10-17 17:22:58 +08:00
Soybean
24bb6d95cb chore(projects): update vscode extensions 2024-10-16 11:58:49 +08:00
Soybean
4726498faa fix(utils): fix isPC. fixed #644 2024-10-16 11:56:55 +08:00
青菜白玉汤
75cbfbbfe6
style(projects): reduce ambiguity in theme configuration instructions. 2024-10-15 19:55:18 +08:00
Soybean
8dcda38560 chore(deps): update deps 2024-10-09 22:58:33 +08:00
Scott Hu
2072f5850e feat(packages): add subpackage @sa/alova (#640)
* feat(packages): add @sa/alova

* typo(packages): add types & update code

* feat: add subpackage @sa/alova

---------

Co-authored-by: allenli178 <allenli178@qq.com>
Co-authored-by: 子殊 <yuyan@zishudeMac-mini.local>
2024-10-09 22:47:44 +08:00
青菜白玉汤
cfaab8527a
feat(projects): login supports accessible operation. (#637) 2024-10-03 16:38:43 +08:00
zxin
83ba798781
chore(types): remove type declaration for document.startViewTransition (TypeScript 5.6 includes it) (#633) 2024-09-25 18:44:30 +08:00
Soybean
9669ca2041 chore(projects): release v1.3.7 2024-09-21 08:41:03 +08:00
Soybean
baefdfd8c4 chore(deps): update deps 2024-09-21 08:38:03 +08:00
Soybean
24e9e57a31 chore(projects)!: update scss config 2024-09-21 08:36:07 +08:00
Soybean
4da588c6ba refactor(packages): @sa/materials: remove tab close shortcut by mouse 2024-09-21 08:36:04 +08:00
Soybean
3e72c3b45a fix(projects): fix global-tab click conflict with contextmenu 2024-09-21 08:35:59 +08:00
Soybean
ce66bca1a1 chore(projects): release v1.3.6 2024-09-20 07:40:18 +08:00
Soybean
f35627e169 chore(deps): update deps 2024-09-20 07:38:54 +08:00
青菜白玉汤
0ac95bdcf5
fix(projects): when the roles filter submenu is empty, the parent menu is not excluded. fixed #621. (#626) 2024-09-18 10:58:13 +08:00
Soybean
04d056479f fix(projects): fix click global-tab in iPad. fixed #624 2024-09-14 11:55:59 +08:00
yanbowen
60bbd2d145
optimize(projects): remove defineModel setting,enabled by default (#620) 2024-09-11 11:47:51 +08:00
Soybean
38eeb678f3 optimize(projects): optimize code 2024-09-09 14:27:09 +08:00
Soybean
207d6eb6ec chore(deps): update deps 2024-09-08 18:36:26 +08:00
Soybean
6561f0b5f9 optimize(projects): optimize code 2024-09-08 18:35:13 +08:00
Soybean
20f8ed311c fix(components): fix VerticalMixMenu name 2024-09-08 16:55:13 +08:00
Soybean
5baf19d204 docs(projects): update CHANGELOG 2024-09-07 11:44:55 +08:00
Soybean
75997c1655 chore(projects): release v1.3.5 2024-09-07 11:32:37 +08:00
Soybean
c4e16102cb feat(packages): @sa/axios: add response to flatRequest when success 2024-09-07 11:31:47 +08:00
Soybean
be8556cd2b feat(projects): add app error handler. close #587 2024-09-07 11:16:58 +08:00
Soybean
27b5222cfb fix(projects): fix refresh token when meet multi requests. fixed #581 2024-09-07 11:11:18 +08:00
Soybean
79b2a28b5a fix(projects): fix breadcrumb when activeMenu is parent menu. fixed #589 2024-09-07 09:48:53 +08:00
Soybean
531bfaf1b9 optimize(projects): optimize menu selectedKey 2024-09-07 07:23:38 +08:00
Soybean
c3f1f69833 fix(projects): fix vertical-mix-menu when sider collapse. fixed #608 2024-09-07 07:12:35 +08:00
Soybean
a44ea624f1 chore(deps): update deps 2024-09-07 07:02:40 +08:00
Ohh
7cb43fc3c2
fix(deps): move json5 from devDependencies to dependencies to support production usage (#618) 2024-09-05 14:53:57 +08:00
青菜白玉汤
4c9f4e09b1
feat(projects): does the configuration support automatic updates. close#612 (#617) 2024-09-03 16:52:38 +08:00
Azir
9c012c7d13 docs(projects): update the location of important information in the document 2024-08-29 13:26:00 +08:00
青菜白玉汤
878d9c395c
feat(projects): Add more commit types according to Apache specifications (#610) 2024-08-27 15:19:42 +08:00
Soybean
3830ec7a69 fix(projects): fix login redirect 2024-08-23 10:50:21 +08:00
青菜白玉汤
ef6cf93d96
fix(projects): avoid retrieving cached HTML (#605) 2024-08-21 18:25:33 +08:00
Soybean
7fa55905fc chore(deps): update deps 2024-08-19 21:37:23 +08:00
PZ
2fa400b113
feat(projects): README.zh_CN.md 添加合作推广 (#601) 2024-08-15 17:55:40 +08:00
Soybean
73e917ad59 docs(projects): update README 2024-08-15 16:56:39 +08:00
Soybean
e9a2ee4a23 docs(projects): update README 2024-08-14 18:55:13 +08:00
Soybean
a1c14a1570 chore(deps): update deps 2024-08-14 10:29:13 +08:00
Soybean
b16a96323a chore(projects): use json5 resolve env VITE_OTHER_SERVICE_BASE_URL & fix proxy enable 2024-08-14 10:25:30 +08:00
青菜白玉汤
26c93dff9a
fix(types): fix the type of TableApiFn (#599) 2024-08-14 09:28:22 +08:00
青菜白玉汤
5094f0eea8
style(projects): rename script czh to commit:zh (#597) 2024-08-13 16:37:55 +08:00
Ohh
a8f923eb38
docs(projects): update README (#594) 2024-08-10 17:30:06 +08:00
Soybean
e6aa25e9f8 chore(projects): release v1.3.4 2024-08-01 16:02:56 +08:00
Soybean
968370b1aa chore(projects): update deps & fix vue-router type 2024-08-01 02:18:22 +08:00
Soybean
cb1d44525d optimize(projects): optimize code 2024-07-31 23:11:50 +08:00
Soybean
939c512f02 refactor(projects)!: don't reset active menu of vertical-mix layout when it is mixSiderFixed 2024-07-31 23:11:16 +08:00
Soybean
3f23993a83 chore(projects): release v1.3.3 2024-07-30 18:03:26 +08:00
Soybean
ebc838c3e0 docs(projects): update CHANGELOG 2024-07-30 18:03:06 +08:00
Soybean
5646a50ddf fix(projects): fix watermark settings 2024-07-30 17:53:17 +08:00
Soybean
217a3bb259 chore(projects): release v1.3.2 2024-07-30 17:18:16 +08:00
Soybean
d37591dd7a docs(projects): update CHANGELOG 2024-07-30 17:17:54 +08:00
Soybean
cf67d55cbf optimize(projects): optimize response code comparison 2024-07-30 15:12:45 +08:00
Soybean
98b75c22c3 optimize(projects): remove home NAlert closable 2024-07-30 14:57:53 +08:00
Soybean
993e9caf79 chore(deps): update deps 2024-07-30 14:55:45 +08:00
Soybean
f26d0a61eb optimize(projects): add type WatermarkProps 2024-07-30 14:41:30 +08:00
Azir
eed617f9eb optimize(types): remove useless types. 2024-07-30 09:33:35 +08:00
paynezhuang
ea8aa6c4e6
feat(projects): add full screen watermark. close#571 (#573) 2024-07-29 23:04:26 +08:00
青菜白玉汤
4dde4c22b1
feat(projects): add color fading mode.close #567 (#569) 2024-07-28 23:00:22 +08:00
Soybean
59f07d8ac4 fix(projects): fix vertical-mix menu selected 2024-07-23 15:52:01 +08:00
Soybean
e8378318c6 chore(projects): release v1.3.1 2024-07-22 19:04:20 +08:00
Soybean
840273474f fix(projects): fix vertical-menu will not render when the layout is from mobile 2024-07-22 19:03:01 +08:00
Soybean
4e55b0e9bd fix(projects): fix HorizontalMixMenu inverted. fixed #563 2024-07-22 19:02:56 +08:00
Azir
5377002932 style(other): modify the Chinese name of the grayscale mode 2024-07-22 14:39:04 +08:00
青菜白玉汤
c469512bd4
fix(projects): fix the issue of abnormal width of the sidebar in the top menu mix and reverse mode (#562) 2024-07-22 11:39:19 +08:00
Soybean
613c836e0f docs(projects): update CHANGELOG 2024-07-22 00:28:40 +08:00
Soybean
f73f70c51b chore(projects): release v1.3.0 2024-07-22 00:26:38 +08:00
Soybean
a0b76daeff docs(projects): update CHANGELOG 2024-07-22 00:26:01 +08:00
Soybean
f6bd6b8603 chore(deps): update deps 2024-07-22 00:21:58 +08:00
Soybean
087e532613 refactor(projects)!: refactor global menu & support reversed-horizontal-mix-menu. close #365 2024-07-22 00:19:12 +08:00
Soybean
00f41dd25e refactor(projects): change css vars mount to root 2024-07-20 04:05:24 +08:00
Soybean
1d1b148c8f refactor(projects): combine theme tokens and theme settings. close #379 2024-07-20 04:00:32 +08:00
Soybean
958d0baf3f feat(packages): @sa/scripts: add ignore pattern list for command gitCommitVerify. close #504 2024-07-20 03:17:23 +08:00
Soybean
0206969e98 chore(projects): add script czh 2024-07-20 03:07:46 +08:00
Soybean
527fd79df2 feat(packages): @sa/axios: replace CancelTokenSource by AbortController. close #530, close #532 2024-07-20 03:04:23 +08:00
142vip.cn
06971f3935 feat(packages): @sa/scripts: command gitCommit support chinese (#548) 2024-07-20 02:45:31 +08:00
青菜白玉汤
f4eeb2ed63 fix(hooks): prevent program freezing when pagesize returns 0 (#545) 2024-07-20 02:45:25 +08:00
青菜白玉汤
793b16e9ba feat(projects): make branch main tiny & modify request retry times to 0 2024-07-20 02:44:32 +08:00
Soybean
cf9fc7d31f chore(projects): release v1.2.8 2024-07-20 02:27:55 +08:00
Soybean
58fc09623c docs(projects): update CHANGELOG 2024-07-20 02:27:35 +08:00
Soybean
276ea7fa2f fix(types): fix data type of useHookTable 2024-07-20 02:23:25 +08:00
Soybean
96c1044ffb fix(packages): @sa/hooks: fix searchParams of useHookTable. fixed #552 2024-07-20 02:18:58 +08:00
Soybean
a91335d74b refactor(projects): replace cloneDeep of lodash-es with klona 2024-07-20 02:14:20 +08:00
dodu2014
3e2a993db8 fix(types): Fixed the reference type error (#551) 2024-07-20 02:00:59 +08:00
Soybean
cf0192ad71 chore(deps): update deps 2024-07-20 02:00:21 +08:00
Soybean
a454b620f1 chore(projects): release v1.2.7 2024-07-12 09:27:51 +08:00
Soybean
752ec1e9e7 chore(deps): update deps 2024-07-12 00:46:56 +08:00
wynn-w
e035eab223
optimize(projects): supports custom menu icon sizes (#534) 2024-07-09 16:59:03 +08:00
Soybean
be13ca274b chore(deps): update deps 2024-07-08 11:33:56 +08:00
Soybean
72ede8bf9c chore(deps): update deps 2024-06-23 23:15:26 +08:00
paynezhuang
0d20e4c915
chore(projects): Fix deprecated configuration config (#524) 2024-06-23 15:26:00 +08:00
Soybean
c791adc6bc chore(projects): release v1.2.6 2024-06-21 10:14:05 +08:00
Soybean
693f704690 optimize(projects): optimize getRouteQueryOfLoginRoute 2024-06-21 10:07:44 +08:00
Soybean
49f60b2d50 fix(projects): fix login redirect to routeHome when routeHome of dynamic route is not same as static route. fixed #511 2024-06-20 19:51:55 +08:00
Soybean
425c69acc2 fix(projects): add getDataByPage for useTable. fixed #499 2024-06-20 19:27:39 +08:00
Soybean
f7de3fd0f1 fix(projects): request modal title use i18n. fixed #507 2024-06-20 19:15:46 +08:00
Soybean
c7f6f2a537 chore(deps): update deps 2024-06-20 19:11:40 +08:00
Soybean
531432d5ff chore(deps): update deps. close #510 2024-06-18 22:01:47 +08:00
Soybean
ff1d50461f ci(projects): update github issues template 2024-06-17 15:21:17 +08:00
Soybean
b5027c8f3e ci(projects): add github issues template 2024-06-17 15:10:24 +08:00
Soybean
1e67ae8c49 docs(projects): update README 2024-06-17 11:38:37 +08:00
Soybean
5c67d0650e docs(projects): update CHANGELOG 2024-06-15 01:12:35 +08:00
Soybean
af735e87b8 chore(projects): release v1.2.5 2024-06-15 01:11:55 +08:00
Soybean
b336841567 docs(projects): update CHANGELOG 2024-06-15 01:11:28 +08:00
Soybean
b094d6882b chore(deps): update deps 2024-06-15 01:03:23 +08:00
Soybean
b94baa18c1 optimize(projects): optimize code 2024-06-15 00:49:24 +08:00
青菜白玉汤
3eeace94dd
fix(projects): Fix the issue of abnormal tab caching after logout. fixed #495 2024-06-15 00:39:53 +08:00
青菜白玉汤
ad2f24707a
optimize(utils): Reduce code indentation and improve readability (#496) 2024-06-14 18:24:56 +08:00
青菜白玉汤
cd9d58d4de
optimize(types): Enhance compatibility of global types (#494) 2024-06-14 18:11:01 +08:00
CHENZL
2198b982f0
perf(project): Initializing the static routing function does not require asynchronization (#493) 2024-06-14 11:47:16 +08:00
Soybean
376e2f7d84 chore(projects): release v1.2.4 2024-06-14 00:04:43 +08:00
Soybean
069fa8a817 optimize(projects): get buildTime with timezone 'Asia/Shanghai' 2024-06-14 00:00:30 +08:00
Soybean
b5a723cb5f optimize(projects): optimize setupAppVersionNotification 2024-06-13 23:44:41 +08:00
Soybean
79e85bc6b5 chore(projects): release v1.2.3 2024-06-13 23:28:17 +08:00
Soybean
bf7183747b chore(deps): update deps 2024-06-13 23:25:45 +08:00
paynezhuang
aabb2a49c4
fix(projects): Fix secondary directory components is empty (#491) 2024-06-13 23:00:18 +08:00
Soybean
7026126a57 docs(projects): update README 2024-06-13 17:04:50 +08:00
KickCashew
c212565248
fix(projects): fix mobile browser theme issue by adding color-scheme meta tag to index.html (#488) 2024-06-13 14:13:23 +08:00
Soybean
813d8ce4c7 chore(deps): update deps 2024-06-12 21:47:15 +08:00
Azir
20a8127434 docs(projects): Fixed the hyperlink pointing error 2024-06-12 16:54:59 +08:00
Soybean
ec8cadd183 chore(projects): release v1.2.2 2024-06-12 11:09:42 +08:00
Soybean
4470cb4e8c fix(projects): fix menu-toggler hidden in mobile layout. fixed #483 2024-06-12 10:25:11 +08:00
Soybean
8f9a70505c docs(projects): update README 2024-06-12 10:16:16 +08:00
Soybean
9094b21cbb feat(projects): reset scroll position when tab change 2024-06-11 19:04:07 +08:00
Alue Gitman
6259287240
fix(projects): hide AppVersionNotification in DEV mode (#482) 2024-06-07 16:06:33 +08:00
Soybean
22004ff4dc chore(projects): release v1.2.1 2024-06-07 11:55:07 +08:00
Soybean
08827a42a3 chore(deps): update deps 2024-06-07 11:54:45 +08:00
Soybean
6a6eb9afd6 fix(projects): fix setupAppVersionNotification render 2024-06-07 11:54:38 +08:00
Soybean
ff51b72dac fix(projects): fix get user info when page reload 2024-06-07 11:54:06 +08:00
Soybean
fe06b8c499 docs(projects): update CHANGELOG 2024-06-06 23:33:16 +08:00
Soybean
4b63bbcf67 chore(projects): release v1.2.0 2024-06-06 23:31:43 +08:00
Soybean
5531a68641 feat(projects): get user info in router guard and remove in localStorage. close #459 2024-06-06 23:31:06 +08:00
Soybean
584cd54d6d feat(projects): support system new version update notification. close #420 2024-06-06 23:31:00 +08:00
Soybean
2bec899031 docs(projects): update CHANGELOG 2024-06-06 23:30:21 +08:00
Soybean
83862ba76e chore(projects): release v1.1.5 2024-06-06 23:26:15 +08:00
Soybean
060c0a91c7 chore(deps): update deps 2024-06-06 23:23:13 +08:00
Soybean
76649e2a08 chore(projects): update vscode settings: vue official 2024-06-06 19:17:27 +08:00
马铃薯头
ddf3823a55
fix(projects): fix register name, CodeLogin => Register (#478) 2024-06-06 15:57:58 +08:00
Soybean
e75fd73f34 chore(projects): release v1.1.4 2024-06-06 10:31:15 +08:00
Soybean
1f4647b995 chore(deps): update deps 2024-06-06 10:30:51 +08:00
Soybean
910dfca8bb chore(projects): update vscode settings 2024-06-06 10:27:03 +08:00
Soybean
ffb48b15bc optimize(projects): optimize RouteMeta remarks 2024-06-06 10:24:14 +08:00
Soybean
e6086f0f35 chore(projects): update mock url 2024-06-04 20:23:22 +08:00
青菜白玉汤
9b05d73e6d
docs(projects): update Node&pnpm version (#472) 2024-06-04 08:46:38 +08:00
Alue Gitman
bd69c00e74
fix(utils): modalLogout bug when esc is pressed (#470) 2024-06-03 10:42:42 +08:00
Soybean
d08a3817d1 chore(projects): close http proxy 2024-06-02 01:43:30 +08:00
Soybean
d0380ce5cb chore(deps): update deps 2024-06-02 01:42:39 +08:00
Soybean
756f84ab1d docs(projects): update CHANGELOG 2024-06-02 01:28:22 +08:00
Soybean
5a4f844d24 chore(projects): release v1.1.3 2024-06-02 01:21:15 +08:00
Soybean
59faf15229 fix(projects): fix reCacheRoute. fixed #464 2024-06-02 01:14:48 +08:00
青菜白玉汤
5bd96b8dd3
fix(components): Fix the issue of search box popping up repeatedly due to carriage return (#468) 2024-06-02 00:41:00 +08:00
Soybean
8efdb10d86 fix(projects): fix click menu search. fixed #466, close #467 2024-06-02 00:15:46 +08:00
KC
2aa85c6f93
optimize(components): accuracy draggable area for TableColumnSetting with animation (#465) 2024-06-01 22:45:25 +08:00
KC
3ad438984e
optimize (components): ButtonIcon with smarter class merging and tippy (#463) 2024-06-01 16:53:08 +08:00
青菜白玉汤
f1850416c8
chore(other): correct spell mistake (#462) 2024-06-01 13:18:44 +08:00
KC
086bad474e
chore(other): correct spell mistake (#460) 2024-05-31 23:14:47 +08:00
Soybean
42b121a117 fix(styles): fix PinToggler style. fixed #451 2024-05-29 15:12:02 +08:00
Soybean
db64b0e2e9 fix(styles): fix FirstLevelMenu style. fixed #450 2024-05-29 15:03:14 +08:00
Soybean
40d0f8ac1c optimize(projects): unocss border shortcut 2024-05-29 14:51:18 +08:00
Soybean
87b18386f5 docs(projects): update CHANGELOG 2024-05-29 14:44:03 +08:00
Soybean
4c1c7e6599 chore(projects): update vscode launch.json 2024-05-29 14:43:13 +08:00
Soybean
ac78b9a394 chore(projects): release v1.1.2 2024-05-24 02:28:09 +08:00
Soybean
e379d6ce67 fix(projects): fix multi tab page only render once. fixed #441 2024-05-24 02:23:59 +08:00
Soybean
64fc0996e3 fix(projects): fix header style & fix button highlight when click global-tab. fixed #446 2024-05-24 02:12:33 +08:00
Soybean
bc8dc47d7f optimize(projects): optimize code 2024-05-20 01:26:39 +08:00
Soybean
6a83f869f9 chore(projects): release v1.1.1 2024-05-20 01:22:34 +08:00
Soybean
419ea42343 docs(projects): update README.md 2024-05-20 01:17:37 +08:00
Soybean
24ff852180 chore(projects): update @elegant-router/vue & add error handle for resolve route. fixed #442 2024-05-20 01:15:19 +08:00
Soybean
57b4a9d532 fix(projects): add error handle when get routes in dynamic route mode. fixed 440 2024-05-20 00:28:41 +08:00
Soybean
0774a51525 fix(projects): fix useRouter. fixed #436 2024-05-20 00:22:51 +08:00
Soybean
68ea974617 chore(projects): update eslint-config & fix code 2024-05-20 00:19:11 +08:00
Soybean
4ea9c85757 chore(projects): update deps & fix TS error 2024-05-19 23:41:43 +08:00
Soybean
fa56e9c9e7 docs(projects): update README.md 2024-05-17 08:44:44 +08:00
Soybean
071241f8cb fix(styles): fix useTable type 2024-05-08 10:33:55 +08:00
Soybean
1978397c90 docs(projects): update CHANGELOG 2024-05-07 21:32:56 +08:00
Soybean
e4d53aa7b5 feat(hooks): add setOptions for useEcharts 2024-05-07 19:17:20 +08:00
Soybean
e7f0a30bd8 chore(projects): release v1.1.0 2024-05-07 18:21:50 +08:00
Soybean
4d17cfdcd3 docs(projects): update CHANGELOG 2024-05-07 15:14:27 +08:00
Soybean
46e90a7208 chore(projects): release v1.1.0-beta.2 2024-05-07 15:11:16 +08:00
Soybean
3b47b5a56f fix(projects): fix menu data when role is changed. fixed #391 2024-05-07 15:08:30 +08:00
Soybean
073fbcfc36
Merge pull request #421 from paynezhuang/main
feat(projects): useTable adds expand to display
2024-05-07 14:58:09 +08:00
paynezhuang
0a90dd3764 feat(projects): useTable adds expand to display 2024-05-07 14:53:42 +08:00
Soybean
60f3b14085 fix(projects): fix manage_menu modal style 2024-05-07 10:51:21 +08:00
Soybean
18b3f05382 docs(projects): add CHANGELOG.zh_CN.md 2024-05-07 10:17:20 +08:00
Soybean
72ccb6bf6d optimize(projects): remove deprecated code 2024-05-07 02:09:22 +08:00
Soybean
21df57b71c chore(projects): release v1.1.0-beta.1 2024-05-07 01:57:37 +08:00
Soybean
7bd43df5f7 fix(projects): fix menu-toggler zIndex 2024-05-07 01:56:56 +08:00
Soybean
599b4e1947 chore(deps): update deps 2024-05-07 01:49:27 +08:00
Soybean
003e145e77 refactor(projects): menu-operate-drawer => menu-operate-modal 2024-05-07 01:44:41 +08:00
Soybean
c4b5c65625 feat(projects): page: support manage_menu more options. close #366 2024-05-07 01:39:52 +08:00
Soybean
ebe55af7d5 chore(projects): merge main to v1.1.0 2024-05-05 01:34:24 +08:00
Soybean
a6b92103a6 chore(projects): release v1.0.9 2024-05-05 00:44:27 +08:00
Soybean
f4513e1e38 fix(projects): fix manage page drawer operate about data reset. fixed #415, fixed #417 2024-05-05 00:43:01 +08:00
Soybean
734ef9852c chore(deps): update deps 2024-05-05 00:31:51 +08:00
Soybean
c137b97089 chore(projects): update vscode settings 2024-05-05 00:18:23 +08:00
Soybean
b8f9e60211
Merge pull request #418 from paynezhuang/main 2024-04-30 16:54:29 +08:00
paynezhuang
ce2a75b5a8 docs(projects): add PanisAdmin to README 2024-04-30 16:51:51 +08:00
Soybean
d0f17a440c docs(projects): add ecosystem to README.md 2024-04-29 15:43:46 +08:00
Soybean
1ed2eb5fdd
Merge pull request #367 from JianJroh/feat/click-mousewheel-close-tab
feat(projects): close tab by mouse wheel button click
2024-04-29 10:50:00 +08:00
JianJroh
d3849baaff feat(projects): close tab by mouse wheel button click 2024-04-29 09:57:44 +08:00
Soybean
413a8b29c7 chore(deps): update deps 2024-04-27 22:44:19 +08:00
Soybean
52188d8853 chore(projects): update .npmrc 2024-04-27 13:47:53 +08:00
Soybean
fbc2e61f49 feat(packages): @sa/scripts: add new commit type optimize and commit scope packages 2024-04-27 13:32:45 +08:00
Soybean
55d7cc09d7 chore(projects): release v1.0.8 2024-04-27 13:21:04 +08:00
Soybean
dae2aa5513 fix(projects): recovery the layout config before is mobile. fixed #408, fixed #361 2024-04-27 13:07:19 +08:00
Soybean
e3bd397248 feat(projects): support repeated request errors occur once in a short time. close #368, close #369 2024-04-27 02:35:13 +08:00
Soybean
42f950f819
Merge pull request #412 from paynezhuang/fix/menu_fixedInIndex
fix(projects): menu fixedIndexInTab default null and Tab fixedIndex
2024-04-27 02:02:28 +08:00
Soybean
b3e9bbaeaa perf(projects): perf judgement the fixed tab 2024-04-27 02:00:51 +08:00
Soybean
c89e00d194
Merge pull request #414 from paynezhuang/fix/tab_fixedIndex
fix(projects): fix tab fixedIndex as null case
2024-04-27 01:57:08 +08:00
paynezhuang
4708eded4c fix(projects): fix tab fixedIndex as null case 2024-04-27 00:25:56 +08:00
paynezhuang
3d10ef1a90 fix(projects): menu fixedIndexInTab default null 2024-04-27 00:03:17 +08:00
Soybean
145300e95c
Merge pull request #413 from alleycharming/main
fix(projects): text level low. #409
2024-04-26 23:13:52 +08:00
alleycharming
3ddb17a0f5 fix(projects): text level low. #409 2024-04-26 23:00:34 +08:00
Soybean
6b465c0ebd
Merge pull request #411 from paynezhuang/feat/menu
feat(projects): add menu route field
2024-04-26 22:15:29 +08:00
paynezhuang
dbe31eb1dc feat(projects): add menu route field 2024-04-26 20:06:53 +08:00
Soybean
a8dbc03e23 refactor(projects): Soybean Admin to SoybeanAdmin 2024-04-26 08:53:37 +08:00
Soybean
c0ed1f26f7 fix(components): fix PinToggler label. fixed #407 2024-04-26 02:22:51 +08:00
Soybean
a1920fcad9 feat(projects): add recommend color switch. closed #388 2024-04-26 02:19:48 +08:00
Soybean
34999971fd refactor(projects): refactor @sa/color-palette => @sa/color & perf @sa/utils 2024-04-26 01:51:16 +08:00
Soybean
1cb3816e48 chore(deps): update deps 2024-04-25 23:51:09 +08:00
Soybean
de9567420a
Merge pull request #406 from paynezhuang/feat/table-total-items
feat(projects): add table showTotal options
2024-04-25 23:31:59 +08:00
Soybean
4749b411bd chore(projects): release v1.0.7 2024-04-25 23:25:17 +08:00
Soybean
fbd80c289a chore(deps): update deps 2024-04-25 23:24:42 +08:00
Soybean
da12d4a5cd feat(projects): support iframe page with diffrent url of custom route 2024-04-25 23:19:51 +08:00
paynezhuang
3e61eab498 feat(projects): add table showTotal options 2024-04-25 22:51:25 +08:00
Soybean
1c3b4734fa chore(projects): release v1.0.6 2024-04-25 22:09:59 +08:00
Soybean
93c7ff7122 fix(projects): fix mix-menu blank. fixed #389 & cache mixMenuFixed 2024-04-25 22:07:23 +08:00
Soybean
1e14293d67 refactor(projects): useMixMenuContext replace useMixMenu 2024-04-25 21:49:14 +08:00
Soybean
19e65c1a9f chore(projects): update pnpm version requirement 2024-04-25 21:27:59 +08:00
Soybean
e57bf0b076 chore(deps): update deps 2024-04-25 15:01:23 +08:00
Soybean
5d45cef1f0 perf(hooks): perf useSignal 2024-04-25 15:00:47 +08:00
Soybean
d460e5cc6d perf(projects): add tsconfig.json for @sa/color-palette 2024-04-25 13:09:26 +08:00
Soybean
3b5e4b3405 refactor(hooks): refactor useSignal, useComputed 2024-04-25 13:08:38 +08:00
Soybean
ec5b1c3f84
Merge pull request #402 from Azir-11/v1.1.0 2024-04-25 12:14:50 +08:00
Azir
1fc34cc5f8 feat(projects): Add prefix to local storage 2024-04-25 12:10:31 +08:00
Soybean
dcd51f4cda chore(projects): use engines replace packageManager 2024-04-25 10:24:48 +08:00
Soybean
09f6464678 feat(hooks): add state hooks: useRef, useState, useSignal 2024-04-25 01:39:59 +08:00
Soybean
fdde679c70 perf(projects): remove useless prop title of NDrawer 2024-04-25 00:23:07 +08:00
Soybean
b266035800 fix(projects): supply $t import statement 2024-04-25 00:20:26 +08:00
Soybean
a1e432f81e
Merge pull request #399 from alleycharming/main
fix(projects): added responseType judgment. #396
2024-04-24 18:41:24 +08:00
alleycharming
82eabab753 fix(projects): added responseType judgment. #396 2024-04-24 17:58:46 +08:00
Soybean
c347528bbb
Merge pull request #395 from Li-0221/v1.1.0
feat(projects): support grayscale. fixed #385
2024-04-24 15:36:20 +08:00
Soybean
d335df6f46 feat(projects): support grayscale. fixed #385 2024-04-24 15:23:23 +08:00
Soybean
0d45b86cde chore(projects): release v1.0.5 2024-04-24 10:22:59 +08:00
Soybean
516f46a47e chore(projects): update pnpm-lock.yaml 2024-04-24 10:19:34 +08:00
Soybean
b52432a792 chore(projects): lower vue version to 3.4.23 2024-04-24 10:09:21 +08:00
Soybean
cf5bc88a75 docs(projects): update CHANGELOG.md 2024-04-24 01:52:03 +08:00
Soybean
03b1fbacc4 chore(projects): release v1.0.4 2024-04-24 01:42:40 +08:00
Soybean
9a66979f09 chore(deps): update deps 2024-04-24 01:39:42 +08:00
Soybean
c695208f62 fix(projects): recovery pnpm-lock.yaml 2024-04-24 01:38:19 +08:00
Soybean
3ceeb6f942 chore(deps): update deps 2024-04-24 01:04:50 +08:00
Soybean
04aa0972f9 fix(projects): fix tabs data when role is change. fixed #392 2024-04-24 01:01:52 +08:00
Soybean
cb83d6d90d fix(projects): fix routes data when role is change. fixed #391 2024-04-24 00:47:58 +08:00
Soybean
79d9c5143a docs(projects): update README.md 2024-04-23 17:31:15 +08:00
Soybean
5a5232bdf4 docs(projects): update README.md 2024-04-23 11:25:51 +08:00
Soybean
7392bebff9 chore(projects): update deps & update pnpm version & update eslint config 2024-04-23 11:20:55 +08:00
Soybean
23f283aa31 fix(projects): fix disabled page animate 2024-04-16 01:15:45 +08:00
Soybean
42e16a0165 chore(projects): update pnpm version 2024-04-16 01:02:51 +08:00
Soybean
ac92817343 chore(deps): update deps 2024-04-16 01:01:46 +08:00
Soybean
93191737dd refactor(hooks): refactor @sa/color-palette 2024-04-16 00:57:24 +08:00
Soybean
d9af5aa2d3 fix(projects): fix CHANGELOG versions 2024-04-16 00:17:10 +08:00
Soybean
d984f75b80 chore(projects): release v1.0.3 2024-04-16 00:15:37 +08:00
Soybean
27c53cd688 fix(projects): fix update theme color 2024-04-16 00:14:32 +08:00
Soybean
b7f0749170 perf(projects): perf code 2024-04-16 00:03:00 +08:00
Soybean
cb8ea2531d
Merge pull request #386 from paynezhuang/main 2024-04-15 16:27:08 +08:00
paynezhuang
c6648b6c8b feat(hooks): deleting the route export of useRoutePush, use vue-router 2024-04-15 16:20:30 +08:00
Soybean
bb74d9949b refactor(projects): update naive-ui.d.ts 2024-04-14 15:44:48 +08:00
Soybean
60beff7e63 fix(projects): update union-key.d.ts 2024-04-14 12:48:02 +08:00
Soybean
d6eda8f9ed fix(projects): fix axios createRequest: add default state 2024-04-09 17:44:05 +08:00
Soybean
f4a9cf8339 docs(projects): update README.md 2024-04-09 15:37:23 +08:00
Soybean
efc0e25c7f fix(projects): fix SvgIcon inheritAttrs warning 2024-04-09 07:27:48 +08:00
Soybean
35310ed73c
Merge pull request #381 from paynezhuang/main 2024-04-08 19:04:13 +08:00
paynezhuang
001059cca0 fix(projects): fix menu edit rules 2024-04-08 11:44:12 +08:00
Soybean
4af884c08b chore(projects): release v1.0.2 2024-04-08 08:00:41 +08:00
Soybean
41e470ed6e refactor(projects): refactor addThemeVarsToHtml 2024-04-08 07:59:50 +08:00
Soybean
2f15a2ac6a fix(projects): unify border-radius of Tag. fixed #378 2024-04-08 07:50:26 +08:00
Soybean
1c72dc76ee chore(projects): disabled unocss eslint rule: order-attributify 2024-04-08 07:46:02 +08:00
Soybean
a1b484a8eb chore(deps): update deps 2024-04-08 07:42:46 +08:00
Soybean
d9410e416e
Merge pull request #377 from yanbowe/main
fix(styles): fix css var is inserted repeatedly
2024-04-07 17:41:08 +08:00
燕博文
769d84a7f4 fix(styles): fix css var is inserted repeatedly 2024-04-07 17:34:33 +08:00
Soybean
0fbb00cee1 chore(projects): release v1.0.1 2024-04-03 00:21:42 +08:00
Soybean
cc539974b2 fix(projects): add maxWidth for GlobalTab to fix bg with gap. fixed #350 2024-04-03 00:20:55 +08:00
Soybean
1ec5ea0ff1 fix(projects): fix flatRequest error type. fixed #376 2024-04-03 00:02:09 +08:00
Soybean
9125cc9b60 chore(projects): update pnpm version 2024-04-02 23:14:34 +08:00
Soybean
76011af8a9 docs(projects): update README.md 2024-04-02 23:13:31 +08:00
Soybean
4babbe19a3 chore(projects): update deps 2024-04-02 23:00:17 +08:00
Soybean
ae508bc572 chore(projects): release v1.0.0 2024-03-31 17:07:09 +08:00
Soybean
c8260221dd chore(projects): release v1.0.0-beta.3 2024-03-31 17:06:35 +08:00
Soybean
82b53d7e98 chore(deps): update deps 2024-03-31 17:05:33 +08:00
Soybean
f69e1523c0 docs(projects): update README.md 2024-03-29 10:03:00 +08:00
Soybean
c0009203c6 chore(projects): add .gitattributes 2024-03-28 00:37:58 +08:00
Soybean
f23e1f7ea4 chore(projects): release v1.0.0-beta.2 2024-03-27 22:49:51 +08:00
Soybean
f89e6c0361 fix(projects): fix pin-toggler toolTip zIndex 2024-03-27 22:32:56 +08:00
Soybean
6b5132c169 chore(deps): update deps 2024-03-27 22:27:20 +08:00
Soybean
1a7070f02b docs(projects): update README.md 2024-03-26 14:14:44 +08:00
Soybean
07d8d25dbf docs(projects): update README.md 2024-03-26 14:13:56 +08:00
Soybean
a0bad57a4e perf(projects): perf code 2024-03-25 23:20:49 +08:00
Soybean
8c7ea235d9 docs(projects): add communication 2024-03-25 11:47:00 +08:00
Soybean
06e204a7fe ci(projects): add issue template 2024-03-25 10:48:22 +08:00
Soybean
7b298c679e ci(projects): update release.yml 2024-03-25 10:37:38 +08:00
Soybean
25fc24c746 chore(projects): release v1.0.0-beta.1 2024-03-25 10:32:03 +08:00
Soybean
4cb17c7440 ci(projects): add github actions config 2024-03-25 10:26:58 +08:00
Soybean
46b6156620 docs(projects): add CHANGELOG.md 2024-03-25 10:18:04 +08:00
Soybean
23a4098bba fix(projects): fix route init 2024-03-25 09:55:16 +08:00
Soybean
000c68ad60 Merge commit '2c543f19ec100af4d6224787956550910e5fb7c8' 2024-03-25 03:14:28 +08:00
Soybean
2c543f19ec fix(projects): fix repeat routes 2024-03-25 03:13:53 +08:00
Soybean
37d20b8e0d refactor(projects): new route guard 2024-03-25 02:42:50 +08:00
Soybean
c11d56da29 feat(projects): add auth example 2024-03-24 15:39:41 +08:00
Soybean
41e8bc44f8 feat(projects): add request exception example page 2024-03-24 06:23:56 +08:00
Soybean
11a6a3bd80 feat(projects): add request refresh token & logout 2024-03-24 05:11:30 +08:00
Soybean
1ed33dc47a feat(projects): login page: register 2024-03-24 04:10:55 +08:00
Soybean
c91dd282a6 feat(projects): login page: code-login 2024-03-24 04:03:49 +08:00
Soybean
f91ef30bd5 refactor(projects): perf code 2024-03-24 03:02:08 +08:00
Soybean
187098136e feat(projects): pef manage role 2024-03-23 15:51:04 +08:00
Soybean
0abbfa5d0c perf(projects): manage menu: add transform to component 2024-03-22 01:31:38 +08:00
Soybean
71f2c5535b perf(projects): perf manage menu 2024-03-22 01:23:24 +08:00
Soybean
49558ca048 feat(projects): change borderRadius to 6px of naiveUI 2024-03-21 19:49:00 +08:00
Soybean
c0a65a165a chore(deps): update deps 2024-03-21 19:44:22 +08:00
Soybean
3fd15e5649 refactor(projects): finish refactor useTable and apply 2024-03-21 19:40:48 +08:00
Soybean
4158a72bd8 feat(projects): update 2024-03-21 08:29:15 +08:00
Soybean
8630175a3f refactor(projects): finish refactor useTable 2024-03-19 02:46:53 +08:00
Soybean
c3efa1b6e0 refactor(projects): refactor useTable 2024-03-19 02:44:03 +08:00
Soybean
51d7758903
Merge pull request #352 from Li-0221/main
fix(components): fix homeTab closeRight and disable colseLeft
2024-03-18 14:56:57 +08:00
~li
d28bf52683 fix(components): fix homeTab closeRight and disable colseLeft 2024-03-18 13:58:22 +08:00
Soybean
455e48f792 fix(projects): fix class name conflict with unocss icon 2024-03-18 07:38:21 +08:00
Soybean
6ad51e9431 chore(projects): update pnpm version 2024-03-18 07:34:43 +08:00
Soybean
0fee104bf9 chore(deps): update deps 2024-03-18 07:32:39 +08:00
Soybean
0cc8f05a26 fix(projects): fix table row-key ts type 2024-03-16 16:18:44 +08:00
Soybean
03c2f3aaf0
Merge pull request #349 from vastsa/main
fix(projects):fix invalid footer-height for theme configuration
2024-03-13 14:56:44 +08:00
lan
6c5404610b fix(projects):fix invalid footer-height for theme configuration 2024-03-13 14:46:12 +08:00
Soybean
8143b0063c chore(projects): update deps & fix eslint vue rule 2024-03-13 14:28:12 +08:00
Soybean
72745229d6 perf(components): perf global-search 2024-03-11 22:57:37 +08:00
Soybean
779ba4e415 perf(projects): perf manage page style 2024-03-11 22:42:22 +08:00
Soybean
b2ee9eef8c chore(deps): update deps 2024-03-11 21:38:10 +08:00
Soybean
7065f6f073 chore(projects): update pnpm version 2024-03-10 14:37:31 +08:00
Soybean
dc24a36739 perf(projects): perf code 2024-03-10 14:36:05 +08:00
Soybean
c05e7ff360 Merge branch 'main' into example 2024-03-10 14:24:46 +08:00
Soybean
2b7e3c237d
Merge pull request #347 from Azir-11/main
feat(projects): Add route meta parameter:fixedQuery
2024-03-10 13:50:46 +08:00
Azir-11
874aaca5bb feat(projects): Add route meta parameter:fixedQuery 2024-03-10 05:19:21 +08:00
Soybean
7a2f54be8b
Merge pull request #345 from Azir-11/main
style(components): Uniform icon size for header
2024-03-07 22:27:23 +08:00
青菜白玉汤
b37c1e94a0
style(components): Uniform icon size for header 2024-03-07 22:19:06 +08:00
Soybean
cb35a94baf Merge branch 'main' into example 2024-03-07 21:52:49 +08:00
Soybean
02d4b0a574 chore(deps): update deps 2024-03-07 21:51:08 +08:00
Soybean
4e29acaae3 chore(projects): update vscode extensions.json 2024-03-07 21:46:26 +08:00
Soybean
7898d08174
Merge pull request #343 from soybeanjs/main
merge: main to example
2024-03-06 17:34:20 +08:00
Soybean
ed1c585a6b
Merge pull request #342 from yanbowe/main 2024-03-06 12:03:21 +08:00
燕博文
0126da4778 feat(projects): globalSearch add i18n 2024-03-06 11:43:27 +08:00
燕博文
04aa10b477 perf(components): components name is converted to uppercase 2024-03-06 11:05:54 +08:00
燕博文
9ea878915e feat(components): add GlobalSearch components 2024-03-06 10:59:40 +08:00
Soybean
05db8c08d5 perf(projects): perf code 2024-03-04 14:01:27 +08:00
Soybean
ffc95d2b7b fix(projects): fix proxy config 2024-03-04 13:57:47 +08:00
Soybean
c8019c4ff7 fix(projects): fix proxy config 2024-03-04 10:23:25 +08:00
Soybean
b546ff8625 refactor(projects): use enquirer replace prompts 2024-03-03 20:43:21 +08:00
Soybean
14aa856a0f chore(deps): update deps 2024-03-03 19:48:00 +08:00
Soybean
3db82acb02 chore(projects): update launch.json 2024-03-03 13:25:18 +08:00
Soybean
4063529a25 chore(projects): add unocss eslint config 2024-03-03 03:53:53 +08:00
Soybean
b4c00ce199 refactor(projects): refactor unocss shortcuts: wh-full => size-full 2024-03-03 03:51:04 +08:00
Soybean
fb3b94b1e3 chore(deps): update deps 2024-03-03 03:48:01 +08:00
Soybean
43193e2808 refactor(projects): refactor service env config 2024-03-02 12:31:19 +08:00
Soybean
bccd6cb3c3 fix(projects): fix repeat home tab 2024-03-02 11:13:09 +08:00
Soybean
a17d68eb11
Merge pull request #337 from Azir-11/main
Fix home mount issue for static and dynamic routes
2024-03-01 13:32:18 +08:00
恕瑞玛的皇帝
9cf2a513f7 fix(projects): Fix homepage mount error under dynamic routing 2024-03-01 13:12:28 +08:00
恕瑞玛的皇帝
0123c37de2 fix(projects): Fix the logic of root route redirection to home 2024-03-01 11:35:25 +08:00
Soybean
418302a34b docs(projects): update README.md 2024-03-01 02:52:15 +08:00
Soybean
7fa87f53d1 perf(projects): perf code 2024-03-01 02:44:09 +08:00
Soybean
b235ef3bc0
Merge pull request #335 from dodu2014/main
fix(hooks): Fix Naive Pagination's outdated API
2024-02-29 22:28:32 +08:00
tnt group
3743612d62 fix(hooks): Fix Naive Pagination's outdated API 2024-02-29 22:22:15 +08:00
Soybean
c3e8ef2ed2
Merge pull request #333 from dodu2014/main
feat(components): enhance the custom strength of the 'TableHeaderOper…
2024-02-26 10:44:31 +08:00
tnt group
ccc2b674db fix(components): supplement the NaiveUI type 2024-02-26 10:40:44 +08:00
tnt group
fdf64f71f4 feat(components): enhance the custom strength of the 'TableHeaderOperation' component 2024-02-26 06:40:32 +08:00
Soybean
9c4ba6650d chore(deps): update deps 2024-02-26 02:11:37 +08:00
Soybean
1a6be003e2 feat(projects): mock manage list data with pagination 2024-02-26 01:59:06 +08:00
Soybean
c7e2c55996 fix(projects): fix table x-scroll. fixed #324 2024-02-23 22:17:31 +08:00
Soybean
0a3efe3442 fix(projects): add route icon: fucntion_hide-child 2024-02-23 21:59:21 +08:00
Soybean
7256ad4ee3 feat(projects): support directory menu hide all child menus. fixed #325 2024-02-23 21:51:20 +08:00
Soybean
8ee2acc1fc
Merge pull request #327 from Azir-11/main
fix(projects): Missing default value for tab icon
2024-02-23 21:16:21 +08:00
Azir
72a4679c0a
fix(projects): Missing default value for tab icon 2024-02-23 15:27:50 +08:00
Soybean
3bdcbc71eb fix(projects): fix resolve alias 2024-02-20 22:21:46 +08:00
Soybean
9772aec2bd chore(projects): update deps & update pnpm version 2024-02-20 22:01:23 +08:00
Soybean
c18d82f9f8 fix(projects): fix build [unocss]: build failed to load icon "close", fixed #319 2024-02-20 21:57:17 +08:00
Soybean
114c835921
Merge pull request #316 from Azir-11/main
fix(projects): The matched value of TabRoute should be optional
2024-02-17 18:42:16 +08:00
Azir
e6fed1fdb5
fix(projects): The matched value of TabRoute should be optional 2024-02-11 13:52:03 +08:00
Soybean
5d75ca924e
Merge pull request #315 from Azir-11/main 2024-02-06 18:03:35 +08:00
Azir
2d102a054a
feat(projects): Add type to TabRoute: matched 2024-02-06 17:51:40 +08:00
Azir
a9c98d9655
fix(projects): Fix the issue of tab error displaying parent localIcon
Fix the issue of abnormal tab display when the parent menu has a localIcon and the child menu does not have one
2024-02-06 17:42:51 +08:00
Soybean
ef4af79a11 docs(projects): update README.md 2024-02-04 01:09:48 +08:00
Soybean
806a1cba5f chore(projects): update repository url 2024-02-04 01:04:31 +08:00
Soybean
147f60d17e chore(projects): update pnpm-lock.yaml 2024-02-04 00:48:04 +08:00
Soybean
579636b0b4 chore(projects): update deps & remove packages docs 2024-02-04 00:28:38 +08:00
Soybean
ebb154840a chore(projects): add dev and build command with service env 2024-02-04 00:26:15 +08:00
Soybean
ae6b6134f3 fix(projects): fix request msg 2024-02-04 00:14:17 +08:00
Soybean
6ea9b85ff1 docs(projects): update README.md 2024-02-03 04:54:18 +08:00
Soybean
0b56e44c0e chore(projects): update @elegant-router/vue, fix inject name in windows 2024-02-02 00:52:29 +08:00
Soybean
13001bc83e chore(projects): update deps & fix keep-alive 2024-02-01 22:46:34 +08:00
Soybean
adec0d7501 chore(projects): update pnpm version 2024-02-01 22:08:17 +08:00
Soybean
db17c916ef feat(projects): page manage_menu operateDrawer 2024-01-30 00:33:26 +08:00
Soybean
e2085e058d docs(projects): update README.md 2024-01-29 22:25:19 +08:00
Soybean
b8f85692d6
Merge pull request #306 from smileluck/main 2024-01-29 16:38:11 +08:00
smileluck
da24642783 fix(projects): default proxy prefix 2024-01-29 16:31:24 +08:00
Soybean
86b445c26a docs(projects): update README.md 2024-01-29 01:50:29 +08:00
Soybean
4e4d2de54a docs(projects): update README.md 2024-01-29 01:40:37 +08:00
Soybean
7770b378f3 fix(projects): fix manage_user title 2024-01-29 01:19:29 +08:00
Soybean
0aa75c0422 perf(projects): perf page manage_menu style 2024-01-28 23:49:01 +08:00
Soybean
87d65d3b1c feat(projects): page manage_menu 2024-01-28 23:38:44 +08:00
Soybean
f8467ceb17 refactor(projects): manage_route => manage_menu 2024-01-28 17:14:46 +08:00
Soybean
babdb5d5cc perf(projects): perf table columns style 2024-01-28 16:37:52 +08:00
Soybean
8a170eeebd feat(projects): page manage_user 2024-01-28 16:24:43 +08:00
Soybean
a19f895cd9 refactor(projects): perf page manage_role 2024-01-28 14:27:07 +08:00
Soybean
39aa7aa2de perf(projects): perf page manage_role, useTable 2024-01-28 01:35:01 +08:00
Soybean
0e9e2e1dc0 refactor(projects): page manage_role: extract module 2024-01-28 01:25:04 +08:00
Soybean
237c6d227e feat(projects): page manage_role 2024-01-28 00:44:21 +08:00
Soybean
2724169eb6 refactor(projects): update mock api 2024-01-26 21:26:26 +08:00
Soybean
4031fafc1f chore(projects): remove soybean.svg 2024-01-26 21:11:10 +08:00
Soybean
456c318ac6 perf(projects): echarts loading style 2024-01-26 02:27:10 +08:00
Soybean
b5477e8996 refactor(projects): perf page function_tab 2024-01-26 02:00:34 +08:00
Soybean
59bec2d923 refactor(projects): login components => modules 2024-01-26 01:52:24 +08:00
Soybean
4c61c6ff3c refactor(projects): perf page home 2024-01-26 01:51:06 +08:00
Soybean
123fd4f96c style(projects): sort defineProps, defineEmits with TS type 2024-01-25 23:24:35 +08:00
Soybean
b2c61f0306 perf(components): perf count-to 2024-01-25 23:16:12 +08:00
Soybean
9cc7ee5c94 chore(deps): update deps 2024-01-25 23:15:01 +08:00
Soybean
502a4d2b85 chore(projects): remove @simonwep/pickr 2024-01-25 21:30:00 +08:00
Soybean
c1afb9dc50 fix(projects): perf card style 2024-01-25 16:01:23 +08:00
Soybean
d886e50fd3 fix(projects): fix horizontal menu 2024-01-25 15:26:46 +08:00
Soybean
4aae6a5297 fix(projects): remove space in tab content 2024-01-25 14:38:16 +08:00
Soybean
b5551d674a refactor(projects): use naive-ui color-picker 2024-01-25 14:35:49 +08:00
Soybean
6114b9f9bd chore(deps): update deps 2024-01-25 12:00:45 +08:00
Soybean
ea02b23721 chore(projects): update pnpm version 2024-01-25 11:59:11 +08:00
Soybean
6ff86e7777 feat(projects): add page function_tab 2024-01-25 02:35:37 +08:00
Soybean
7bd1e47af9 feat(projects): finish page home 2024-01-25 01:12:33 +08:00
Soybean
62e4da053d feat(projects): page home & perf useEcharts 2024-01-24 01:48:23 +08:00
Soybean
0fae9932ac docs(projects): update README.md 2024-01-23 17:43:41 +08:00
Soybean
2400c02655 feat(projects): @sa/axios: add qs stringify for params 2024-01-23 00:30:43 +08:00
Soybean
b3779a6313 fix(projects): fix themeDrawer copy 2024-01-22 00:35:13 +08:00
Soybean
99097b4632 fix(components): fix tooltip zIndex of ButtonIcon 2024-01-22 00:20:00 +08:00
Soybean
1b5caa08be fix(projects): fix themeDrawer darkMode segement 2024-01-22 00:01:35 +08:00
Soybean
db747c4a03 style(projects): fix tooltip zIndex of ButtonIcon 2024-01-21 23:55:00 +08:00
Soybean
8b6de484b8 fix(projects): fix page about style in mobile 2024-01-21 23:48:44 +08:00
Soybean
697c1b6106 feat(projects): add script: gen-route 2024-01-21 23:21:27 +08:00
Soybean
41349555bf perf(projects): remove @soybeanjs/cli 2024-01-21 22:41:01 +08:00
Soybean
dafb6fa06f feat(projects): packages/scripts: add command changelog,release 2024-01-21 18:17:11 +08:00
Soybean
840e7f99fc chore(deps): update deps 2024-01-20 20:34:00 +08:00
Soybean
a24f963121 chore(projects): lock deps versions 2024-01-20 20:32:58 +08:00
Soybean
f59f34884c feat(projects): filter tabs which are not in routes 2024-01-20 19:58:58 +08:00
Soybean
b4f3dd2f7a refactor(projects): refactor app-loading 2024-01-20 19:16:34 +08:00
Soybean
726abe4208 feat(hooks): add use-echarts 2024-01-19 02:17:17 +08:00
Soybean
b43c925696 feat(projects): add custom route exception 2024-01-19 01:28:46 +08:00
Soybean
4955f1af89 feat(projects): add page: about 2024-01-18 23:51:04 +08:00
Soybean
f1b86ccb1d chore(deps): update deps 2024-01-18 23:49:06 +08:00
Soybean
affcc26b3d feat(projects): add copyright, unocss shortcut: card-wrapper, update package.json 2024-01-18 23:43:33 +08:00
Soybean
03c42aa8cc docs(projects): update README.md 2024-01-18 22:46:16 +08:00
Soybean
c260fe26ae docs(projects): update README.md 2024-01-18 22:10:22 +08:00
Soybean
0ba19d5479 fix(projects): fix app loading theme color 2024-01-18 02:44:10 +08:00
Soybean
b30c0359f6 docs(projects): update README.md 2024-01-18 02:17:07 +08:00
Soybean
57b6d8a058 docs(projects): update README.md 2024-01-18 02:09:48 +08:00
Soybean
6a771eae42 docs(projects): update README.md 2024-01-18 01:57:20 +08:00
Soybean
c624f325c7 perf(projects): remove useless file 2024-01-18 01:08:31 +08:00
Soybean
c65451b34c feat(projects): add app loading 2024-01-17 22:48:36 +08:00
Soybean
2372dc9bb7 fix(projects): fix theme mode segment 2024-01-17 22:09:22 +08:00
Soybean
d16a9d58a8 docs(projects): update README 2024-01-17 02:16:47 +08:00
Soybean
2371ba8448 docs(projects): add README 2024-01-17 02:06:19 +08:00
Soybean
4d8469e2d1 style(projects): update theme mode segment height 2024-01-16 23:43:18 +08:00
Soybean
5023f37125 chore(projects): update eslint config 2024-01-16 23:32:22 +08:00
Soybean
5534294163 chore(deps): update deps 2024-01-16 23:31:45 +08:00
Soybean
5c49d24504 perf(projects): perf code 2024-01-16 02:07:31 +08:00
Soybean
87143172e8 fix(projects): fix menu indent 2024-01-16 01:56:05 +08:00
Soybean
f6bab0cc9d perf(projects): add detailed annotations for route role 2024-01-16 01:54:19 +08:00
Soybean
1335d47ae8 fix(projects): add duration of login success notification 2024-01-16 01:52:32 +08:00
Soybean
bac1632457 feat(projects): @sa/axios: createRequest, createFlatRequest, createHookRequest 2024-01-16 01:50:12 +08:00
Soybean
fbf4cc430d fix(projects): fix i18n vscode settings 2024-01-16 01:37:58 +08:00
Soybean
55f7638531 chore(projects): update pnpm version 2024-01-16 01:36:54 +08:00
Soybean
36fe1dad0b chore(deps): update deps 2024-01-16 01:34:52 +08:00
Soybean
ff4c8cc21c
Merge pull request #295 from Azir-11/v1.0-beta
feat(router): add sortRoutesByOrder function
2024-01-16 01:24:29 +08:00
Azir-11
0cf09baef8 feat(router): add sortRoutesByOrder function 2024-01-12 02:51:39 +08:00
Soybean
257bbfc527
Merge pull request #294 from Azir-11/v1.0-beta
fix(projects): Fix welcome notification not closing
2024-01-11 12:53:15 +08:00
Azir
748cfa2c62
fix(projects): Fix welcome notification not closing 2024-01-11 12:17:41 +08:00
Soybean
d778560dbd chore(projects): update @sa/scripts 2023-12-14 21:54:10 +08:00
Soybean
a748166399 style(projects): format code 2023-12-14 21:45:29 +08:00
Soybean
a176dc443e chore(projects): use eslint flat config & update config 2023-12-14 21:00:53 +08:00
Soybean
3346bcdfad refactor(projects): fix conflict with locale file 2023-11-21 16:54:35 +08:00
Soybean
1bac3b78d7 perf(projects): env config 2023-11-20 21:32:55 +08:00
Soybean
8081e19ebc perf(projects): perf code 2023-11-18 00:36:10 +08:00
Soybean
96e4aff5c8 feat(projects): support Vite5 2023-11-18 00:34:14 +08:00
Soybean
377db8298b
chore(project): delete src/locales/lang/zh-CN.ts 2023-11-17 12:00:20 +08:00
Soybean
a8a77ea5d7 fix(projects): rename zh-ch 2023-11-17 11:39:13 +08:00
Soybean
e918a2c0f5 feat(projects): 1.0 beta 2023-11-17 10:25:32 +08:00
Soybean
1ea4817f6a docs(projects): update README.md 2023-11-14 12:35:02 +08:00
Soybean
ecbb96f3a5
Merge pull request #286 from yanbowe/main
perf(components): Optimize internationalized menu search code
2023-10-18 22:42:35 +08:00
燕博文
296a2d2f0e perf(components): Optimize menu search code 2023-10-18 21:13:05 +08:00
燕博文
8c1ef4b0fd perf(components): Optimize internationalized menu search code 2023-10-18 20:58:04 +08:00
Soybean
04d3330463
Merge pull request #285 from Kori000/main
feat: internationalized menu search
2023-10-18 00:01:11 +08:00
Kori
9e115daeb9 feat: internationalized menu search 2023-10-16 22:53:01 +08:00
Soybean
3eaf05bd4d chore(deps): update deps 2023-10-12 22:26:11 +08:00
Soybean
a195980547
Merge pull request #280 from Particaly/main
fix(projects): 修复路由命名为包含关系时导致导航数据出错的问题
2023-09-27 23:08:18 +08:00
J.S.Patrick
f04a929856
Update menu.ts 2023-09-27 08:43:12 +08:00
J.S.Patrick
5b8af29496
Update breadcrumb.ts
防止找不到顶级路由时报错
2023-09-26 13:50:04 +08:00
pantao
766369f911 fix(projects): 修复路由命名为包含关系时导致导航数据出错的问题 2023-09-25 17:16:25 +08:00
Soybean
f6c6dbd312 refactor(projects): remove plugin-web-update-notification 2023-09-21 01:08:28 +08:00
Soybean
783648f516 docs(projects): update README.md 2023-09-21 00:55:19 +08:00
Soybean
ead48f4502 chore(projects): release v0.10.4 2023-09-20 23:42:22 +08:00
Soybean
305d95672a chore(deps): update deps 2023-09-20 23:40:51 +08:00
Soybean
8a792c7d63
Merge pull request #278 from eltociear/patch-1
docs(projects): update README.md
2023-09-20 23:31:05 +08:00
Ikko Eltociear Ashimine
93ed5ad085
docs(projects): update README.md
github -> GitHub
2023-09-20 14:35:47 +09:00
Soybean
41f23386b2 fix(projects): fix reload button animate 2023-09-07 23:25:30 +08:00
Soybean
c91644b829 feat(projects): add plugin-web-update-notification 2023-09-06 01:27:39 +08:00
Soybean
073fd16bd7 refactor(projects): update soybean domain 2023-09-06 01:07:29 +08:00
Soybean
f92ee770e0 refactor(projects): add reCacheRoute method 2023-09-06 00:34:48 +08:00
Soybean
1e6d52357e
Merge pull request #272 from linjiangl/main
chore(projects): When tab is switched, keep the page without refreshing
2023-09-06 00:18:04 +08:00
Soybean
751ded44f3 chore(deps): update deps 2023-09-06 00:14:35 +08:00
Soybean
8567f3e34e
Merge pull request #271 from lapislazulisch/dynamicRoute
Dynamic route
2023-08-31 00:31:40 +08:00
linjiangl
83f2514403 chore(projects): When tab is switched, keep the page without refreshing 2023-08-24 16:26:49 +08:00
lapislazulisch
ad6ac7222c fix(components): 修复动态路由home页404 2023-08-23 16:03:19 +08:00
lapislazulisch
3ae1952624 fix(components): 修复动态路由主页404 2023-08-23 16:00:17 +08:00
lapislazulisch
3db549af40 fix:动态路由首页404 2023-08-23 15:41:40 +08:00
Soybean
94179ae552
Merge pull request #269 from snowords/main
Update Docker deployment method and git hooks init command
2023-08-11 16:49:32 +08:00
muzzyh
7f35e87ed8 docs(projects): update git hooks init command 2023-08-11 14:47:47 +08:00
muzzyh
00da0009ef docs(projects): update Docker deployment method 2023-08-11 11:08:05 +08:00
Soybean
cffc30afa3 chore(projects): correct word spell & eslint fix code 2023-08-04 01:55:00 +08:00
Soybean
24cf1d9284 style(projects): prettier format code 2023-08-04 01:39:12 +08:00
Soybean
9296e6987d chore(deps): update deps 2023-08-04 01:37:21 +08:00
Soybean
809fa85706 perf(hooks): perf useHookTable 2023-07-26 00:50:21 +08:00
Soybean
b3ae7605d3 feat(hooks): add useHookTable 2023-07-24 00:59:45 +08:00
Soybean
864ec4737d fix(projects): correct the lang file name & add recommend vscode plugin i18n-ally 2023-07-23 20:31:59 +08:00
Soybean
854d0bcf20 feat(projects): new i18n function $t & login page and setting drawer config i18n 2023-07-23 20:29:39 +08:00
Soybean
458e387b68 chore(projects): correct the word spell 2023-07-19 23:44:18 +08:00
Soybean
56c770c49d chore(projects): update VSCode setting 2023-07-19 23:28:32 +08:00
Soybean
946447394d chore(projects): update pnpm-lock.yaml 2023-07-19 23:25:29 +08:00
Soybean
44ba3273cb chore(deps): update deps 2023-07-19 23:15:27 +08:00
Soybean
0f7b9d5e2b fix(styles): 用户管理页面布局自适应屏幕高度 (fixed #253) 2023-07-19 23:14:33 +08:00
Soybean
8a3f66db7b
Merge pull request #260 from eAliwei/issues/255
feat(auth): 防止多次刷新token
2023-07-15 01:06:43 +08:00
liwei
0eaa327d47 feat(auth): 防止多次刷新token 2023-07-13 21:34:34 +08:00
Soybean
08e0cf5ad5 chore(projects): update deps & fix eslint code 2023-07-09 13:40:33 +08:00
Soybean
d7aea9d11c chore(projects): update package.json 2023-07-07 01:50:05 +08:00
Soybean
135ce77288 chore(deps): update deps 2023-07-07 01:49:02 +08:00
Soybean
19141a73d2 docs(projects): update README.md logo 2023-07-07 01:33:34 +08:00
Soybean
9d1051b0bd chore(projects): update deps and fix swiper 2023-07-05 01:54:30 +08:00
Soybean
c46a5920e5 refactor(projects): 生产环境缓存主题变更为sessionStorage 2023-07-05 01:41:57 +08:00
Soybean
43ac23f113 style(projects): update default theme color 2023-07-05 01:37:29 +08:00
Soybean
13f6cd8ef4 fix(projects): fix set tab title (fixed #256) 2023-06-27 22:48:04 +08:00
Soybean
0e6d289128 chore(deps): update deps 2023-06-27 22:24:08 +08:00
Soybean
bba68bff29 chore(deps): update deps 2023-06-25 07:55:39 +08:00
Soybean
6e0cce4d49 feat(projects): add switch for customize darkmode transition 2023-06-20 22:33:22 +08:00
Soybean
d3ebe95076 perf(projects): add type declaration for document startViewTransition 2023-06-20 22:07:21 +08:00
Soybean
cbda4a38a3 style(projects): unify card border radius, 16px to 8px 2023-06-20 00:17:18 +08:00
Soybean
3318041b92 perf(hooks): perf use-table 2023-06-19 23:43:16 +08:00
Soybean
af53ec7625 feat(projects): add websocket demo 2023-06-18 22:24:21 +08:00
553 changed files with 26693 additions and 28648 deletions

View File

@ -4,7 +4,7 @@ root = true
[*]
charset = utf-8
indent_style = tab
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true

62
.env
View File

@ -1,20 +1,60 @@
# the base url of the application, the default is "/"
# if use a sub directory, it must be end with "/", like "/admin/" but not "/admin"
VITE_BASE_URL=/
VITE_APP_NAME=SoybeanAdmin
VITE_APP_TITLE=SoybeanAdmin
VITE_APP_TITLE=Soybean管理系统
VITE_APP_DESC=SoybeanAdmin is a fresh and elegant admin template
VITE_APP_DESC=SoybeanAdmin是一个中后台管理系统模版
# the prefix of the icon name
VITE_ICON_PREFIX=icon
# 权限路由模式: static dynamic
# the prefix of the local svg icon component, must include VITE_ICON_PREFIX
# format {VITE_ICON_PREFIX}-{local icon name}
VITE_ICON_LOCAL_PREFIX=icon-local
# auth route mode: static dynamic
VITE_AUTH_ROUTE_MODE=static
# 路由首页(根路由重定向), 用于static模式的权限路由dynamic模式取决于后端返回的路由首页
VITE_ROUTE_HOME_PATH=/dashboard/analysis
# static auth route home
VITE_ROUTE_HOME=home
# iconify图标作为组件的前缀
VITE_ICON_PREFFIX=icon
# default menu icon
VITE_MENU_ICON=mdi:menu
# 本地SVG图标作为组件的前缀, 请注意一定要包含 VITE_ICON_PREFFIX
# 格式 {VITE_ICON_PREFFIX}-{本地图标集合名称}
VITE_ICON_LOCAL_PREFFIX=icon-local
# whether to enable http proxy when is dev mode
VITE_HTTP_PROXY=Y
# vue-router mode: hash | history | memory
VITE_ROUTER_HISTORY_MODE=history
# success code of backend service, when the code is received, the request is successful
VITE_SERVICE_SUCCESS_CODE=0000
# logout codes of backend service, when the code is received, the user will be logged out and redirected to login page
VITE_SERVICE_LOGOUT_CODES=8888,8889
# modal logout codes of backend service, when the code is received, the user will be logged out by displaying a modal
VITE_SERVICE_MODAL_LOGOUT_CODES=7777,7778
# token expired codes of backend service, when the code is received, it will refresh the token and resend the request
VITE_SERVICE_EXPIRED_TOKEN_CODES=9999,9998,3333
# when the route mode is static, the defined super role
VITE_STATIC_SUPER_ROLE=R_SUPER
# sourcemap
VITE_SOURCE_MAP=N
# Used to differentiate storage across different domains
VITE_STORAGE_PREFIX=SOY_
# used to control whether the program automatically detects updates
VITE_AUTOMATICALLY_DETECT_UPDATE=Y
# show proxy url log in terminal
VITE_PROXY_LOG=Y
# used to control whether to launch editor
# by the way, this plugin is only available in dev mode, not in build mode
VITE_DEVTOOLS_LAUNCH_EDITOR=code

View File

@ -1,30 +0,0 @@
/** 请求服务的环境配置 */
type ServiceEnv = Record<ServiceEnvType, ServiceEnvConfig>;
/** 不同请求服务的环境配置 */
const serviceEnv: ServiceEnv = {
dev: {
url: 'http://localhost:8080'
},
test: {
url: 'http://localhost:8080'
},
prod: {
url: 'http://localhost:8080'
}
};
/**
*
* @param env
*/
export function getServiceEnvConfig(env: ImportMetaEnv): ServiceEnvConfigWithProxyPattern {
const { VITE_SERVICE_ENV = 'dev' } = env;
const config = serviceEnv[VITE_SERVICE_ENV];
return {
...config,
proxyPattern: '/proxy-pattern'
};
}

View File

@ -1,2 +0,0 @@
VITE_HTTP_PROXY=Y
VITE_SOYBEAN_ROUTE_PLUGIN=Y

7
.env.prod Normal file
View File

@ -0,0 +1,7 @@
# backend service base url, prod environment
VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
# other backend service base url, prod environment
VITE_OTHER_SERVICE_BASE_URL= `{
"demo": "http://localhost:9529"
}`

View File

@ -1,10 +0,0 @@
VITE_VISUALIZER=N
VITE_COMPRESS=N
# gzip | brotliCompress | deflate | deflateRaw
VITE_COMPRESS_TYPE=gzip
VITE_PWA=N
VITE_PROD_MOCK=Y

7
.env.test Normal file
View File

@ -0,0 +1,7 @@
# backend service base url, test environment
VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
# other backend service base url, test environment
VITE_OTHER_SERVICE_BASE_URL= `{
"demo": "http://localhost:9528"
}`

View File

@ -1,4 +0,0 @@
!.env-config.ts
components.d.ts
router-page.d.ts
*.svg

View File

@ -1,132 +0,0 @@
module.exports = {
extends: ['soybeanjs/vue'],
overrides: [
{
files: ['./scripts/*.ts'],
rules: {
'no-unused-expressions': 'off'
}
},
{
files: ['*.vue'],
rules: {
'no-undef': 'off' // use tsc to check the ts code of the vue
}
}
],
settings: {
'import/core-modules': ['uno.css', '~icons/*', 'virtual:svg-icons-register']
},
rules: {
'import/order': [
'error',
{
'newlines-between': 'never',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'vue',
group: 'external',
position: 'before'
},
{
pattern: 'vue-router',
group: 'external',
position: 'before'
},
{
pattern: 'pinia',
group: 'external',
position: 'before'
},
{
pattern: 'naive-ui',
group: 'external',
position: 'before'
},
{
pattern: '@/constants',
group: 'internal',
position: 'before'
},
{
pattern: '@/config',
group: 'internal',
position: 'before'
},
{
pattern: '@/settings',
group: 'internal',
position: 'before'
},
{
pattern: '@/plugins',
group: 'internal',
position: 'before'
},
{
pattern: '@/layouts',
group: 'internal',
position: 'before'
},
{
pattern: '@/views',
group: 'internal',
position: 'before'
},
{
pattern: '@/components',
group: 'internal',
position: 'before'
},
{
pattern: '@/router',
group: 'internal',
position: 'before'
},
{
pattern: '@/service',
group: 'internal',
position: 'before'
},
{
pattern: '@/store',
group: 'internal',
position: 'before'
},
{
pattern: '@/context',
group: 'internal',
position: 'before'
},
{
pattern: '@/composables',
group: 'internal',
position: 'before'
},
{
pattern: '@/hooks',
group: 'internal',
position: 'before'
},
{
pattern: '@/utils',
group: 'internal',
position: 'before'
},
{
pattern: '@/assets',
group: 'internal',
position: 'before'
},
{
pattern: '@/**',
group: 'internal',
position: 'before'
}
],
pathGroupsExcludedImportTypes: ['vue', 'vue-router', 'pinia', 'naive-ui']
}
]
}
};

10
.gitattributes vendored
View File

@ -3,15 +3,11 @@
"*.ts" eol=lf
"*.jsx" eol=lf
"*.tsx" eol=lf
"*.cjs" eol=lf
"*.cts" eol=lf
"*.mjs" eol=lf
"*.mts" eol=lf
"*.json" eol=lf
"*.html" eol=lf
"*.css" eol=lf
"*.less" eol=lf
"*.scss" eol=lf
"*.sass" eol=lf
"*.styl" eol=lf
"*.md" eol=lf
"*.md" eol=lf
"*.yaml" eol=lf
"*.yml" eol=lf

View File

@ -1,4 +1,4 @@
name: Bug提交
name: 🐞 Bug提交
description: 在使用软件或功能的过程中遇到了错误
title: '[Bug]: '
labels: [ "bug?" ]

View File

@ -0,0 +1,90 @@
name: 🐞 Bug Report
description: Encountered an error while using the software or feature
title: '[Bug]: '
labels: [ "bug?" ]
body:
- type: markdown
attributes:
value: |
## Please submit according to the following requirements
### 1. After submission, you need to specify the label and deadline.
---
- type: markdown
attributes:
value: |
## Environment Information
Please modify the following information according to the actual usage environment.
- type: input
id: env-program-ver
attributes:
label: Software Version
validations:
required: true
- type: dropdown
id: env-vm-ver
attributes:
label: Operating Environment
description: Select the system version on which the software is running
options:
- Windows (64)
- Windows (32/x84)
- MacOS
- Linux
- Ubuntu
- CentOS
- ArchLinux
- UNIX (Android)
- Other (please specify below)
validations:
required: true
- type: dropdown
id: env-vm-arch
attributes:
label: Operating Architecture
description: (Optional) Select the system architecture on which the software is running
options:
- AMD64
- x86
- ARM [32] (AliasAArch32 / ARMv7
- ARM [64] (AliasAArch64 / ARMv8
- Other
- type: textarea
id: reproduce-steps
attributes:
label: Reproduce Steps
description: |
What operations do we need to perform to make the bug appear?
The concise and clear reproduction steps can help us locate the problem more quickly.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What is the expected result?
validations:
required: true
- type: textarea
id: actual
attributes:
label: What is the actual result?
validations:
required: true
- type: textarea
id: logging
attributes:
label: Logging (Optional)
render: golang
- type: textarea
id: extra-desc
attributes:
label: Additional Description (Optional)

View File

@ -0,0 +1,48 @@
---
name: 🚀 功能请求
description: 提出一个想法以帮助我们改进W&B
title: "[功能]: "
labels:
- "功能请求"
body:
- type: markdown
attributes:
value: |
**感谢 :heart: 您花时间填写此功能请求报告!**
我们恳请您搜索看看您的功能是否[已经存在](https://github.com/soybeanjs/soybean-admin/issues?q=is%3Aissue+sort%3Acreated-desc+)。
我们也很乐意接受用户的贡献。有关更多详细信息,请参阅[此处](https://github.com/soybeanjs/soybean-admin/blob/main/README.zh_CN.md#%E5%A6%82%E4%BD%95%E8%B4%A1%E7%8C%AE)。
- type: textarea
attributes:
label: 描述
description: |
对您感兴趣的功能的清晰简洁的描述。
validations:
required: true
- type: textarea
attributes:
label: 建议的解决方案
description: |
描述您想要的解决方案。对您希望发生的事情的清晰简洁的描述。
validations:
required: true
- type: textarea
attributes:
label: 替代方案
description: |
描述您考虑过的替代方案。
对您考虑过的任何替代解决方案或功能的清晰简洁的描述。
validations:
required: false
- type: textarea
attributes:
label: 额外的上下文
description: |
在此处添加有关问题的其他上下文。
validations:
required: false

View File

@ -0,0 +1,48 @@
---
name: 🚀 Feature Request
description: Suggest an idea to help us improve W&B
title: "[Feature]: "
labels:
- "feature_request"
body:
- type: markdown
attributes:
value: |
**Thanks :heart: for taking the time to fill out this feature request report!**
We kindly ask that you search to see if an issue [already exists](https://github.com/soybeanjs/soybean-admin/issues?q=is%3Aissue+sort%3Acreated-desc+) for your feature.
We are also happy to accept contributions from our users. For more details see [here](https://github.com/soybeanjs/soybean-admin/blob/main/README.md#how-to-contribute).
- type: textarea
attributes:
label: Description
description: |
A clear and concise description of the feature you're interested in.
validations:
required: true
- type: textarea
attributes:
label: Suggested Solution
description: |
Describe the solution you'd like. A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Alternatives
description: |
Describe alternatives you've considered.
A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
attributes:
label: Additional Context
description: |
Add any other context about the problem here.
validations:
required: false

View File

@ -1,11 +0,0 @@
## Pull Request 详情
请根据实际使用情况修改以下信息。
## 版本信息
## 解决了哪些问题
## 是否关闭了某个 Issue
Closes #

50
.github/PULL_REQUEST_TEMPLATE/pr_cn.md vendored Normal file
View File

@ -0,0 +1,50 @@
首先,感谢你的贡献! 😄
新特性请提交至 feature 分支,其余可提交至 main 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~
[[English Template / 英文模板](./pr_en.md)]
### 这个变动的性质是
- [ ] 新特性提交
- [ ] 日常 bug 修复
- [ ] 站点、文档改进
- [ ] 组件样式改进
- [ ] TypeScript 定义更新
- [ ] 重构
- [ ] 代码风格优化
- [ ] 分支合并
- [ ] 其他改动(是关于什么的改动?)
### 需求背景
> 1. 描述相关需求的来源。
> 2. 要解决的问题。
> 3. 相关的 issue 讨论链接。
### 实现方案和 API非新功能可选
> 1. 基本的解决思路和其他可选方案。
> 2. 列出最终的 API 实现和用法。
> 3. 涉及 UI/交互变动需要有截图或 GIF。
### 对用户的影响和可能的风险(非新功能可选)
> 1. 这个改动对用户端是否有影响?影响的方面有哪些?
> 2. 是否有可能隐含的 break change 和其他风险?
### Changelog 描述(非新功能可选)
> 1. 英文描述
> 2. 中文描述(可选)
### 请求合并前的自查清单
- [ ] 文档已补充或无须补充
- [ ] 代码演示已提供或无须提供
- [ ] TypeScript 定义已补充或无须补充
- [ ] Changelog 已提供或无须提供
### 后续计划(非新功能可选)
> 如果这个提交后面还有相关的其他提交和跟进信息,可以写在这里。

51
.github/PULL_REQUEST_TEMPLATE/pr_en.md vendored Normal file
View File

@ -0,0 +1,51 @@
First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to main branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
[[中文版模板 / Chinese template](./pr_cn.md)]
### This is a ...
- [ ] New feature
- [ ] Bug fix
- [ ] Site / document update
- [ ] Component style update
- [ ] TypeScript definition update
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Branch merge
- [ ] Other (about what?)
### What's the background?
> 1. Describe the source of requirement.
> 2. Resolve what problem.
> 3. Related issue link.
### API Realization (Optional if not new feature)
> 1. Basic thought of solution and other optional proposal.
> 2. List final API realization and usage sample.
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
### What's the effect? (Optional if not new feature)
> 1. Does this PR affect user? Which part will be affected?
> 2. What will say in changelog?
> 3. Does this PR contains potential break change or other risk?
### Changelog description (Optional if not new feature)
> 1. English description
> 2. Chinese description (optional)
### Self Check before Merge
- [ ] Doc is updated/provided or not needed
- [ ] Demo is updated/provided or not needed
- [ ] TypeScript definition is updated/provided or not needed
- [ ] Changelog is provided or not needed
### Additional Plan? (Optional if not new feature)
> If this PR related with other PR or following info. You can type here.

View File

@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- run: npx githublogen
env:

7
.gitignore vendored
View File

@ -11,10 +11,8 @@ node_modules
.DS_Store
dist
dist-ssr
dist.zip
coverage
*.local
stats.html
/cypress/videos/
/cypress/screenshots/
@ -22,8 +20,8 @@ stats.html
# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/launch.json
.idea
*.suo
*.ntvs*
@ -31,6 +29,7 @@ stats.html
*.sln
*.sw?
/src/typings/components.d.ts
package-lock.json
yarn.lock
.VSCodeCounter

2
.npmrc
View File

@ -1,2 +1,4 @@
registry=https://registry.npmmirror.com/
shamefully-hoist=true
ignore-workspace-root-check=true
link-workspace-packages=true

View File

@ -3,25 +3,18 @@
"afzalsayed96.icones",
"antfu.iconify",
"antfu.unocss",
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"formulahendry.auto-close-tag",
"formulahendry.auto-complete-tag",
"formulahendry.auto-rename-tag",
"kisstkondoros.vscode-gutter-preview",
"lokalise.i18n-ally",
"mariusalchimavicius.json-to-ts",
"mhutchie.git-graph",
"mikestead.dotenv",
"naumovs.color-highlight",
"pkief.material-icon-theme",
"sdras.vue-vscode-snippets",
"vue.volar",
"vue.vscode-typescript-vue-plugin",
"whtouche.vscode-js-console-utils",
"zhuangtongfa.material-theme"
"zhuangtongfa.material-theme",
"tu6ge.naive-ui-intelligence"
]
}

14
.vscode/launch.json vendored
View File

@ -4,17 +4,19 @@
{
"type": "chrome",
"request": "launch",
"name": "Vue debugger",
"url": "http://localhost:3200",
"name": "Vue Debugger",
"url": "http://localhost:9527",
"webRoot": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "TS debugger",
"skipFiles": ["<node_internals>/**"],
"runtimeArgs": ["--loader", "tsx"],
"program": "${relativeFile}"
"name": "TS Debugger",
"runtimeExecutable": "tsx",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"],
"program": "${file}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}

94
.vscode/settings.json vendored
View File

@ -1,75 +1,31 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.fontLigatures": true,
"editor.formatOnSave": false,
"editor.guides.bracketPairs": "active",
"editor.quickSuggestions": {
"strings": true
"eslint.validate": [
"html",
"css",
"scss",
"json",
"jsonc",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue"
],
"i18n-ally.displayLanguage": "zh-cn",
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.enabledFrameworks": ["vue"],
"i18n-ally.editor.preferEditor": true,
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": ["src/locales/langs"],
"i18n-ally.parsers.typescript.compilerOptions": {
"moduleResolution": "node"
},
"editor.tabSize": 2,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "json"],
"files.associations": {
"*.env.*": "dotenv"
},
"files.eol": "\n",
"git.enableSmartCommit": true,
"gutterpreview.paths": {
"@": "/src",
"~@": "/src"
},
"material-icon-theme.activeIconPack": "angular",
"material-icon-theme.files.associations": {},
"material-icon-theme.folders.associations": {
"src-tauri": "src",
"enum": "typescript",
"enums": "typescript",
"store": "context",
"stores": "context",
"composable": "hook",
"composables": "hook",
"directive": "tools",
"directives": "tools",
"business": "core",
"request": "api",
"adapter": "middleware"
},
"path-intellisense.mappings": {
"@": "${workspaceFolder}/src",
"~@": "${workspaceFolder}/src"
},
"terminal.integrated.fontSize": 14,
"terminal.integrated.fontWeight": 500,
"terminal.integrated.tabs.enabled": true,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "One Dark Pro",
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
},
"i18n-ally.localesPaths": ["src/locales", "src/locales/lang"]
"prettier.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"unocss.root": ["./"]
}

51
.vscode/vue3.code-snippets vendored Normal file
View File

@ -0,0 +1,51 @@
{
"Print soy Vue3 SFC page": {
"scope": "vue",
"prefix": ["v3","page","view"],
"body": [
"<script lang=\"ts\" setup>",
"//$1",
"</script>\n",
"<template>",
" <div class=\"\">",
" <!-- page only one root element -->",
" $2",
" </div>",
"</template>\n",
],
},
"Print soy Vue3 SFC Component": {
"scope": "vue",
"prefix": ["component","comp"],
"body": [
"<script lang=\"ts\" setup>",
"//$1",
"</script>\n",
"<template>",
" <div class=\"\">",
" $2",
" </div>",
"</template>\n",
],
},
"Print soy style": {
"scope": "vue",
"prefix": "st",
"body": ["<style scoped>", "//", "</style>\n"],
},
"Print soy script": {
"scope": "vue",
"prefix": "sc",
"body": ["<script lang=\"ts\" setup>", "//$3", "</script>\n"],
},
"Print soy template": {
"scope": "vue",
"prefix": "te",
"body": [
"<template>",
" <div class=\"\">$1</div>",
"</template>\n",
],
},
}

File diff suppressed because it is too large Load Diff

634
CHANGELOG.zh_CN.md Normal file
View File

@ -0,0 +1,634 @@
# 更新日志
## [v1.3.5](https://github.com/soybeanjs/soybean-admin/compare/v1.3.4...v1.3.5) (2024-09-07)
### &nbsp;&nbsp;&nbsp;🚀 新功能
- **packages**:
- @sa/axios: 成功时将响应添加到 flatRequest &nbsp;-&nbsp; by @soybeanjs [<samp>(c4e16)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c4e1610)
- **projects**:
- README.zh_CN.md 添加合作推广 &nbsp;-&nbsp; by @PZ-18664918826 in https://github.com/soybeanjs/soybean-admin/issues/601 [<samp>(2fa40)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2fa400b)
- 根据 Apache 规范添加更多提交类型 &nbsp;-&nbsp; by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/610 [<samp>(878d9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/878d9c3)
- 配置是否支持自动更新。关闭#612 &nbsp;-&nbsp; by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/617 和 https://github.com/soybeanjs/soybean-admin/issues/612 [<samp>(4c9f4)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4c9f4e0)
- 添加应用错误处理程序。关闭 #587 &nbsp;-&nbsp; by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/587 [<samp>(be855)</samp>](https://github.com/soybeanjs/soybean-admin/commit/be8556c)
### &nbsp;&nbsp;&nbsp;🐞 Bug 修复
- **deps**:
- 将 json5 从 devDependencies 移到 dependencies 以支持生产环境使用 &nbsp;-&nbsp; by @mufeng889 in https://github.com/soybeanjs/soybean-admin/issues/618 [<samp>(7cb43)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7cb43fc)
- **projects**:
- 避免检索缓存的 HTML &nbsp;-&nbsp; by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/605 [<samp>(ef6cf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ef6cf93)
- 修复登录重定向 &nbsp;-&nbsp; by @soybeanjs [<samp>(3830e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3830ec7)
- 修复侧边栏折叠时的 vertical-mix-menu。修复 #608 &nbsp;-&nbsp; by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/608 [<samp>(c3f1f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c3f1f69)
- 修复 activeMenu 为父菜单时的面包屑。修复 #589 &nbsp;-&nbsp; by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/589 [<samp>(79b2a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/79b2a28)
- 修复遇到多请求时的刷新令牌。修复 #581 &nbsp;-&nbsp; by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/581 [<samp>(27b52)</samp>](https://github.com/soybeanjs/soybean-admin/commit/27b5222)
- **types**:
- 修复 TableApiFn 的类型 &nbsp;-&nbsp; by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/599 [<samp>(26c93)</samp>](https://github.com/soybeanjs/soybean-admin/commit/26c93df)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **projects**: 优化菜单 selectedKey &nbsp;-&nbsp; by @soybeanjs [<samp>(531bf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/531bfaf)
### &nbsp;&nbsp;&nbsp;📖 文档
- **projects**:
- 更新 README &nbsp;-&nbsp; by @mufeng889 in https://github.com/soybeanjs/soybean-admin/issues/594 [<samp>(a8f92)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a8f923e)
- 更新 README &nbsp;-&nbsp; by @soybeanjs [<samp>(e9a2e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e9a2ee4)
- 更新 README &nbsp;-&nbsp; by @soybeanjs [<samp>(73e91)</samp>](https://github.com/soybeanjs/soybean-admin/commit/73e917a)
- 更新文档中重要信息的位置 &nbsp;-&nbsp; by **Azir** [<samp>(9c012)</samp>](https://github.com/soybeanjs/soybean-admin/commit/9c012c7)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **deps**:
- 更新依赖 &nbsp;-&nbsp; by @soybeanjs [<samp>(a1c14)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a1c14a1)
- 更新依赖 &nbsp;-&nbsp; by @soybeanjs [<samp>(7fa55)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7fa5590)
- 更新依赖 &nbsp;-&nbsp; by @soybeanjs [<samp>(a44ea)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a44ea62)
- **projects**:
- 使用 json5 解析环境变量 `VITE_OTHER_SERVICE_BASE_URL` 并修复代理启用 &nbsp;-&nbsp; by @soybeanjs [<samp>(b16a9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b16a963)
### &nbsp;&nbsp;&nbsp;🎨 样式
- **projects**: 将脚本 czh 重命名为 commit:zh &nbsp;-&nbsp; by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/597 [<samp>(5094f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5094f0e)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![mufeng889](https://github.com/mufeng889.png?size=48)](https://github.com/mufeng889)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;[![PZ-18664918826](https://github.com/PZ-18664918826.png?size=48)](https://github.com/PZ-18664918826)&nbsp;&nbsp;
[Azir](mailto:2075125282@qq.com),&nbsp;
## [v1.3.4](https://github.com/honghuangdc/soybean-admin/compare/v1.3.3...v1.3.4) (2024-08-01)
### &nbsp;&nbsp;&nbsp;🚨 重大变更
- **projects**: 当 vertical-mix 布局为 mixSiderFixed 时,不重置活动菜单 &nbsp;-&nbsp; by @honghuangdc [<samp>(939c5)</samp>](https://github.com/honghuangdc/soybean-admin/commit/939c512)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **projects**: 优化代码 &nbsp;-&nbsp; by @honghuangdc [<samp>(cb1d4)</samp>](https://github.com/honghuangdc/soybean-admin/commit/cb1d445)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **projects**: 更新依赖并修复 vue-router 类型 &nbsp;-&nbsp; by @honghuangdc [<samp>(96837)</samp>](https://github.com/honghuangdc/soybean-admin/commit/968370b)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
## [v1.3.3](https://github.com/honghuangdc/soybean-admin/compare/v1.3.2...v1.3.3) (2024-07-30)
### &nbsp;&nbsp;&nbsp;🐞 Bug 修复
- **projects**: 修复水印设置 &nbsp;-&nbsp; by @honghuangdc [<samp>(5646a)</samp>](https://github.com/honghuangdc/soybean-admin/commit/5646a50)
### &nbsp;&nbsp;&nbsp;📖 文档
- **projects**: 更新 CHANGELOG &nbsp;-&nbsp; by @honghuangdc [<samp>(ebc83)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ebc838c)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
## [v1.3.2](https://github.com/honghuangdc/soybean-admin/compare/v1.3.1...v1.3.2) (2024-07-30)
### &nbsp;&nbsp;&nbsp;🚀 新功能
- **项目**:
- 添加颜色渐变模式。关闭 #567 &nbsp;-&nbsp;@Azir-11 在 https://github.com/honghuangdc/soybean-admin/issues/569 和 https://github.com/honghuangdc/soybean-admin/issues/567 [<samp>(4dde4)</samp>](https://github.com/honghuangdc/soybean-admin/commit/4dde4c2)
- 添加全屏水印。关闭 #571 &nbsp;-&nbsp;@paynezhuang 在 https://github.com/honghuangdc/soybean-admin/issues/573 和 https://github.com/honghuangdc/soybean-admin/issues/571 [<samp>(ea8aa)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ea8aa6c)
### &nbsp;&nbsp;&nbsp;🐞 Bug 修复
- **项目**: 修复 vertical-mix 菜单选中问题 &nbsp;-&nbsp;@honghuangdc [<samp>(59f07)</samp>](https://github.com/honghuangdc/soybean-admin/commit/59f07d8)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**:
- 添加类型 WatermarkProps &nbsp;-&nbsp;@honghuangdc [<samp>(f26d0)</samp>](https://github.com/honghuangdc/soybean-admin/commit/f26d0a6)
- 移除 home NAlert 可关闭 &nbsp;-&nbsp;@honghuangdc [<samp>(98b75)</samp>](https://github.com/honghuangdc/soybean-admin/commit/98b75c2)
- 优化响应代码比较 &nbsp;-&nbsp;@honghuangdc [<samp>(cf67d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/cf67d55)
- **类型**:
- 移除无用类型。 &nbsp;-&nbsp;**Azir** [<samp>(eed61)</samp>](https://github.com/honghuangdc/soybean-admin/commit/eed617f)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新更新日志 &nbsp;-&nbsp;@honghuangdc [<samp>(d3759)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d37591d)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **依赖**: 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(993e9)</samp>](https://github.com/honghuangdc/soybean-admin/commit/993e9ca)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;[![paynezhuang](https://github.com/paynezhuang.png?size=48)](https://github.com/paynezhuang)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;
[Azir](mailto:2075125282@qq.com),&nbsp;
## [v1.3.1](https://github.com/honghuangdc/soybean-admin/compare/v1.3.0...v1.3.1) (2024-07-22)
### &nbsp;&nbsp;&nbsp;🐞 Bug 修复
- **项目**:
- 修复顶部菜单混合和反向模式下侧边栏宽度异常的问题 &nbsp;-&nbsp;@Azir-11 在 https://github.com/honghuangdc/soybean-admin/issues/562 修复 [<samp>(c4695)</samp>](https://github.com/honghuangdc/soybean-admin/commit/c469512)
- 修复水平混合菜单反转问题。修复 #563 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/563 修复 [<samp>(4e55b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/4e55b0e)
- 修复当布局来自移动端时垂直菜单不渲染的问题 &nbsp;-&nbsp;@honghuangdc 修复 [<samp>(84027)</samp>](https://github.com/honghuangdc/soybean-admin/commit/8402734)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新更新日志 &nbsp;-&nbsp;@honghuangdc 更新 [<samp>(613c8)</samp>](https://github.com/honghuangdc/soybean-admin/commit/613c836)
### &nbsp;&nbsp;&nbsp;🎨 样式
- **其他**: 修改灰度模式的中文名称 &nbsp;-&nbsp;**Azir** 修改 [<samp>(53770)</samp>](https://github.com/honghuangdc/soybean-admin/commit/5377002)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;
[Azir](mailto:2075125282@qq.com),&nbsp;
## [v1.3.0](https://github.com/soybeanjs/soybean-admin/compare/v1.2.8...v1.3.0) (2024-07-22)
### &nbsp;&nbsp;&nbsp;🚨 破坏性变更
- **项目**: 重构全局菜单 & 支持 `reversed-horizontal-mix-menu`。关闭 #365 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/365 提出 [<samp>(087e5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/087e532)
### &nbsp;&nbsp;&nbsp;🚀 功能
- **包**:
- `@sa/scripts`: 命令 `gitCommit` 支持中文 &nbsp;-&nbsp;@mmdapl 在 https://github.com/soybeanjs/soybean-admin/issues/548 提出 [<samp>(06971)</samp>](https://github.com/soybeanjs/soybean-admin/commit/06971f3)
- @sa/axios: 用 AbortController 替换 CancelTokenSource。关闭 #530, 关闭 #532 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/530 和 https://github.com/soybeanjs/soybean-admin/issues/532 提出 [<samp>(527fd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/527fd79)
- @sa/scripts: 为命令 `gitCommitVerify` 添加忽略模式列表。关闭 #504 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/504 提出 [<samp>(958d0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/958d0ba)
- **项目**:
- 使分支 `main` 更精简 & 修改请求重试次数为 0 &nbsp;-&nbsp;@Azir-11 提出 [<samp>(793b1)</samp>](https://github.com/soybeanjs/soybean-admin/commit/793b16e)
### &nbsp;&nbsp;&nbsp;🐞 修复
- **钩子**: 当 pagesize 返回 0 时防止程序冻结 &nbsp;-&nbsp;@Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/545 提出 [<samp>(f4eeb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f4eeb2e)
### &nbsp;&nbsp;&nbsp;💅 重构
- **项目**:
- 合并 `theme tokens``theme settings`。关闭 #379 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/379 提出 [<samp>(1d1b1)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1d1b148)
- 将 css 变量挂载到 root &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(00f41)</samp>](https://github.com/soybeanjs/soybean-admin/commit/00f41dd)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新更新日志 &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(a0b76)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a0b76da)
### &nbsp;&nbsp;&nbsp;🏡 杂务
- **依赖**: 更新依赖 &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(f6bd6)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f6bd6b8)
- **项目**: 添加脚本 `czh` &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(02069)</samp>](https://github.com/soybeanjs/soybean-admin/commit/0206969)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;[![mmdapl](https://github.com/mmdapl.png?size=48)](https://github.com/mmdapl)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;
## [v1.2.8](https://github.com/soybeanjs/soybean-admin/compare/v1.2.7...v1.2.8) (2024-07-20)
### &nbsp;&nbsp;&nbsp;🐞 修复
- **包**:
- @sa/hooks: 修复 useHookTable 的 searchParams。修复了 #552 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/552 提出 [<samp>(96c10)</samp>](https://github.com/soybeanjs/soybean-admin/commit/96c1044)
- **类型**:
- 修复了引用类型错误 &nbsp;-&nbsp;**dodu2014** 在 https://github.com/soybeanjs/soybean-admin/issues/551 提出 [<samp>(3e2a9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3e2a993)
- 修复 useHookTable 的数据类型 &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(276ea)</samp>](https://github.com/soybeanjs/soybean-admin/commit/276ea7f)
### &nbsp;&nbsp;&nbsp;💅 重构
- **项目**: 用 `klona` 替换 `lodash-es``cloneDeep` &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(a9133)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a91335d)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新更新日志 &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(58fc0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/58fc096)
### &nbsp;&nbsp;&nbsp;🏡 杂务
- **依赖**: 更新依赖 &nbsp;-&nbsp;@honghuangdc 提出 [<samp>(cf019)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cf0192a)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
[dodu2014](mailto:dodu@live.cn)
## [v1.2.7](https://github.com/honghuangdc/soybean-admin/compare/v1.2.6...v1.2.7) (2024-07-12)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**: 支持自定义菜单图标大小 &nbsp;-&nbsp;@wynn-w 在 https://github.com/honghuangdc/soybean-admin/issues/534 提出 [<samp>(e035e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e035eab)
### &nbsp;&nbsp;&nbsp;🏡 杂务
- **依赖**:
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(72ede)</samp>](https://github.com/honghuangdc/soybean-admin/commit/72ede8b)
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(be13c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/be13ca2)
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(752ec)</samp>](https://github.com/honghuangdc/soybean-admin/commit/752ec1e)
- **项目**:
- 修复已弃用的配置配置 &nbsp;-&nbsp;@paynezhuang 在 https://github.com/honghuangdc/soybean-admin/issues/524 提出 [<samp>(0d20e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/0d20e4c)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;[![wynn-w](https://github.com/wynn-w.png?size=48)](https://github.com/wynn-w)&nbsp;&nbsp;[![paynezhuang](https://github.com/paynezhuang.png?size=48)](https://github.com/paynezhuang)&nbsp;&nbsp;
## [v1.2.6](https://github.com/honghuangdc/soybean-admin/compare/v1.2.5...v1.2.6) (2024-06-21)
### &nbsp;&nbsp;&nbsp;🐞 修复
- **项目**:
- 请求模态标题使用 i18n。修复 #507 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/507 提出 [<samp>(f7de3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/f7de3fd)
- 为 `useTable` 添加 `getDataByPage`。修复 #499 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/499 提出 [<samp>(425c6)</samp>](https://github.com/honghuangdc/soybean-admin/commit/425c69a)
- 修复登录重定向到 routeHome 时,动态路由的 routeHome 与静态路由不同的问题。修复 #511 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/511 提出 [<samp>(49f60)</samp>](https://github.com/honghuangdc/soybean-admin/commit/49f60b2)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**: 优化 `getRouteQueryOfLoginRoute` &nbsp;-&nbsp;@honghuangdc [<samp>(693f7)</samp>](https://github.com/honghuangdc/soybean-admin/commit/693f704)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**:
- 更新更新日志 &nbsp;-&nbsp;@honghuangdc [<samp>(5c67d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/5c67d06)
- 更新自述文件 &nbsp;-&nbsp;@honghuangdc [<samp>(1e67a)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1e67ae8)
### &nbsp;&nbsp;&nbsp;🏡 杂务
- **依赖**:
- 更新依赖。关闭 #510 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/510 提出 [<samp>(53143)</samp>](https://github.com/honghuangdc/soybean-admin/commit/531432d)
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(c7f6f)</samp>](https://github.com/honghuangdc/soybean-admin/commit/c7f6f2a)
### &nbsp;&nbsp;&nbsp;🤖 CI
- **项目**:
- 添加 github 问题模板 &nbsp;-&nbsp;@honghuangdc [<samp>(b5027)</samp>](https://github.com/honghuangdc/soybean-admin/commit/b5027c8)
- 更新 github 问题模板 &nbsp;-&nbsp;@honghuangdc [<samp>(ff1d5)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ff1d504)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
## [v1.2.5](https://github.com/soybeanjs/soybean-admin/compare/v1.2.4...v1.2.5) (2024-06-15)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **项目**: 修复登出后标签页异常缓存的问题。已修复 #495 &nbsp;-&nbsp;@Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/495 [<samp>(3eeac)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3eeace9)
### &nbsp;&nbsp;&nbsp;🔥 性能
- **项目**: 初始化静态路由功能不需要异步 &nbsp;-&nbsp;**CHENZL** 在 https://github.com/soybeanjs/soybean-admin/issues/493 [<samp>(2198b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2198b98)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**: 优化代码 &nbsp;-&nbsp;@soybeanjs [<samp>(b94ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b94baa1)
- **类型**: 提高全局类型的兼容性 &nbsp;-&nbsp;@Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/494 [<samp>(cd9d5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cd9d58d)
- **工具**: 减少代码缩进,提高可读性 &nbsp;-&nbsp;@Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/496 [<samp>(ad2f2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ad2f247)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新CHANGELOG &nbsp;-&nbsp;@soybeanjs [<samp>(f70d2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f70d29b)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **依赖**: 更新依赖 &nbsp;-&nbsp;@soybeanjs [<samp>(b094d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b094d68)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;
[CHENZL](mailto:zlong5568863@qq.com)
## [v1.2.4](https://github.com/soybeanjs/soybean-admin/compare/v1.2.3...v1.2.4) (2024-06-14)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**:
- 优化 `setupAppVersionNotification` &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(b5a72)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b5a723c)
- 获取 'Asia/Shanghai' 时区的构建时间 &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(069fa)</samp>](https://github.com/soybeanjs/soybean-admin/commit/069fa8a)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;
## [v1.2.3](https://github.com/soybeanjs/soybean-admin/compare/v1.2.2...v1.2.3) (2024-06-13)
### &nbsp;&nbsp;&nbsp;🐞 修复错误
- **项目**:
- 通过在index.html中添加color-scheme元标签修复移动浏览器主题问题 &nbsp;-&nbsp;@KickCashew 在 https://github.com/soybeanjs/soybean-admin/issues/488 中提交 [<samp>(c2125)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c212565)
- 修复二级目录组件为空 &nbsp;-&nbsp;@paynezhuang 在 https://github.com/soybeanjs/soybean-admin/issues/491 中提交 [<samp>(aabb2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/aabb2a4)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**:
- 修复超链接指向错误 &nbsp;-&nbsp;**Azir** 提交 [<samp>(20a81)</samp>](https://github.com/soybeanjs/soybean-admin/commit/20a8127)
- 更新 README &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(70261)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7026126)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **依赖**:
- 更新依赖 &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(813d8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/813d8ce)
- 更新依赖 &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(bf718)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bf71837)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![paynezhuang](https://github.com/paynezhuang.png?size=48)](https://github.com/paynezhuang)&nbsp;&nbsp;[![KickCashew](https://github.com/KickCashew.png?size=48)](https://github.com/KickCashew)&nbsp;&nbsp;
[Azir](mailto:2075125282@qq.com)
## [v1.2.2](https://github.com/honghuangdc/soybean-admin/compare/v1.2.1...v1.2.2) (2024-06-12)
### &nbsp;&nbsp;&nbsp;🚀 特性
- **项目**: 切换标签时重置滚动位置 &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(9094b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/9094b21)
### &nbsp;&nbsp;&nbsp;🐞 修复错误
- **项目**:
- 在DEV模式下隐藏AppVersionNotification &nbsp;-&nbsp;@sigma-plus 在 https://github.com/honghuangdc/soybean-admin/issues/482 中提交 [<samp>(62592)</samp>](https://github.com/honghuangdc/soybean-admin/commit/6259287)
- 修复在移动布局中隐藏menu-toggler。fixed #483 &nbsp;-&nbsp;@soybeanjs 在 https://github.com/honghuangdc/soybean-admin/issues/483 中提交 [<samp>(4470c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/4470cb4)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新 README &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(8f9a7)</samp>](https://github.com/honghuangdc/soybean-admin/commit/8f9a705)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![sigma-plus](https://github.com/sigma-plus.png?size=48)](https://github.com/sigma-plus)&nbsp;&nbsp;
## [v1.2.1](https://github.com/honghuangdc/soybean-admin/compare/v1.2.0...v1.2.1) (2024-06-07)
### &nbsp;&nbsp;&nbsp;🐞 修复错误
- **项目**:
- 修复页面重新加载时获取用户信息 &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(ff51b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ff51b72)
- 修复setupAppVersionNotification渲染 &nbsp;-&nbsp;@soybeanjs 提交 [<samp>(6a6eb)</samp>](https://github.com/honghuangdc/soybean-admin/commit/6a6eb9a)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新CHANGELOG &nbsp;-&nbsp;@soybeanjs [<samp>(fe06b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/fe06b8c)完成
### &nbsp;&nbsp;&nbsp;🏡 日常任务
- **依赖**: 更新依赖 &nbsp;-&nbsp;@soybeanjs [<samp>(08827)</samp>](https://github.com/honghuangdc/soybean-admin/commit/08827a4)完成
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;
## [v1.2.0](https://github.com/soybeanjs/soybean-admin/compare/v1.1.5...v1.2.0) (2024-06-06)
### &nbsp;&nbsp;&nbsp;🚀 功能
- **项目**:
- 支持系统新版本更新通知。关闭 #420 &nbsp;-&nbsp;@soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/420 [<samp>(584cd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/584cd54)
- 在路由守卫中获取用户信息并从localStorage中移除。关闭 #459 &nbsp;-&nbsp;@soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/459 [<samp>(5531a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5531a68)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新CHANGELOG &nbsp;-&nbsp;@soybeanjs [<samp>(2bec8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2bec899)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;
## [v1.1.5](https://github.com/soybeanjs/soybean-admin/compare/v1.1.4...v1.1.5) (2024-06-06)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **项目**: 修复注册组件名CodeLogin => Register &nbsp;-&nbsp;@m-xlsea 在 https://github.com/soybeanjs/soybean-admin/issues/478 [<samp>(ddf38)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ddf3823)
### &nbsp;&nbsp;&nbsp;🏡 杂务
- **依赖**: 更新依赖 &nbsp;-&nbsp;@soybeanjs [<samp>(060c0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/060c0a9)
- **项目**: 更新 vscode 设置: vue 官方 &nbsp;-&nbsp;@soybeanjs [<samp>(76649)</samp>](https://github.com/soybeanjs/soybean-admin/commit/76649e2)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![m-xlsea](https://github.com/m-xlsea.png?size=48)](https://github.com/m-xlsea)&nbsp;&nbsp;
## [v1.1.4](https://github.com/honghuangdc/soybean-admin/compare/v1.1.3...v1.1.4) (2024-06-06)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **utils**: 修复了按esc键时modalLogout的错误 &nbsp;-&nbsp;@sigma-plus 在 https://github.com/honghuangdc/soybean-admin/issues/470 中提出 [<samp>(bd69c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/bd69c00)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **projects**: 优化了RouteMeta的备注 &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(ffb48)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ffb48b1)
### &nbsp;&nbsp;&nbsp;📖 文档
- **projects**:
- 更新了CHANGELOG &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(756f8)</samp>](https://github.com/honghuangdc/soybean-admin/commit/756f84a)
- 更新了Node&pnpm版本 &nbsp;-&nbsp;@Azir-11 在 https://github.com/honghuangdc/soybean-admin/issues/472 中提出 [<samp>(9b05d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/9b05d73)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **deps**:
- 更新了依赖 &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(d0380)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d0380ce)
- 更新了依赖 &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(1f464)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1f4647b)
- **projects**:
- 关闭了http代理 &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(d08a3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d08a381)
- 更新了mock url &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(e6086)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e6086f0)
- 更新了vscode设置 &nbsp;-&nbsp;@soybeanjs 提出 [<samp>(910df)</samp>](https://github.com/honghuangdc/soybean-admin/commit/910dfca)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;[![sigma-plus](https://github.com/sigma-plus.png?size=48)](https://github.com/sigma-plus)&nbsp;&nbsp;
## [v1.1.3](https://github.com/soybeanjs/soybean-admin/compare/v1.1.2...v1.1.3) (2024-06-02)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **组件**:
- 修复了由于回车导致搜索框反复弹出的问题 &nbsp;-&nbsp;@Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/468 中修复 [<samp>(5bd96)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5bd96b8)
- **项目**:
- 修复点击菜单搜索。修复了 #466,关闭 #467 &nbsp;-&nbsp;@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 &nbsp;-&nbsp;@soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/464 中修复 [<samp>(59faf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/59faf15)
- **样式**:
- 修复 FirstLevelMenu 样式。修复了 #450 &nbsp;-&nbsp;@soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/450 中修复 [<samp>(db64b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/db64b0e)
- 修复 PinToggler 样式。修复了 #451 &nbsp;-&nbsp;@soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/451 中修复 [<samp>(42b12)</samp>](https://github.com/soybeanjs/soybean-admin/commit/42b121a)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **组件**: 提高 TableColumnSetting 的拖动区域精度,带有动画 &nbsp;-&nbsp;@orangelckc 在 https://github.com/soybeanjs/soybean-admin/issues/465 中优化 [<samp>(2aa85)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2aa85c6)
- **项目**: unocss 边框快捷方式 &nbsp;-&nbsp;@soybeanjs 优化 [<samp>(40d0f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/40d0f8a)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 更新 CHANGELOG &nbsp;-&nbsp;@soybeanjs 更新 [<samp>(87b18)</samp>](https://github.com/soybeanjs/soybean-admin/commit/87b1838)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **其他**:
- 纠正拼写错误 &nbsp;-&nbsp;@orangelckc 在 https://github.com/soybeanjs/soybean-admin/issues/460 中纠正 [<samp>(086ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/086bad4)
- 纠正拼写错误 &nbsp;-&nbsp;@Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/462 中纠正 [<samp>(f1850)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f185041)
- **项目**:
- 更新 vscode launch.json &nbsp;-&nbsp;@soybeanjs 更新 [<samp>(4c1c7)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4c1c7e6)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;[![orangelckc](https://github.com/orangelckc.png?size=48)](https://github.com/orangelckc)&nbsp;&nbsp;
## [v1.1.2](https://github.com/soybeanjs/soybean-admin/compare/v1.1.1...v1.1.2) (2024-05-24)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **项目**:
- 修复头部样式 & 修复点击全局标签时按钮高亮。修复了 #446 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/446 [<samp>(64fc0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/64fc099)
- 修复多标签页只渲染一次。修复了 #441 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/441 [<samp>(e379d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e379d6c)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**: 优化代码 &nbsp;-&nbsp;@honghuangdc [<samp>(bc8dc)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bc8dc47)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
## [v1.1.1](https://github.com/soybeanjs/soybean-admin/compare/v1.1.0...v1.1.1) (2024-05-20)
### &nbsp;&nbsp;&nbsp;🚀 功能
- **hooks**: 为 useEcharts 添加 setOptions &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(e4d53)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e4d53aa)
### &nbsp;&nbsp;&nbsp;🐞 修复错误
- **projects**:
- 修复 useRouter。修复了 #436 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/436 提交 [<samp>(0774a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/0774a51)
- 在动态路由模式下获取路由时添加错误处理。修复了 440 &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(57b4a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/57b4a9d)
- **styles**:
- 修复 useTable 类型 &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(07124)</samp>](https://github.com/soybeanjs/soybean-admin/commit/071241f)
### &nbsp;&nbsp;&nbsp;📖 文档
- **projects**:
- 更新 CHANGELOG &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(19783)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1978397)
- 更新 README.md &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(fa56e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/fa56e9c)
- 更新 README.md &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(419ea)</samp>](https://github.com/soybeanjs/soybean-admin/commit/419ea42)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **projects**:
- 更新依赖并修复 TS 错误 &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(4ea9c)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4ea9c85)
- 更新 eslint-config 并修复代码 &nbsp;-&nbsp;@honghuangdc 提交 [<samp>(68ea9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/68ea974)
- 更新 @elegant-router/vue 并为 resolve route 添加错误处理。修复了 #442 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/442 提交 [<samp>(24ff8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/24ff852)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
## [v1.1.0](https://github.com/honghuangdc/soybean-admin/compare/v1.0.9...v1.1.0) (2024-05-07)
### &nbsp;&nbsp;&nbsp;🚀 功能
- **项目**:
- 支持灰度。修复了 #385 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/385 [<samp>(d335d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d335df6)
- 添加前缀到本地存储 &nbsp;-&nbsp;**Azir** [<samp>(1fc34)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1fc34cc)
- 添加表格显示总数选项 &nbsp;-&nbsp;**paynezhuang** [<samp>(3e61e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/3e61eab)
- 添加推荐颜色切换。关闭了 #388 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/388 [<samp>(a1920)</samp>](https://github.com/honghuangdc/soybean-admin/commit/a1920fc)
- 添加菜单路由字段 &nbsp;-&nbsp;**paynezhuang** [<samp>(dbe31)</samp>](https://github.com/honghuangdc/soybean-admin/commit/dbe31eb)
- 支持短时间内重复请求错误只出现一次。关闭了 #368, 关闭了 #369 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/368 和 https://github.com/honghuangdc/soybean-admin/issues/369 [<samp>(e3bd3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e3bd397)
- 通过鼠标滚轮按钮点击关闭标签 &nbsp;-&nbsp;**JianJroh** [<samp>(d3849)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d3849ba)
- 页面:支持管理菜单更多选项。关闭了 #366 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/366 [<samp>(c4b5c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/c4b5c65)
- useTable 添加展开显示 &nbsp;-&nbsp;**paynezhuang** [<samp>(0a90d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/0a90dd3)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **项目**:
- 菜单 fixedIndexInTab 默认为 null &nbsp;-&nbsp;**paynezhuang** [<samp>(3d10e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/3d10ef1)
- 修复菜单切换器 zIndex &nbsp;-&nbsp;@honghuangdc [<samp>(7bd43)</samp>](https://github.com/honghuangdc/soybean-admin/commit/7bd43df)
- 修复管理菜单模态样式 &nbsp;-&nbsp;@honghuangdc [<samp>(60f3b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/60f3b14)
- 当角色改变时修复菜单数据。修复了 #391 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/391 [<samp>(3b47b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/3b47b5a)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**: 移除废弃的代码 &nbsp;-&nbsp;@honghuangdc [<samp>(72ccb)</samp>](https://github.com/honghuangdc/soybean-admin/commit/72ccb6b)
### &nbsp;&nbsp;&nbsp;💅 重构
- **项目**:
- 重构 @sa/color-palette => @sa/color & 优化 @sa/utils 代码 &nbsp;-&nbsp;@honghuangdc [<samp>(34999)</samp>](https://github.com/honghuangdc/soybean-admin/commit/3499997)
- menu-operate-drawer => menu-operate-modal &nbsp;-&nbsp;@honghuangdc [<samp>(003e1)</samp>](https://github.com/honghuangdc/soybean-admin/commit/003e145)
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**:
- 添加 CHANGELOG.zh_CN.md &nbsp;-&nbsp;@honghuangdc [<samp>(18b3f)</samp>](https://github.com/honghuangdc/soybean-admin/commit/18b3f05)
- 更新 CHANGELOG &nbsp;-&nbsp;@honghuangdc [<samp>(4d17c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/4d17cfd)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **依赖**:
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(1cb38)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1cb3816)
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(599b4)</samp>](https://github.com/honghuangdc/soybean-admin/commit/599b4e1)
- **项目**:
- 合并 main 到 v1.1.0 &nbsp;-&nbsp;@honghuangdc [<samp>(ebe55)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ebe55af)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
[paynezhuang](mailto:paynezhuang@gmail.com),&nbsp;[JianJroh](mailto:rhjian@foxmail.com),&nbsp;[Azir](mailto:2075125282@qq.com)
## [v1.1.0-beta.2](https://github.com/honghuangdc/soybean-admin/compare/v1.1.0-beta.1...v1.1.0-beta.2) (2024-05-07)
### &nbsp;&nbsp;&nbsp;🚀 特性
- **项目**: useTable添加展开以显示 &nbsp;-&nbsp;**paynezhuang** [<samp>(0a90d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/0a90dd3) 提供
### &nbsp;&nbsp;&nbsp;🐞 修复的错误
- **项目**:
- 修复 manage_menu 模态样式 &nbsp;-&nbsp;@honghuangdc [<samp>(60f3b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/60f3b14) 提供
- 当角色改变时修复菜单数据。修复了 #391 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/391 [<samp>(3b47b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/3b47b5a) 提供
### &nbsp;&nbsp;&nbsp;🛠 优化
- **项目**: 删除废弃的代码 &nbsp;-&nbsp;@honghuangdc [<samp>(72ccb)</samp>](https://github.com/honghuangdc/soybean-admin/commit/72ccb6b) 提供
### &nbsp;&nbsp;&nbsp;📖 文档
- **项目**: 添加 CHANGELOG.zh_CN.md &nbsp;-&nbsp;@honghuangdc [<samp>(18b3f)</samp>](https://github.com/honghuangdc/soybean-admin/commit/18b3f05) 提供
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
[paynezhuang](mailto:paynezhuang@gmail.com)
## [v1.1.0-beta.1](https://github.com/soybeanjs/soybean-admin/compare/v1.0.9...v1.1.0-beta.1) (2024-05-07)
### &nbsp;&nbsp;&nbsp;🚀 功能
- **项目**:
- 支持灰度。修复了 #385 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/385 [<samp>(d335d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/d335df6)
- 添加前缀到本地存储 &nbsp;-&nbsp;**Azir** [<samp>(1fc34)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1fc34cc)
- 添加表格 showTotal 选项 &nbsp;-&nbsp;**paynezhuang** [<samp>(3e61e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3e61eab)
- 添加推荐颜色切换。关闭了 #388 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/388 [<samp>(a1920)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a1920fc)
- 添加菜单路由字段 &nbsp;-&nbsp;**paynezhuang** [<samp>(dbe31)</samp>](https://github.com/soybeanjs/soybean-admin/commit/dbe31eb)
- 支持短时间内重复请求错误只发生一次。关闭了 #368, 关闭了 #369 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/368 和 https://github.com/soybeanjs/soybean-admin/issues/369 [<samp>(e3bd3)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e3bd397)
- 通过鼠标滚轮按钮点击关闭标签 &nbsp;-&nbsp;**JianJroh** [<samp>(d3849)</samp>](https://github.com/soybeanjs/soybean-admin/commit/d3849ba)
- 页面:支持更多的 manage_menu 选项。关闭了 #366 &nbsp;-&nbsp;@honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/366 [<samp>(c4b5c)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c4b5c65)
### &nbsp;&nbsp;&nbsp;🐞 错误修复
- **项目**:
- 修复菜单 fixedIndexInTab 默认为 null &nbsp;-&nbsp;**paynezhuang** [<samp>(3d10e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3d10ef1)完成
- 修复菜单切换器 zIndex &nbsp;-&nbsp;@honghuangdc [<samp>(7bd43)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7bd43df)完成
### &nbsp;&nbsp;&nbsp;💅 重构
- **项目**:
- 重构 @sa/color-palette => @sa/color & 性能优化 @sa/utils &nbsp;-&nbsp;@honghuangdc [<samp>(34999)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3499997)完成
- menu-operate-drawer => menu-operate-modal &nbsp;-&nbsp;@honghuangdc [<samp>(003e1)</samp>](https://github.com/soybeanjs/soybean-admin/commit/003e145)完成
### &nbsp;&nbsp;&nbsp;🏡 杂务
- **依赖**:
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(1cb38)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1cb3816)完成
- 更新依赖 &nbsp;-&nbsp;@honghuangdc [<samp>(599b4)</samp>](https://github.com/soybeanjs/soybean-admin/commit/599b4e1)完成
- **项目**:
- 合并主分支到 v1.1.0 &nbsp;-&nbsp;@honghuangdc [<samp>(ebe55)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ebe55af)完成
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
[JianJroh](mailto:rhjian@foxmail.com),&nbsp;[paynezhuang](mailto:paynezhuang@gmail.com),&nbsp;[Azir](mailto:2075125282@qq.com)

View File

@ -1,16 +0,0 @@
ImageTag ?=v0.9.6
SoybeanAdminImg ?= soybeanjs/soybean-admin:$(ImageTag)
VERSION=$(shell git rev-parse --short HEAD)
soybean-admin: soybean-admin-build soybean-admin-push
soybean-admin-build:
docker build --build-arg version=$(VERSION) -t ${SoybeanAdminImg} -f docker/Dockerfile .
soybean-admin-push:
docker push ${SoybeanAdminImg}
# run tauri app:
run:
pnpm tauri dev

204
README.en_US.md Normal file
View File

@ -0,0 +1,204 @@
<div align="center">
<img src="./public/favicon.svg" width="160" />
<h1>SoybeanAdmin</h1>
<span><a href="./README.md">中文</a> | English</span>
</div>
---
[![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
[![github stars](https://img.shields.io/github/stars/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin)
[![github forks](https://img.shields.io/github/forks/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin)
[![gitee stars](https://gitee.com/honghuangdc/soybean-admin/badge/star.svg)](https://gitee.com/honghuangdc/soybean-admin)
[![gitcode star](https://gitcode.com/soybeanjs/soybean-admin/star/badge.svg)](https://gitcode.com/soybeanjs/soybean-admin)
<a href="https://hellogithub.com/repository/1298f27d5fe54959a16cf9686516ddb3" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=1298f27d5fe54959a16cf9686516ddb3&claim_uid=IiDXWmP4TEntjbV" alt="FeaturedHelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
> [!NOTE]
> If you think `SoybeanAdmin` is helpful to you, or you like our project, please give us a ⭐️ on GitHub. Your support is the driving force for us to continue to improve and add new features! Thank you for your support!
> [!NOTE]
> The `SoybeanAdmin` quick start series videos have been uploaded to [Bilibili](https://www.bilibili.com/video/BV1YKdRYXELC) Go online [click here](https://www.bilibili.com/video/BV1YKdRYXELC) Go check it out
> [!WARNING]
> `SoybeanAdmin` is planning to develop a `V2` version, see [plan list](https://github.com/soybeanjs/soybean-admin/issues/767)
## Introduction
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) is a clean, elegant, beautiful and powerful admin template, based on the latest front-end technology stack, including Vue3, Vite7, TypeScript, Pinia and UnoCSS. It has built-in rich theme configuration and components, strict code specifications, and an automated file routing system. In addition, it also uses the online mock data solution based on ApiFox. `SoybeanAdmin` provides you with a one-stop admin solution, no additional configuration, and out of the box. It is also a best practice for learning cutting-edge technologies quickly.
## Features
- **Cutting-edge technology application**: using the latest popular technology stack such as Vue3, Vite7, TypeScript, Pinia and UnoCSS.
- **Clear project architecture**: using pnpm monorepo architecture, clear structure, elegant and easy to understand.
- **Strict code specifications**: follow the [SoybeanJS specification](https://docs.soybeanjs.cn/standard), integrate eslint, prettier and simple-git-hooks to ensure the code is standardized.
- **TypeScript**: support strict type checking to improve code maintainability.
- **Rich theme configuration**: built-in a variety of theme configurations, perfectly integrated with UnoCSS.
- **Built-in internationalization solution**: easily realize multi-language support.
- **Automated file routing system**: automatically generate route import, declaration and type. For more details, please refer to [Elegant Router](https://github.com/soybeanjs/elegant-router).
- **Flexible permission routing**: support both front-end static routing and back-end dynamic routing.
- **Rich page components**: built-in a variety of pages and components, including 403, 404, 500 pages, as well as layout components, tag components, theme configuration components, etc.
- **Command line tool**: built-in efficient command line tool, git commit, delete file, release, etc.
- **Mobile adaptation**: perfectly support mobile terminal to realize adaptive layout.
## Version
- **NaiveUI Version:**
- [Preview Link](https://naive.soybeanjs.cn/)
- [Github Repository](https://github.com/soybeanjs/soybean-admin)
- [Gitee Repository](https://gitee.com/honghuangdc/soybean-admin)
- [Gitcode Repository](https://gitcode.com/soybeanjs/soybean-admin)
- **AntDesignVue Version:**
- [Preview Link](https://antd.soybeanjs.cn/)
- [Github Repository](https://github.com/soybeanjs/soybean-admin-antd)
- [Gitee Repository](https://gitee.com/honghuangdc/soybean-admin-antd)
- [Gitcode Repository](https://gitcode.com/soybeanjs/soybean-admin-antd)
- **ElementPlus Version:**
- [Preview Link](https://elp.soybeanjs.cn/)
- [Github Repository](https://github.com/soybeanjs/soybean-admin-element-plus)
- [Gitee Repository](https://gitee.com/honghuangdc/soybean-admin-element-plus)
- [Gitcode Repository](https://gitcode.com/soybeanjs/soybean-admin-element-plus)
- **Legacy Version:**
- [Preview Link](https://legacy.soybeanjs.cn/)
- [Github Repository](https://github.com/soybeanjs/soybean-admin/tree/legacy)
- [Gitee Repository](https://gitee.com/honghuangdc/soybean-admin/tree/legacy)
- [Gitcode Repository](https://gitcode.com/soybeanjs/soybean-admin/tree/legacy)
## Documentation
- [Link](https://docs.soybeanjs.cn)
- [Legacy Docs](https://legacy-docs.soybeanjs.cn)
## Example Images
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-01.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-02.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-03.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-04.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-05.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-06.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-07.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-08.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-09.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-10.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-mobile.png)
## Usage
**Environment Preparation**
Make sure your environment meets the following requirements:
- **git**: you need git to clone and manage project versions.
- **NodeJS**: >=20.19.0, recommended 20.19.0 or higher.
- **pnpm**: >= 10.5.0, recommended 10.5.0 or higher.
**Clone Project**
```bash
# github
git clone https://github.com/soybeanjs/soybean-admin.git
# gitee
git clone https://gitee.com/honghuangdc/soybean-admin.git
# gitcode
git clone https://gitcode.com/soybeanjs/soybean-admin.git
```
**Install Dependencies**
```bash
pnpm i
```
> Since this project uses the pnpm monorepo management method, please do not use npm or yarn to install dependencies.
**Start Project**
```bash
pnpm dev
```
**Build Project**
```bash
pnpm build
```
**Code Synchronization**
Refer to the [Code Synchronization](https://docs.soybeanjs.cn/guide/sync) document.
## Ecosystem
- [react-soybean-admin](https://github.com/mufeng889/react-soybean-admin): SoybeanAdmin based version of React.
- [electron-mock-admin](https://github.com/lixin59/electron-mock-api): A Mock Api management system that helps front-end developers quickly implement interface mocks.
- [T-Shell](https://github.com/TheBlindM/T-Shell): A terminal emulator and SSH client with configurable command prompts.
- [pea](https://github.com/haitang1894/pea) : Adopting SpringBoot3.2 + JDK21, MyBatis-Plus, SpringSecurity security framework, etc., suitable for the simple permission system developed by [soybean-admin](https://gitee.com/honghuangdc/soybean-admin).
- [MalusAdmin](https://github.com/pridejoy/MalusAdmin): A backend management framework developed based on Vue3/TypeScript/NaiveUI and NET7 & Sqlsugar. It is implemented in the most original and simplest way, with a fresh and elegant front-end, a clear and elegant backend structure, and powerful functions.
- [PanisAdmin](https://github.com/paynezhuang/panis-admin): Adopting SpringBoot 3, SaToken, MySQL and other frameworks to develop and modify [soybean-admin](https://github.com/soybeanjs/soybean-admin) for the second time, adapting dynamic menu/button-level authorization. Retaining the original flavor, fresh and elegant, high-value back-end management system scaffold.
- [snail-job](https://github.com/aizuda/snail-job): A distributed task retry and task scheduling platform with "high performance, high value and high activity".
- [SuperApi](https://github.com/TmmTop/SuperApi): Quickly turn your idea into an online stable product! Entity-less library and table building, add, delete, change and check entity-less library table, support 15 kinds of condition query, as well as paging, list, unlimited tree list and other functions of the API deployment! With interface documentation, Auth authorisation, interface flow restriction, access to the client's real IP, advanced server caching components, dynamic APIs and other features, we look forward to your experience!
- [FastSoyAdmin](https://github.com/sleep1223/fast-soy-admin): A modern Management Platform based on FastAPI+Vue3+Naive UI.
- [ba](https://github.com/xiatianYa/Ba-Server): Backend service docking with soybean admin based on goFrame framework, adapted to dynamic routing, and interface authentication permissions.
- [soybean-admin-go](https://github.com/WgoW/soybean-admin-go):A Go backend service developed based on the Gin and GORM frameworks, integrated with the example branch of Soybean Admin. It supports dynamic routing and API permission authentication.
## How to Contribute
We warmly welcome and appreciate all forms of contributions. If you have any ideas or suggestions, please feel free to share them by submitting [pull requests](https://github.com/soybeanjs/soybean-admin/pulls) or creating GitHub [issue](https://github.com/soybeanjs/soybean-admin/issues/new).
## Git Commit Guidelines
This project has built-in `commit` command, you can execute `pnpm commit` to generate commit information that conforms to [Conventional Commits](https://www.conventionalcommits.org/) specification. When submitting PR, please be sure to use `commit` command to create commit information to ensure the standardization of information.
## Browser Support
It is recommended to use the latest version of Chrome in development for a better experience.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) |
| --- | --- | --- | --- | --- |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## OpenSource Author
[Soybean](https://github.com/honghuangdc)
## Contributors
Thanks the following people for their contributions. If you want to contribute to this project, please refer to [How to Contribute](#how-to-contribute).
<a href="https://github.com/soybeanjs/soybean-admin/graphs/contributors">
<img src="https://contrib.rocks/image?repo=soybeanjs/soybean-admin" />
</a>
## Communication
`SoybeanAdmin` is a completely open source and free project, helping developers to develop medium and large-scale management systems more conveniently. It also provides WeChat and QQ communication groups. If you have any questions, please feel free to ask in the group.
<div>
<p>QQ Group</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-4.jpg" style="width:200px" />
</div>
<!-- <div>
<p>WeChat Group</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/picgo/soybean-admin-wechat-0620.jpg" style="width:200px" />
</div> -->
<div>
<p>Add the following WeChat to invite to the WeChat group</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/wechat-soybeanjs.jpg" style="width:200px" />
</div>
## Star Trend
[![Star History Chart](https://api.star-history.com/svg?repos=soybeanjs/soybean-admin&type=Date)](https://star-history.com/#soybeanjs/soybean-admin&Date)
## License
This project is based on the [MIT © 2021 Soybean](./LICENSE) protocol, for learning purposes only, please retain the author's copyright information for commercial use, the author does not guarantee and is not responsible for the software.

245
README.md
View File

@ -1,180 +1,231 @@
<div align="center">
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean.svg" style="width: 160px;"/>
<h1>Soybean Admin</h1>
<img src="./public/favicon.svg" width="160" />
<h1>SoybeanAdmin</h1>
<span>中文 | <a href="./README.en_US.md">English</a></span>
</div>
[![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) ![](https://img.shields.io/github/stars/honghuangdc/soybean-admin) ![](https://img.shields.io/github/forks/honghuangdc/soybean-admin)
---
[![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
[![github stars](https://img.shields.io/github/stars/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin)
[![github forks](https://img.shields.io/github/forks/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin)
[![gitee stars](https://gitee.com/honghuangdc/soybean-admin/badge/star.svg)](https://gitee.com/honghuangdc/soybean-admin)
[![gitcode star](https://gitcode.com/soybeanjs/soybean-admin/star/badge.svg)](https://gitcode.com/soybeanjs/soybean-admin)
<a href="https://hellogithub.com/repository/1298f27d5fe54959a16cf9686516ddb3" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=1298f27d5fe54959a16cf9686516ddb3&claim_uid=IiDXWmP4TEntjbV" alt="FeaturedHelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
> [!NOTE]
> 如果您觉得 `SoybeanAdmin`对您有所帮助,或者您喜欢我们的项目,请在 GitHub 上给我们一个 ⭐️。您的支持是我们持续改进和增加新功能的动力!感谢您的支持!
> [!NOTE]
> `SoybeanAdmin` 快速上手系列视频已在 [Bilibili](https://www.bilibili.com/video/BV1YKdRYXELC) 上线 [点击这里](https://www.bilibili.com/video/BV1YKdRYXELC) 前往查看
> [!WARNING]
> `SoybeanAdmin` 正在计划开发 `V2` 版本,详情见[计划清单](https://github.com/soybeanjs/soybean-admin/issues/767)
## 简介
[Soybean Admin](https://github.com/honghuangdc/soybean-admin) 是一个基于 Vue3、Vite3、TypeScript、NaiveUI、Pinia 和 UnoCSS 的清新优雅的中后台模版,它使用了最新流行的前端技术栈,内置丰富的主题配置,有着极高的代码规范,基于文件的路由系统以及基于 Mock 的动态权限路由,开箱即用的中后台前端解决方案,也可用于学习参考。
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite7, TypeScript, Pinia 和 UnoCSS。它内置了丰富的主题配置和组件代码规范严谨实现了自动化的文件路由系统。此外它还采用了基于 ApiFox 的在线Mock数据方案。`SoybeanAdmin` 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践
## 特性
- **最新流行技术栈**:使用 Vue3/Vite 等前端前沿技术开发, 使用高效率的 npm 包管理器 pnpm
- **TypeScript**: 应用程序级 JavaScript 的语言
- **主题**:丰富可配置的主题、暗黑模式,基于原子 css 框架 - UnoCss 的动态主题颜色
- **代码规范**:丰富的规范插件及极高的代码规范
- **文件路由系统**:基于文件的路由系统,根据页面文件自动生成路由声明、路由导入和路由模块
- **权限路由**:提供前端静态和后端动态两种路由模式,基于 mock 的动态路由能快速实现后端动态路由
- **请求函数**:基于 axios 的完善的请求函数封装,提供 Promise 和 hooks 两种请求函数,加入请求结果数据转换的适配器
- **前沿技术应用**:采用 Vue3, Vite7, TypeScript, Pinia 和 UnoCSS 等最新流行的技术栈。
- **清晰的项目架构**:采用 pnpm monorepo 架构,结构清晰,优雅易懂。
- **严格的代码规范**:遵循 [SoybeanJS 规范](https://docs.soybeanjs.cn/zh/standard)集成了eslint, prettier 和 simple-git-hooks保证代码的规范性。
- **TypeScript** 支持严格的类型检查,提高代码的可维护性。
- **丰富的主题配置**:内置多样的主题配置,与 UnoCSS 完美结合。
- **内置国际化方案**:轻松实现多语言支持。
- **自动化文件路由系统**:自动生成路由导入、声明和类型。更多细节请查看 [Elegant Router](https://github.com/soybeanjs/elegant-router)。
- **灵活的权限路由**:同时支持前端静态路由和后端动态路由。
- **丰富的页面组件**内置多样页面和组件包括403、404、500页面以及布局组件、标签组件、主题配置组件等。
- **命令行工具**内置高效的命令行工具git提交、删除文件、发布等。
- **移动端适配**:完美支持移动端,实现自适应布局。
## SoybeanJS 工具库
- [@soybeanjs/cli](https://github.com/soybeanjs/cli): SoybeanJS 命令行工具包含发布、git 和依赖等相关的实用命令
- [@soybeanjs/changelog](https://github.com/soybeanjs/changelog): 根据 git tags 和 commits 生成 changelog [示例](./CHANGELOG.md)
- [eslint-config-soybeanjs](https://github.com/soybeanjs/eslint-config): SoybeanJS 的 eslint 预设配置
- [@soybeanjs/materials](https://github.com/soybeanjs/materials): SoybeanJS 的物料仓库
- [@soybeanjs/vite-plugin-vue-page-route](https://github.com/soybeanjs/vite-plugin-vue-page-route): SoybeanAdmin 的路由插件
## 版本
## 基于 SoybeanAdmin 二次开发的项目
- **NaiveUI 版本:**
- [预览地址](https://naive.soybeanjs.cn/)
- [Github 仓库](https://github.com/soybeanjs/soybean-admin)
- [Gitee 仓库](https://gitee.com/honghuangdc/soybean-admin)
- [Gitcode 仓库](https://gitcode.com/soybeanjs/soybean-admin)
- **AntDesignVue 版本:**
- [预览地址](https://antd.soybeanjs.cn/)
- [Github 仓库](https://github.com/soybeanjs/soybean-admin-antd)
- [Gitee 仓库](https://gitee.com/honghuangdc/soybean-admin-antd)
- [Gitcode 仓库](https://gitcode.com/soybeanjs/soybean-admin-antd)
- **ElementPlus 版本:**
- [预览地址](https://elp.soybeanjs.cn/)
- [Github 仓库](https://github.com/soybeanjs/soybean-admin-element-plus)
- [Gitee 仓库](https://gitee.com/honghuangdc/soybean-admin-element-plus)
- [Gitcode 仓库](https://gitcode.com/soybeanjs/soybean-admin-element-plus)
- **旧版:**
- [预览地址](https://legacy.soybeanjs.cn/)
- [Github 仓库](https://github.com/soybeanjs/soybean-admin/tree/legacy)
- [Gitee 仓库](https://gitee.com/honghuangdc/soybean-admin/tree/legacy)
- [Gitcode 仓库](https://gitcode.com/soybeanjs/soybean-admin/tree/legacy)
- [electron-mock-admin](https://github.com/lixin59/electron-mock-api): 一个 Mock Api 管理系统,帮助前端开发伙伴快速实现接口的 mock。
- [T-Shell](https://github.com/TheBlindM/T-Shell): 是一个可配置命令提示的终端模拟器和 SSH 客户端。
## 在线预览
- [Soybean Admin 预览地址](https://soybean.pro/)
## 文档
- [项目文档预览地址](https://docs.soybean.pro)
- [地址](https://docs.soybeanjs.cn)
- [旧版文档](https://legacy-docs.soybeanjs.cn)
## 代码仓库
| 仓库 | github 地址 | gitee 镜像 | 预览 |
| -------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------- |
| soybean-admin | [github](https://github.com/honghuangdc/soybean-admin) | [gitee](https://gitee.com/honghuangdc/soybean-admin) | [预览](https://soybean.pro/) |
| tauri 版 | [tauri 版](https://github.com/honghuangdc/soybean-admin/tree/tauri) | [tauri 版](https://gitee.com/honghuangdc/soybean-admin/tree/tauri) | |
| 精简版 | [精简版](https://github.com/honghuangdc/soybean-admin/tree/thin) | [精简版](https://gitee.com/honghuangdc/soybean-admin/tree/thin) | |
| 集成 fast-crud | [集成 fast-crud](https://github.com/honghuangdc/soybean-admin/tree/fast-crud) | [集成 fast-crud](https://gitee.com/honghuangdc/soybean-admin/tree/fast-crud) | [预览](http://fast-crud.docmirror.cn/soybean/#/crud/demo) |
## 合作事项
## 更新日志
我们非常感谢大家对 [`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 的支持!为了进一步回馈社区,并助力企业和开发者实现个性化需求,我们现提供多种合作服务,期待与您携手共赢。
[CHANGELOG](./CHANGELOG.md)
##### 1、定制化管理后台开发
## 后端服务
针对企业和开发者的特定业务需求,我们提供基于 [`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 的定制化管理后台开发服务。我们的团队具备丰富的行业经验,能够迅速理解并实现您的需求,打造高效、灵活且安全的定制化解决方案。
- [soybean-admin-java](https://github.com/honghuangdc/soybean-admin-java)
- **定制开发**我们将根据您的具体需求提供从需求分析、UI设计到功能实现的全方位服务确保项目高效交付。
- **功能扩展**:在 [`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 基础上,扩展您所需的特定功能模块,提升管理后台的功能和用户体验。
## 项目示例图
##### 2、企业外包服务
![](https://s2.loli.net/2022/05/16/keOtgFH27r9nqYS.png)
我们承接各类企业级外包项目,特别是在管理后台系统的开发、集成与运维方面。我们以精益求精的态度,确保项目的质量和进度,为您的业务提供强有力的技术支持。
![](https://s2.loli.net/2022/05/18/bW7mftiQexkvSTG.png)
- **项目开发**:无论是全新的项目,还是现有系统的优化与集成,我们都将为您量身打造高效可靠的解决方案。
- **系统集成与维护**:我们也提供基于 [`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 的系统集成与长期维护服务,确保您的系统稳定、安全地运行。
![](https://s2.loli.net/2022/05/16/uV5nzjb3gYptAEl.png)
##### 3、联系方式
![](https://s2.loli.net/2022/05/16/rSnNHLdpuvkKxWq.png)
如有合作意向或项目咨询,请通过以下方式与我们联系:
![](https://s2.loli.net/2023/06/07/O39EKNa675FZIuS.png)
- **Email**: [soybeanjs@outlook.com](mailto:soybeanjs@outlook.com)
- **GitHub Issues**: 欢迎通过 [GitHub Issues](https://github.com/soybeanjs/soybean-admin/issues/new) 联系我们,进行初步的合作洽谈。
- **商务合作微信**: honghuangdc
![](https://s2.loli.net/2022/05/18/Mt6YZqmDxO8v4uR.png)
期待与您开展深入合作,共同推动 SoybeanAdmin 项目及其在更多领域的成功应用!
![](https://s2.loli.net/2023/06/07/zhmWnFlPTfDpot8.png)
![](https://s2.loli.net/2022/05/16/VPl6Ru1iCAhLcS4.png)
## 示例图片
![](https://s2.loli.net/2023/06/07/n6Dy1HXBvuPc9oT.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-01.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-02.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-03.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-04.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-05.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-06.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-07.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-08.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-09.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-10.png)
![](https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/soybean-admin-v1-mobile.png)
![](https://s2.loli.net/2022/06/07/rY8TyAftM5dxspv.png)
![](https://s2.loli.net/2022/06/07/5GNBAd31IzQVjLP.png)
## 使用
![](https://s2.loli.net/2022/06/07/rRSG6mEZpujOACT.png)
**环境准备**
<div align="center">
<img style="width:380px;margin-right:18px;border:1px solid #dedede;" src="https://s2.loli.net/2023/06/07/A5Nonc9vI6pB1lr.png" />
&nbsp;
<img style="width:380px;border:1px solid #dedede;" src="https://s2.loli.net/2023/06/07/VwBjqEhTke3OxXF.png" />
</div>
确保你的环境满足以下要求:
## 安装使用
- **git**: 你需要git来克隆和管理项目版本。
- **NodeJS**: >=20.19.0,推荐 20.19.0 或更高。
- **pnpm**: >= 10.5.0,推荐 10.5.0 或更高。
- 环境配置
**本地环境需要安装 pnpm 7.x 、Node.js 14.18+ 和 Git**
- 克隆代码
**克隆项目**
```bash
git clone https://github.com/honghuangdc/soybean-admin.git
# github
git clone https://github.com/soybeanjs/soybean-admin.git
# gitee
git clone https://gitee.com/honghuangdc/soybean-admin.git
# gitcode
git clone https://gitcode.com/soybeanjs/soybean-admin.git
```
- 安装依赖
**安装依赖**
```bash
pnpm i
```
> 由于本项目采用了 pnpm monorepo 的管理方式,因此请不要使用 npm 或 yarn 来安装依赖。
- 运行
**启动项目**
```bash
pnpm dev
```
- 打包
**构建项目**
```bash
pnpm build
```
## Docker 部署
**代码同步**
- Docker 部署 Soybean
参考 [代码同步](https://docs.soybeanjs.cn/zh/guide/sync) 文档。
```bash
docker run --name soybean -p 80:80 -d soybeanjs/soybean-admin:v0.9.6
```
## 周边生态
- 访问 SoybeanAdmin
- [react-soybean-admin](https://github.com/mufeng889/react-soybean-admin): 基于SoybeanAdmin的React版本.
- [electron-mock-admin](https://github.com/lixin59/electron-mock-api): 一个 Mock Api 管理系统,帮助前端开发伙伴快速实现接口的 mock。
- [T-Shell](https://github.com/TheBlindM/T-Shell): 是一个可配置命令提示的终端模拟器和 SSH 客户端。
- [pea](https://github.com/haitang1894/pea) : 采用SpringBoot3.2 + JDK21、MyBatis-Plus、SpringSecurity安全框架等适配 [soybean-admin](https://gitee.com/honghuangdc/soybean-admin) 开发的简单权限系统。
- [MalusAdmin](https://github.com/pridejoy/MalusAdmin): 基于 Vue3/TypeScript/NaiveUI 和 NET7 & Sqlsugar 开发的后台管理框架。采用最原生最简洁的方式来实现, 前端清新优雅高颜值,后端 结构清晰,优雅易懂,功能强大。
- [PanisAdmin](https://github.com/paynezhuang/panis-admin): 采用SpringBoot3、SaToken、MySQL等框架开发二次修改 [soybean-admin](https://github.com/soybeanjs/soybean-admin),适配动态菜单/按钮级别的鉴权,保留原汁原味、清新优雅、高颜值的后台管理系统脚手架。
- [snail-job](https://github.com/aizuda/snail-job): 一款兼具 “高性能、高颜值、高活跃” 的分布式任务重试和分布式任务调度平台。
- [SuperApi](https://github.com/TmmTop/SuperApi): 快速将你的 idea 变成线上稳定运行的产品! 无实体建库建表,对无实体库表进行增删改查,支持 15 种条件查询,以及分页,列表,无限级树形列表 等功能的 API 部署! 拥有接口文档Auth 授权,接口限流,获取客户端真实 IP先进的服务器缓存组件动态 API 等功能,期待您的体验!
- [FastSoyAdmin](https://github.com/sleep1223/fast-soy-admin): 基于 FastAPI+Vue3+Naive UI 的现代化轻量管理平台.
- [ba](https://github.com/xiatianYa/Ba-Server): 基于goFrame框架开发的后端服务对接soybean-admin,适配动态路由,接口鉴权限。
- [soybean-admin-go](https://github.com/WgoW/soybean-admin-go):基于gin+gorm框架开发的go语言后端服务对接soybean-admin的example分支,适配动态路由,接口鉴权限。
打开本地浏览器访问`http://localhost`
## 如何贡献
非常欢迎您的加入![提一个 Issue](https://github.com/honghuangdc/soybean-admin/issues/new) 或者提交一个 Pull Request。
我们热烈欢迎并感谢所有形式的贡献。如果您有任何想法或建议,欢迎通过提交 [pull requests](https://github.com/soybeanjs/soybean-admin/pulls) 或创建 GitHub [issue](https://github.com/soybeanjs/soybean-admin/issues/new) 来分享
## Git 贡献提交规范
## Git 提交规范
项目已经内置 Angular 提交规范,直接执行 commit 命令即可生成符合 Angular 提交规范的 commit。
本项目已内置 `commit` 命令,您可以通过执行 `pnpm commit` 来生成符合 [Conventional Commits]([conventionalcommits](https://www.conventionalcommits.org/)) 规范的提交信息。在提交PR时请务必使用 `commit` 命令来创建提交信息,以确保信息的规范性
项目已用 simple-git-hooks 代替了 husky, 旧版本用了 husky执行 pnpm soy init-git-hooks 进行初始化配置
## 浏览器支持
本地开发推荐使用`Chrome 90+` 浏览器
推荐使用最新版的 Chrome 浏览器进行开发,以获得更好的体验。
支持现代浏览器, 不支持 IE
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/) |
| --- | --- | --- | --- | --- |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## 开源作者
[@Soybean](https://github.com/honghuangdc)
[Soybean](https://github.com/honghuangdc)
## 贡献者
感谢以下贡献者的贡献。如果您想为本项目做出贡献,请参考 [如何贡献](#如何贡献)。
<a href="https://github.com/soybeanjs/soybean-admin/graphs/contributors">
<img src="https://contrib.rocks/image?repo=soybeanjs/soybean-admin" />
</a>
## 交流
`Soybean Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供微信和 QQ 交流群,使用问题欢迎在群内提问。
`SoybeanAdmin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供微信和 QQ 交流群,使用问题欢迎在群内提问。
<div style="display:flex;">
<div style="padding-right:24px;">
<p>QQ交流群</p>
<img src="https://i.loli.net/2021/11/24/1J6REWXiHomU2kM.jpg" style="width:200px" />
</div>
<div>
<p>添加本人微信,欢迎来技术交流,业务咨询</p>
<img src="https://s2.loli.net/2023/06/07/sVyCUFBvzQ9f5b7.jpg" style="width:200px" />
</div>
<div>
<p>QQ交流群</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-4.jpg" style="width:200px" />
</div>
<!-- <div>
<p>微信群</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/picgo/soybean-admin-wechat-0620.jpg" style="width:200px" />
</div> -->
<div>
<p>添加下面微信邀请进微信群</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/wechat-soybeanjs.jpg" style="width:200px" />
</div>
## 捐赠
## Star 趋势
如果你觉得这个项目对你有帮助,可以请 Soybean 喝杯饮料表示支持Soybean 开源的动力离不开各位的支持和鼓励。
[![Star History Chart](https://api.star-history.com/svg?repos=soybeanjs/soybean-admin&type=Date)](https://star-history.com/#soybeanjs/soybean-admin&Date)
![赞助](https://s2.loli.net/2022/01/24/i9cpq7lTCrKUoFf.png)
## 开源协议
## License
本项目基于[MIT © Soybean-2021](./LICENSE) 协议,仅供参考学习,商用时请保留作者的版权信息,作者不对软件做担保和负责。
项目基于 [MIT © 2021 Soybean](./LICENSE) 协议,仅供学习参考,商业使用请保留作者版权信息,作者不保证也不承担任何软件的使用风险。

View File

@ -1,8 +0,0 @@
import dayjs from 'dayjs';
/** 项目构建时间 */
const PROJECT_BUILD_TIME = JSON.stringify(dayjs().format('YYYY-MM-DD HH:mm:ss'));
export const viteDefine = {
PROJECT_BUILD_TIME
};

View File

@ -1,2 +1,2 @@
export * from './define';
export * from './proxy';
export * from './time';

View File

@ -1,19 +1,54 @@
import type { ProxyOptions } from 'vite';
import { bgRed, bgYellow, green, lightBlue } from 'kolorist';
import { consola } from 'consola';
import { createServiceConfig } from '../../src/utils/service';
/**
*
* @param isOpenProxy -
* @param envConfig - env环境配置
* Set http proxy
*
* @param env - The current env
* @param enable - If enable http proxy
*/
export function createViteProxy(isOpenProxy: boolean, envConfig: ServiceEnvConfigWithProxyPattern) {
if (!isOpenProxy) return undefined;
export function createViteProxy(env: Env.ImportMeta, enable: boolean) {
const isEnableHttpProxy = enable && env.VITE_HTTP_PROXY === 'Y';
const proxy: Record<string, string | ProxyOptions> = {
[envConfig.proxyPattern]: {
target: envConfig.url,
changeOrigin: true,
rewrite: path => path.replace(new RegExp(`^${envConfig.proxyPattern}`), '')
}
if (!isEnableHttpProxy) return undefined;
const isEnableProxyLog = env.VITE_PROXY_LOG === 'Y';
const { baseURL, proxyPattern, other } = createServiceConfig(env);
const proxy: Record<string, ProxyOptions> = createProxyItem({ baseURL, proxyPattern }, isEnableProxyLog);
other.forEach(item => {
Object.assign(proxy, createProxyItem(item, isEnableProxyLog));
});
return proxy;
}
function createProxyItem(item: App.Service.ServiceConfigItem, enableLog: boolean) {
const proxy: Record<string, ProxyOptions> = {};
proxy[item.proxyPattern] = {
target: item.baseURL,
changeOrigin: true,
configure: (_proxy, options) => {
_proxy.on('proxyReq', (_proxyReq, req, _res) => {
if (!enableLog) return;
const requestUrl = `${lightBlue('[proxy url]')}: ${bgYellow(` ${req.method} `)} ${green(`${item.proxyPattern}${req.url}`)}`;
const proxyUrl = `${lightBlue('[real request url]')}: ${green(`${options.target}${req.url}`)}`;
consola.log(`${requestUrl}\n${proxyUrl}`);
});
_proxy.on('error', (_err, req, _res) => {
if (!enableLog) return;
consola.log(bgRed(`Error: ${req.method} `), green(`${options.target}${req.url}`));
});
},
rewrite: path => path.replace(new RegExp(`^${item.proxyPattern}`), '')
};
return proxy;

12
build/config/time.ts Normal file
View File

@ -0,0 +1,12 @@
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import timezone from 'dayjs/plugin/timezone';
export function getBuildTime() {
dayjs.extend(utc);
dayjs.extend(timezone);
const buildTime = dayjs.tz(Date.now(), 'Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');
return buildTime;
}

View File

@ -1,3 +0,0 @@
export * from './plugins';
export * from './config';
export * from './utils';

View File

@ -1,6 +0,0 @@
import ViteCompression from 'vite-plugin-compression';
export default (viteEnv: ImportMetaEnv) => {
const { VITE_COMPRESS_TYPE = 'gzip' } = viteEnv;
return ViteCompression({ algorithm: VITE_COMPRESS_TYPE });
};

View File

@ -0,0 +1,9 @@
import VueDevtools from 'vite-plugin-vue-devtools';
export function setupDevtoolsPlugin(viteEnv: Env.ImportMeta) {
const { VITE_DEVTOOLS_LAUNCH_EDITOR } = viteEnv;
return VueDevtools({
launchEditor: VITE_DEVTOOLS_LAUNCH_EDITOR
});
}

13
build/plugins/html.ts Normal file
View File

@ -0,0 +1,13 @@
import type { Plugin } from 'vite';
export function setupHtmlPlugin(buildTime: string) {
const plugin: Plugin = {
name: 'html-plugin',
apply: 'build',
transformIndexHtml(html) {
return html.replace('<head>', `<head>\n <meta name="buildTime" content="${buildTime}">`);
}
};
return plugin;
}

View File

@ -1,47 +1,24 @@
import type { PluginOption } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import unocss from '@unocss/vite';
import progress from 'vite-plugin-progress';
import VueDevtools from 'vite-plugin-vue-devtools';
import pageRoute from '@soybeanjs/vite-plugin-vue-page-route';
import unplugin from './unplugin';
import mock from './mock';
import visualizer from './visualizer';
import compress from './compress';
import pwa from './pwa';
import { setupElegantRouter } from './router';
import { setupUnocss } from './unocss';
import { setupUnplugin } from './unplugin';
import { setupHtmlPlugin } from './html';
import { setupDevtoolsPlugin } from './devtools';
/**
* vite插件
* @param viteEnv -
*/
export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | PluginOption[])[] {
const plugins = [
vue({
script: {
defineModel: true
}
}),
export function setupVitePlugins(viteEnv: Env.ImportMeta, buildTime: string) {
const plugins: PluginOption = [
vue(),
vueJsx(),
VueDevtools(),
...unplugin(viteEnv),
unocss(),
mock(viteEnv),
progress()
setupDevtoolsPlugin(viteEnv),
setupElegantRouter(),
setupUnocss(viteEnv),
...setupUnplugin(viteEnv),
progress(),
setupHtmlPlugin(buildTime)
];
if (viteEnv.VITE_VISUALIZER === 'Y') {
plugins.push(visualizer as PluginOption);
}
if (viteEnv.VITE_COMPRESS === 'Y') {
plugins.push(compress(viteEnv));
}
if (viteEnv.VITE_PWA === 'Y' || viteEnv.VITE_VERCEL === 'Y') {
plugins.push(pwa());
}
if (viteEnv.VITE_SOYBEAN_ROUTE_PLUGIN === 'Y') {
plugins.push(pageRoute());
}
return plugins;
}

View File

@ -1,14 +0,0 @@
import { viteMockServe } from 'vite-plugin-mock';
export default (viteEnv: ImportMetaEnv) => {
const prodMock = viteEnv.VITE_PROD_MOCK === 'Y';
return viteMockServe({
mockPath: 'mock',
prodEnabled: prodMock,
injectCode: `
import { setupMockServer } from '../mock';
setupMockServer();
`
});
};

View File

@ -1,31 +0,0 @@
import { VitePWA } from 'vite-plugin-pwa';
export default function setupVitePwa() {
return VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico'],
manifest: {
name: 'SoybeanAdmin',
short_name: 'SoybeanAdmin',
theme_color: '#fff',
icons: [
{
src: '/logo.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/logo.png',
sizes: '512x512',
type: 'image/png'
},
{
src: '/logo.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
}
});
}

41
build/plugins/router.ts Normal file
View File

@ -0,0 +1,41 @@
import type { RouteMeta } from 'vue-router';
import ElegantVueRouter from '@elegant-router/vue/vite';
import type { RouteKey } from '@elegant-router/types';
export function setupElegantRouter() {
return ElegantVueRouter({
layouts: {
base: 'src/layouts/base-layout/index.vue',
blank: 'src/layouts/blank-layout/index.vue'
},
routePathTransformer(routeName, routePath) {
const key = routeName as RouteKey;
if (key === 'login') {
const modules: UnionKey.LoginModule[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
const moduleReg = modules.join('|');
return `/login/:module(${moduleReg})?`;
}
return routePath;
},
onRouteMetaGen(routeName) {
const key = routeName as RouteKey;
const constantRoutes: RouteKey[] = ['login', '403', '404', '500'];
const meta: Partial<RouteMeta> = {
title: key,
i18nKey: `route.${key}` as App.I18n.I18nKey
};
if (constantRoutes.includes(key)) {
meta.constant = true;
}
return meta;
}
});
}

32
build/plugins/unocss.ts Normal file
View File

@ -0,0 +1,32 @@
import process from 'node:process';
import path from 'node:path';
import unocss from '@unocss/vite';
import presetIcons from '@unocss/preset-icons';
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders';
export function setupUnocss(viteEnv: Env.ImportMeta) {
const { VITE_ICON_PREFIX, VITE_ICON_LOCAL_PREFIX } = viteEnv;
const localIconPath = path.join(process.cwd(), 'src/assets/svg-icon');
/** The name of the local icon collection */
const collectionName = VITE_ICON_LOCAL_PREFIX.replace(`${VITE_ICON_PREFIX}-`, '');
return unocss({
presets: [
presetIcons({
prefix: `${VITE_ICON_PREFIX}-`,
scale: 1,
extraProperties: {
display: 'inline-block'
},
collections: {
[collectionName]: FileSystemIconLoader(localIconPath, svg =>
svg.replace(/^<svg\s/, '<svg width="1em" height="1em" ')
)
},
warn: true
})
]
});
}

View File

@ -1,21 +1,22 @@
import process from 'node:process';
import path from 'node:path';
import type { PluginOption } from 'vite';
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import Icons from 'unplugin-icons/vite';
import IconsResolver from 'unplugin-icons/resolver';
import Components from 'unplugin-vue-components/vite';
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
import { FileSystemIconLoader } from 'unplugin-icons/loaders';
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import { getSrcPath } from '../utils';
export default function unplugin(viteEnv: ImportMetaEnv) {
const { VITE_ICON_PREFFIX, VITE_ICON_LOCAL_PREFFIX } = viteEnv;
export function setupUnplugin(viteEnv: Env.ImportMeta) {
const { VITE_ICON_PREFIX, VITE_ICON_LOCAL_PREFIX } = viteEnv;
const srcPath = getSrcPath();
const localIconPath = `${srcPath}/assets/svg-icon`;
const localIconPath = path.join(process.cwd(), 'src/assets/svg-icon');
/** 本地svg图标集合名称 */
const collectionName = VITE_ICON_LOCAL_PREFFIX.replace(`${VITE_ICON_PREFFIX}-`, '');
/** The name of the local icon collection */
const collectionName = VITE_ICON_LOCAL_PREFIX.replace(`${VITE_ICON_PREFIX}-`, '');
return [
const plugins: PluginOption[] = [
Icons({
compiler: 'vue3',
customCollections: {
@ -31,14 +32,16 @@ export default function unplugin(viteEnv: ImportMetaEnv) {
types: [{ from: 'vue-router', names: ['RouterLink', 'RouterView'] }],
resolvers: [
NaiveUiResolver(),
IconsResolver({ customCollections: [collectionName], componentPrefix: VITE_ICON_PREFFIX })
IconsResolver({ customCollections: [collectionName], componentPrefix: VITE_ICON_PREFIX })
]
}),
createSvgIconsPlugin({
iconDirs: [localIconPath],
symbolId: `${VITE_ICON_LOCAL_PREFFIX}-[dir]-[name]`,
symbolId: `${VITE_ICON_LOCAL_PREFIX}-[dir]-[name]`,
inject: 'body-last',
customDomId: '__SVG_ICON_LOCAL__'
})
];
return plugins;
}

View File

@ -1,7 +0,0 @@
import { visualizer } from 'rollup-plugin-visualizer';
export default visualizer({
gzipSize: true,
brotliSize: true,
open: true
});

View File

@ -1,20 +0,0 @@
import path from 'path';
/**
*
* @descrition
*/
export function getRootPath() {
return path.resolve(process.cwd());
}
/**
* src路径
* @param srcName - src目录名称(: "src")
* @descrition
*/
export function getSrcPath(srcName = 'src') {
const rootPath = getRootPath();
return `${rootPath}/${srcName}`;
}

View File

@ -1,32 +0,0 @@
node_modules
.DS_Store
dist
.npmrc
.cache
tests/server/static
tests/server/static/upload
.local
# local env files
.env.local
.env.*.local
.eslintcache
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
# .vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
yarn.lock
pnpm-lock.yaml
/vite-profile.cpuprofile

View File

@ -1,24 +0,0 @@
FROM node:16.17.0 as builder
ENV WORKDIR=/soybean-admin
WORKDIR $WORKDIR
COPY ./ $WORKDIR/
ARG version
ENV COMMITID=$version
RUN npm i -g pnpm
RUN pnpm install
RUN pnpm build
FROM nginx:alpine as prod
RUN mkdir /soybean
COPY --from=builder /soybean-admin/dist /soybean-admin
COPY --from=builder /soybean-admin/docker/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

View File

@ -1,54 +0,0 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
# 不缓存html防止程序更新后缓存继续生效
if ($request_filename ~* .*\.(?:htm|html)$) {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
access_log on;
}
root /soybean-admin/;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
# location /soybean/soybean-webserver/v1 {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header REMOTE-HOST $remote_addr;
# # 后台接口地址
# proxy_pass http://192.168.1.99:30597/v1;
# proxy_redirect default;
# add_header Access-Control-Allow-Origin *;
# add_header Access-Control-Allow-Headers X-Requested-With;
# add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
# }
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}

24
eslint.config.js Normal file
View File

@ -0,0 +1,24 @@
import { defineConfig } from '@soybeanjs/eslint-config';
export default defineConfig(
{ vue: true, unocss: true },
{
rules: {
'vue/multi-word-component-names': [
'warn',
{
ignores: ['index', 'App', 'Register', '[id]', '[url]']
}
],
'vue/component-name-in-template-casing': [
'warn',
'PascalCase',
{
registeredComponentsOnly: false,
ignores: ['/^icon-/']
}
],
'unocss/order-attributify': 'off'
}
}
);

View File

@ -1,15 +1,14 @@
<!DOCTYPE html>
<!doctype html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>%VITE_APP_NAME%</title>
</head>
<body>
<div id="app">
<div id="appLoading"></div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>%VITE_APP_TITLE%</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -1,128 +0,0 @@
import type { MockMethod } from 'vite-plugin-mock';
import { userModel } from '../model';
/** 参数错误的状态码 */
const ERROR_PARAM_CODE = 10000;
const ERROR_PARAM_MSG = '参数校验失败!';
const apis: MockMethod[] = [
// 获取验证码
{
url: '/mock/getSmsCode',
method: 'post',
response: (): Service.MockServiceResult<boolean> => {
return {
code: 200,
message: 'ok',
data: true
};
}
},
// 用户+密码 登录
{
url: '/mock/login',
method: 'post',
response: (options: Service.MockOption): Service.MockServiceResult<ApiAuth.Token | null> => {
const { userName = undefined, password = undefined } = options.body;
if (!userName || !password) {
return {
code: ERROR_PARAM_CODE,
message: ERROR_PARAM_MSG,
data: null
};
}
const findItem = userModel.find(item => item.userName === userName && item.password === password);
if (findItem) {
return {
code: 200,
message: 'ok',
data: {
token: findItem.token,
refreshToken: findItem.refreshToken
}
};
}
return {
code: 1000,
message: '用户名或密码错误!',
data: null
};
}
},
// 获取用户信息(请求头携带token, 根据token获取用户信息)
{
url: '/mock/getUserInfo',
method: 'get',
response: (options: Service.MockOption): Service.MockServiceResult<ApiAuth.UserInfo | null> => {
// 这里的mock插件得到的字段是authorization, 前端传递的是Authorization字段
const { authorization = '' } = options.headers;
const REFRESH_TOKEN_CODE = 66666;
if (!authorization) {
return {
code: REFRESH_TOKEN_CODE,
message: '用户已失效或不存在!',
data: null
};
}
const userInfo: Auth.UserInfo = {
userId: '',
userName: '',
userRole: 'user'
};
const isInUser = userModel.some(item => {
const flag = item.token === authorization;
if (flag) {
const { userId: itemUserId, userName, userRole } = item;
Object.assign(userInfo, { userId: itemUserId, userName, userRole });
}
return flag;
});
if (isInUser) {
return {
code: 200,
message: 'ok',
data: userInfo
};
}
return {
code: REFRESH_TOKEN_CODE,
message: '用户信息异常!',
data: null
};
}
},
{
url: '/mock/updateToken',
method: 'post',
response: (options: Service.MockOption): Service.MockServiceResult<ApiAuth.Token | null> => {
const { refreshToken = '' } = options.body;
const findItem = userModel.find(item => item.refreshToken === refreshToken);
if (findItem) {
return {
code: 200,
message: 'ok',
data: {
token: findItem.token,
refreshToken: findItem.refreshToken
}
};
}
return {
code: 3000,
message: '用户已失效或不存在!',
data: null
};
}
}
];
export default apis;

View File

@ -1,5 +0,0 @@
import auth from './auth';
import route from './route';
import management from './management';
export default [...auth, ...route, ...management];

View File

@ -1,33 +0,0 @@
import { mock } from 'mockjs';
import type { MockMethod } from 'vite-plugin-mock';
const apis: MockMethod[] = [
{
url: '/mock/getAllUserList',
method: 'post',
response: (): Service.MockServiceResult<ApiUserManagement.User[]> => {
const data = mock({
'list|1000': [
{
id: '@id',
userName: '@cname',
'age|18-56': 56,
'gender|1': ['0', '1', null],
phone:
/^[1](([3][0-9])|([4][01456789])|([5][012356789])|([6][2567])|([7][0-8])|([8][0-9])|([9][012356789]))[0-9]{8}$/,
'email|1': ['@email("qq.com")', null],
'userStatus|1': ['1', '2', '3', '4', null]
}
]
});
return {
code: 200,
message: 'ok',
data: data.list
};
}
}
];
export default apis;

View File

@ -1,29 +0,0 @@
import type { MockMethod } from 'vite-plugin-mock';
import { routeModel, userModel } from '../model';
const apis: MockMethod[] = [
{
url: '/mock/getUserRoutes',
method: 'post',
response: (options: Service.MockOption): Service.MockServiceResult => {
const { userId = undefined } = options.body;
const routeHomeName: AuthRoute.LastDegreeRouteKey = 'dashboard_analysis';
const role = userModel.find(item => item.userId === userId)?.userRole || 'user';
const filterRoutes = routeModel[role];
return {
code: 200,
message: 'ok',
data: {
routes: filterRoutes,
home: routeHomeName
}
};
}
}
];
export default apis;

View File

@ -1,6 +0,0 @@
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';
import api from './api';
export function setupMockServer() {
createProdMockServer(api);
}

View File

@ -1,40 +0,0 @@
interface UserModel extends Auth.UserInfo {
token: string;
refreshToken: string;
password: string;
}
export const userModel: UserModel[] = [
{
token: '__TOKEN_SOYBEAN__',
refreshToken: '__REFRESH_TOKEN_SOYBEAN__',
userId: '0',
userName: 'Soybean',
userRole: 'super',
password: 'soybean123'
},
{
token: '__TOKEN_SUPER__',
refreshToken: '__REFRESH_TOKEN_SUPER__',
userId: '1',
userName: 'Super',
userRole: 'super',
password: 'super123'
},
{
token: '__TOKEN_ADMIN__',
refreshToken: '__REFRESH_TOKEN_ADMIN__',
userId: '2',
userName: 'Admin',
userRole: 'admin',
password: 'admin123'
},
{
token: '__TOKEN_USER01__',
refreshToken: '__REFRESH_TOKEN_USER01__',
userId: '3',
userName: 'User01',
userRole: 'user',
password: 'user01123'
}
];

View File

@ -1,2 +0,0 @@
export * from './auth';
export * from './route';

File diff suppressed because it is too large Load Diff

View File

@ -1,133 +1,110 @@
{
"name": "soybean-admin",
"version": "0.10.3",
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
"type": "module",
"version": "1.3.15",
"description": "A fresh and elegant admin template, based on Vue3、Vite7、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite7、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
"author": {
"name": "Soybean",
"email": "honghuangdc@gmail.com",
"url": "https://github.com/honghuangdc"
"email": "soybeanjs@outlook.com",
"url": "https://github.com/soybeanjs"
},
"license": "MIT",
"homepage": "https://github.com/honghuangdc/soybean-admin",
"homepage": "https://github.com/soybeanjs/soybean-admin",
"repository": {
"url": "https://github.com/honghuangdc/soybean-admin.git"
"url": "https://github.com/soybeanjs/soybean-admin.git"
},
"bugs": {
"url": "https://github.com/honghuangdc/soybean-admin/issues"
"url": "https://github.com/soybeanjs/soybean-admin/issues"
},
"keywords": [
"Vue",
"Vue3",
"admin",
"admin-template",
"vue-admin",
"Vue3 admin ",
"vue-admin-template",
"Vite3",
"Vite",
"vite-admin",
"Vite7",
"TypeScript",
"TS",
"NaiveUI",
"naive-ui",
"naive-admin",
"NaiveUI-Admin",
"naive-ui-admin",
"ant-design-vue v4",
"UnoCSS"
],
"engines": {
"node": ">=20.19.0",
"pnpm": ">=10.5.0"
},
"scripts": {
"dev": "cross-env VITE_SERVICE_ENV=dev vite",
"dev:test": "cross-env VITE_SERVICE_ENV=test vite",
"dev:prod": "cross-env VITE_SERVICE_ENV=prod vite",
"build": "npm run typecheck && cross-env VITE_SERVICE_ENV=prod vite build",
"build:dev": "npm run typecheck && cross-env VITE_SERVICE_ENV=dev vite build",
"build:test": "npm run typecheck && cross-env VITE_SERVICE_ENV=test vite build",
"build:vercel": "cross-env VITE_HASH_ROUTE=Y VITE_VERCEL=Y vite build",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit --skipLibCheck",
"build": "vite build --mode prod",
"build:test": "vite build --mode test",
"cleanup": "sa cleanup",
"commit": "sa git-commit",
"commit:zh": "sa git-commit -l=zh-cn",
"dev": "vite --mode test",
"dev:prod": "vite --mode prod",
"gen-route": "sa gen-route",
"lint": "eslint . --fix",
"format": "soy prettier-write",
"commit": "soy git-commit",
"cleanup": "soy cleanup",
"update-pkg": "soy ncu",
"release": "soy release",
"tsx": "tsx",
"logo": "tsx ./scripts/logo.ts",
"prepare": "soy init-simple-git-hooks"
"prepare": "simple-git-hooks",
"preview": "vite preview",
"release": "sa release",
"typecheck": "vue-tsc --noEmit --skipLibCheck",
"update-pkg": "sa update-pkg"
},
"dependencies": {
"@antv/data-set": "0.11.8",
"@antv/g2": "4.2.10",
"@better-scroll/core": "2.5.1",
"@soybeanjs/vue-materials": "0.2.0",
"@vueuse/core": "10.1.2",
"axios": "1.4.0",
"@iconify/vue": "5.0.0",
"@sa/axios": "workspace:*",
"@sa/color": "workspace:*",
"@sa/hooks": "workspace:*",
"@sa/materials": "workspace:*",
"@sa/utils": "workspace:*",
"@vueuse/core": "13.9.0",
"clipboard": "2.0.11",
"colord": "2.9.3",
"crypto-js": "4.1.1",
"dayjs": "1.11.8",
"echarts": "5.4.2",
"form-data": "4.0.0",
"lodash-es": "4.17.21",
"naive-ui": "2.34.4",
"pinia": "2.1.4",
"print-js": "1.6.0",
"qs": "6.11.2",
"swiper": "9.4.1",
"ua-parser-js": "1.0.35",
"vditor": "3.9.3",
"vue": "3.3.4",
"vue-i18n": "9.2.2",
"vue-router": "4.2.2",
"vuedraggable": "4.1.0",
"wangeditor": "4.7.15",
"xgplayer": "3.0.4"
"dayjs": "1.11.18",
"defu": "6.1.4",
"echarts": "6.0.0",
"json5": "2.2.3",
"naive-ui": "2.43.1",
"nprogress": "0.2.0",
"pinia": "3.0.3",
"tailwind-merge": "3.3.1",
"vue": "3.5.21",
"vue-draggable-plus": "0.6.0",
"vue-i18n": "11.1.12",
"vue-router": "4.5.1"
},
"devDependencies": {
"@amap/amap-jsapi-types": "0.0.13",
"@iconify/json": "2.2.78",
"@iconify/vue": "4.1.1",
"@soybeanjs/cli": "0.6.2",
"@soybeanjs/vite-plugin-vue-page-route": "0.0.5",
"@types/bmapgl": "0.0.7",
"@types/crypto-js": "4.1.1",
"@types/node": "20.3.1",
"@types/qs": "6.9.7",
"@types/ua-parser-js": "0.7.36",
"@unocss/preset-uno": "0.53.1",
"@unocss/transformer-directives": "0.53.1",
"@unocss/vite": "0.53.1",
"@vitejs/plugin-vue": "4.2.3",
"@vitejs/plugin-vue-jsx": "3.0.1",
"cross-env": "7.0.3",
"eslint": "8.42.0",
"eslint-config-soybeanjs": "0.4.9",
"mockjs": "1.1.0",
"rollup-plugin-visualizer": "5.9.2",
"sass": "1.63.4",
"simple-git-hooks": "2.8.1",
"tsx": "3.12.7",
"typescript": "5.1.3",
"unplugin-icons": "0.16.3",
"unplugin-vue-components": "0.25.1",
"vite": "4.3.9",
"vite-plugin-compression": "0.5.1",
"vite-plugin-mock": "2.9.8",
"@elegant-router/vue": "0.3.8",
"@iconify/json": "2.2.385",
"@sa/scripts": "workspace:*",
"@sa/uno-preset": "workspace:*",
"@soybeanjs/eslint-config": "1.7.1",
"@types/node": "24.5.1",
"@types/nprogress": "0.2.3",
"@unocss/eslint-config": "66.5.1",
"@unocss/preset-icons": "66.5.1",
"@unocss/preset-uno": "66.5.1",
"@unocss/transformer-directives": "66.5.1",
"@unocss/transformer-variant-group": "66.5.1",
"@unocss/vite": "66.5.1",
"@vitejs/plugin-vue": "6.0.1",
"@vitejs/plugin-vue-jsx": "5.1.1",
"consola": "3.4.2",
"eslint": "9.35.0",
"eslint-plugin-vue": "10.4.0",
"kolorist": "1.8.0",
"sass": "1.92.1",
"simple-git-hooks": "2.13.1",
"tsx": "4.20.5",
"typescript": "5.9.2",
"unplugin-icons": "22.3.0",
"unplugin-vue-components": "29.0.0",
"vite": "7.1.5",
"vite-plugin-progress": "0.0.7",
"vite-plugin-pwa": "0.16.4",
"vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-devtools": "0.2.0",
"vue-tsc": "1.6.5"
},
"pnpm": {
"patchedDependencies": {
"mockjs@1.1.0": "patches/mockjs@1.1.0.patch"
}
"vite-plugin-vue-devtools": "8.0.2",
"vue-eslint-parser": "10.2.0",
"vue-tsc": "3.0.7"
},
"simple-git-hooks": {
"commit-msg": "pnpm soy git-commit-verify",
"pre-commit": "pnpm typecheck && pnpm soy lint-staged"
"commit-msg": "pnpm sa git-commit-verify",
"pre-commit": "pnpm typecheck && pnpm lint && git diff --exit-code"
},
"soybean": {
"useSoybeanToken": true
}
"website": "https://admin.soybeanjs.cn"
}

View File

@ -0,0 +1,20 @@
{
"name": "@sa/alova",
"version": "1.3.15",
"exports": {
".": "./src/index.ts",
"./fetch": "./src/fetch.ts",
"./client": "./src/client.ts",
"./mock": "./src/mock.ts"
},
"typesVersions": {
"*": {
"*": ["./src/*"]
}
},
"dependencies": {
"@alova/mock": "2.0.17",
"@sa/utils": "workspace:*",
"alova": "3.3.4"
}
}

View File

@ -0,0 +1 @@
export * from 'alova/client';

View File

@ -0,0 +1,2 @@
/** the backend error code key */
export const BACKEND_ERROR_CODE = 'BACKEND_ERROR';

View File

@ -0,0 +1,2 @@
import adapterFetch from 'alova/fetch';
export default adapterFetch;

View File

@ -0,0 +1,77 @@
import { createAlova } from 'alova';
import type { AlovaDefaultCacheAdapter, AlovaGenerics, AlovaGlobalCacheAdapter, AlovaRequestAdapter } from 'alova';
import VueHook from 'alova/vue';
import type { VueHookType } from 'alova/vue';
import adapterFetch from 'alova/fetch';
import { createServerTokenAuthentication } from 'alova/client';
import type { FetchRequestInit } from 'alova/fetch';
import { BACKEND_ERROR_CODE } from './constant';
import type { CustomAlovaConfig, RequestOptions } from './type';
export const createAlovaRequest = <
RequestConfig = FetchRequestInit,
ResponseType = Response,
ResponseHeader = Headers,
L1Cache extends AlovaGlobalCacheAdapter = AlovaDefaultCacheAdapter,
L2Cache extends AlovaGlobalCacheAdapter = AlovaDefaultCacheAdapter
>(
customConfig: CustomAlovaConfig<
AlovaGenerics<any, any, RequestConfig, ResponseType, ResponseHeader, L1Cache, L2Cache, any>
>,
options: RequestOptions<AlovaGenerics<any, any, RequestConfig, ResponseType, ResponseHeader, L1Cache, L2Cache, any>>
) => {
const { tokenRefresher } = options;
const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthentication<
VueHookType,
AlovaRequestAdapter<RequestConfig, ResponseType, ResponseHeader>
>({
refreshTokenOnSuccess: {
isExpired: (response, method) => tokenRefresher?.isExpired(response, method) || false,
handler: async (response, method) => tokenRefresher?.handler(response, method)
},
refreshTokenOnError: {
isExpired: (response, method) => tokenRefresher?.isExpired(response, method) || false,
handler: async (response, method) => tokenRefresher?.handler(response, method)
}
});
const instance = createAlova({
...customConfig,
timeout: customConfig.timeout ?? 10 * 1000,
requestAdapter: (customConfig.requestAdapter as any) ?? adapterFetch(),
statesHook: VueHook,
beforeRequest: onAuthRequired(options.onRequest as any),
responded: onResponseRefreshToken({
onSuccess: async (response, method) => {
// check if http status is success
let error: any = null;
let transformedData: any = null;
try {
if (await options.isBackendSuccess(response)) {
transformedData = await options.transformBackendResponse(response);
} else {
error = new Error('the backend request error');
error.code = BACKEND_ERROR_CODE;
}
} catch (err) {
error = err;
}
if (error) {
await options.onError?.(error, response, method);
throw error;
}
return transformedData;
},
onComplete: options.onComplete,
onError: (error, method) => options.onError?.(error, null, method)
})
});
return instance;
};
export { BACKEND_ERROR_CODE };
export type * from './type';
export type * from 'alova';

View File

@ -0,0 +1 @@
export * from '@alova/mock';

View File

@ -0,0 +1,52 @@
import type { AlovaGenerics, AlovaOptions, AlovaRequestAdapter, Method, ResponseCompleteHandler } from 'alova';
export type CustomAlovaConfig<AG extends AlovaGenerics> = Omit<
AlovaOptions<AG>,
'statesHook' | 'beforeRequest' | 'responded' | 'requestAdapter'
> & {
/** request adapter. all request of alova will be sent by it. */
requestAdapter?: AlovaRequestAdapter<AG['RequestConfig'], AG['Response'], AG['ResponseHeader']>;
};
export interface RequestOptions<AG extends AlovaGenerics> {
/**
* The hook before request
*
* For example: You can add header token in this hook
*
* @param method alova Method Instance
*/
onRequest?: AlovaOptions<AG>['beforeRequest'];
/**
* The hook to check backend response is success or not
*
* @param response alova response
*/
isBackendSuccess: (response: AG['Response']) => Promise<boolean>;
/** The config to refresh token */
tokenRefresher?: {
/** detect the token is expired */
isExpired(response: AG['Response'], Method: Method<AG>): Promise<boolean> | boolean;
/** refresh token handler */
handler(response: AG['Response'], Method: Method<AG>): Promise<void>;
};
/** The hook after backend request complete */
onComplete?: ResponseCompleteHandler<AG>;
/**
* The hook to handle error
*
* For example: You can show error message in this hook
*
* @param error
*/
onError?: (error: any, response: AG['Response'] | null, methodInstance: Method<AG>) => any | Promise<any>;
/**
* transform backend response when the responseType is json
*
* @param response alova response
*/
transformBackendResponse: (response: AG['Response']) => any;
}

View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

View File

@ -0,0 +1,21 @@
{
"name": "@sa/axios",
"version": "1.3.15",
"exports": {
".": "./src/index.ts"
},
"typesVersions": {
"*": {
"*": ["./src/*"]
}
},
"dependencies": {
"@sa/utils": "workspace:*",
"axios": "1.12.2",
"axios-retry": "4.5.0",
"qs": "6.14.0"
},
"devDependencies": {
"@types/qs": "6.14.0"
}
}

View File

@ -0,0 +1,5 @@
/** request id key */
export const REQUEST_ID_KEY = 'X-Request-Id';
/** the backend error code key */
export const BACKEND_ERROR_CODE = 'BACKEND_ERROR';

186
packages/axios/src/index.ts Normal file
View File

@ -0,0 +1,186 @@
import axios, { AxiosError } from 'axios';
import type { AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from 'axios';
import axiosRetry from 'axios-retry';
import { nanoid } from '@sa/utils';
import { createAxiosConfig, createDefaultOptions, createRetryOptions } from './options';
import { transformResponse } from './shared';
import { BACKEND_ERROR_CODE, REQUEST_ID_KEY } from './constant';
import type {
CustomAxiosRequestConfig,
FlatRequestInstance,
MappedType,
RequestInstance,
RequestOption,
ResponseType
} from './type';
function createCommonRequest<ResponseData = any>(
axiosConfig?: CreateAxiosDefaults,
options?: Partial<RequestOption<ResponseData>>
) {
const opts = createDefaultOptions<ResponseData>(options);
const axiosConf = createAxiosConfig(axiosConfig);
const instance = axios.create(axiosConf);
const abortControllerMap = new Map<string, AbortController>();
// config axios retry
const retryOptions = createRetryOptions(axiosConf);
axiosRetry(instance, retryOptions);
instance.interceptors.request.use(conf => {
const config: InternalAxiosRequestConfig = { ...conf };
// set request id
const requestId = nanoid();
config.headers.set(REQUEST_ID_KEY, requestId);
// config abort controller
if (!config.signal) {
const abortController = new AbortController();
config.signal = abortController.signal;
abortControllerMap.set(requestId, abortController);
}
// handle config by hook
const handledConfig = opts.onRequest?.(config) || config;
return handledConfig;
});
instance.interceptors.response.use(
async response => {
const responseType: ResponseType = (response.config?.responseType as ResponseType) || 'json';
await transformResponse(response);
if (responseType !== 'json' || opts.isBackendSuccess(response)) {
return Promise.resolve(response);
}
const fail = await opts.onBackendFail(response, instance);
if (fail) {
return fail;
}
const backendError = new AxiosError<ResponseData>(
'the backend request error',
BACKEND_ERROR_CODE,
response.config,
response.request,
response
);
await opts.onError(backendError);
return Promise.reject(backendError);
},
async (error: AxiosError<ResponseData>) => {
await opts.onError(error);
return Promise.reject(error);
}
);
function cancelRequest(requestId: string) {
const abortController = abortControllerMap.get(requestId);
if (abortController) {
abortController.abort();
abortControllerMap.delete(requestId);
}
}
function cancelAllRequest() {
abortControllerMap.forEach(abortController => {
abortController.abort();
});
abortControllerMap.clear();
}
return {
instance,
opts,
cancelRequest,
cancelAllRequest
};
}
/**
* create a request instance
*
* @param axiosConfig axios config
* @param options request options
*/
export function createRequest<ResponseData = any, State = Record<string, unknown>>(
axiosConfig?: CreateAxiosDefaults,
options?: Partial<RequestOption<ResponseData>>
) {
const { instance, opts, cancelRequest, cancelAllRequest } = createCommonRequest<ResponseData>(axiosConfig, options);
const request: RequestInstance<State> = async function request<T = any, R extends ResponseType = 'json'>(
config: CustomAxiosRequestConfig
) {
const response: AxiosResponse<ResponseData> = await instance(config);
const responseType = response.config?.responseType || 'json';
if (responseType === 'json') {
return opts.transformBackendResponse(response);
}
return response.data as MappedType<R, T>;
} as RequestInstance<State>;
request.cancelRequest = cancelRequest;
request.cancelAllRequest = cancelAllRequest;
request.state = {} as State;
return request;
}
/**
* create a flat request instance
*
* The response data is a flat object: { data: any, error: AxiosError }
*
* @param axiosConfig axios config
* @param options request options
*/
export function createFlatRequest<ResponseData = any, State = Record<string, unknown>>(
axiosConfig?: CreateAxiosDefaults,
options?: Partial<RequestOption<ResponseData>>
) {
const { instance, opts, cancelRequest, cancelAllRequest } = createCommonRequest<ResponseData>(axiosConfig, options);
const flatRequest: FlatRequestInstance<State, ResponseData> = async function flatRequest<
T = any,
R extends ResponseType = 'json'
>(config: CustomAxiosRequestConfig) {
try {
const response: AxiosResponse<ResponseData> = await instance(config);
const responseType = response.config?.responseType || 'json';
if (responseType === 'json') {
const data = opts.transformBackendResponse(response);
return { data, error: null, response };
}
return { data: response.data as MappedType<R, T>, error: null };
} catch (error) {
return { data: null, error, response: (error as AxiosError<ResponseData>).response };
}
} as FlatRequestInstance<State, ResponseData>;
flatRequest.cancelRequest = cancelRequest;
flatRequest.cancelAllRequest = cancelAllRequest;
flatRequest.state = {} as State;
return flatRequest;
}
export { BACKEND_ERROR_CODE, REQUEST_ID_KEY };
export type * from './type';
export type { CreateAxiosDefaults, AxiosError };

View File

@ -0,0 +1,48 @@
import type { CreateAxiosDefaults } from 'axios';
import type { IAxiosRetryConfig } from 'axios-retry';
import { stringify } from 'qs';
import { isHttpSuccess } from './shared';
import type { RequestOption } from './type';
export function createDefaultOptions<ResponseData = any>(options?: Partial<RequestOption<ResponseData>>) {
const opts: RequestOption<ResponseData> = {
onRequest: async config => config,
isBackendSuccess: _response => true,
onBackendFail: async () => {},
transformBackendResponse: async response => response.data,
onError: async () => {}
};
Object.assign(opts, options);
return opts;
}
export function createRetryOptions(config?: Partial<CreateAxiosDefaults>) {
const retryConfig: IAxiosRetryConfig = {
retries: 0
};
Object.assign(retryConfig, config);
return retryConfig;
}
export function createAxiosConfig(config?: Partial<CreateAxiosDefaults>) {
const TEN_SECONDS = 10 * 1000;
const axiosConfig: CreateAxiosDefaults = {
timeout: TEN_SECONDS,
headers: {
'Content-Type': 'application/json'
},
validateStatus: isHttpSuccess,
paramsSerializer: params => {
return stringify(params);
}
};
Object.assign(axiosConfig, config);
return axiosConfig;
}

View File

@ -0,0 +1,79 @@
import type { AxiosHeaderValue, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
import type { ResponseType } from './type';
export function getContentType(config: InternalAxiosRequestConfig) {
const contentType: AxiosHeaderValue = config.headers?.['Content-Type'] || 'application/json';
return contentType;
}
/**
* check if http status is success
*
* @param status
*/
export function isHttpSuccess(status: number) {
const isSuccessCode = status >= 200 && status < 300;
return isSuccessCode || status === 304;
}
/**
* is response json
*
* @param response axios response
*/
export function isResponseJson(response: AxiosResponse) {
const { responseType } = response.config;
return responseType === 'json' || responseType === undefined;
}
export async function transformResponse(response: AxiosResponse) {
const responseType: ResponseType = (response.config?.responseType as ResponseType) || 'json';
if (responseType === 'json') return;
const isJson = response.headers['content-type']?.includes('application/json');
if (!isJson) return;
if (responseType === 'blob') {
await transformBlobToJson(response);
}
if (responseType === 'arrayBuffer') {
await transformArrayBufferToJson(response);
}
}
export async function transformBlobToJson(response: AxiosResponse) {
try {
let data = response.data;
if (typeof data === 'string') {
data = JSON.parse(data);
}
if (Object.prototype.toString.call(data) === '[object Blob]') {
const json = await data.text();
data = JSON.parse(json);
}
response.data = data;
} catch {}
}
export async function transformArrayBufferToJson(response: AxiosResponse) {
try {
let data = response.data;
if (typeof data === 'string') {
data = JSON.parse(data);
}
if (Object.prototype.toString.call(data) === '[object ArrayBuffer]') {
const json = new TextDecoder().decode(data);
data = JSON.parse(json);
}
response.data = data;
} catch {}
}

115
packages/axios/src/type.ts Normal file
View File

@ -0,0 +1,115 @@
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
export type ContentType =
| 'text/html'
| 'text/plain'
| 'multipart/form-data'
| 'application/json'
| 'application/x-www-form-urlencoded'
| 'application/octet-stream';
export interface RequestOption<ResponseData = any> {
/**
* The hook before request
*
* For example: You can add header token in this hook
*
* @param config Axios config
*/
onRequest: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>;
/**
* The hook to check backend response is success or not
*
* @param response Axios response
*/
isBackendSuccess: (response: AxiosResponse<ResponseData>) => boolean;
/**
* The hook after backend request fail
*
* For example: You can handle the expired token in this hook
*
* @param response Axios response
* @param instance Axios instance
*/
onBackendFail: (
response: AxiosResponse<ResponseData>,
instance: AxiosInstance
) => Promise<AxiosResponse | null> | Promise<void>;
/**
* transform backend response when the responseType is json
*
* @param response Axios response
*/
transformBackendResponse(response: AxiosResponse<ResponseData>): any | Promise<any>;
/**
* The hook to handle error
*
* For example: You can show error message in this hook
*
* @param error
*/
onError: (error: AxiosError<ResponseData>) => void | Promise<void>;
}
interface ResponseMap {
blob: Blob;
text: string;
arrayBuffer: ArrayBuffer;
stream: ReadableStream<Uint8Array>;
document: Document;
}
export type ResponseType = keyof ResponseMap | 'json';
export type MappedType<R extends ResponseType, JsonType = any> = R extends keyof ResponseMap
? ResponseMap[R]
: JsonType;
export type CustomAxiosRequestConfig<R extends ResponseType = 'json'> = Omit<AxiosRequestConfig, 'responseType'> & {
responseType?: R;
};
export interface RequestInstanceCommon<T> {
/**
* cancel the request by request id
*
* if the request provide abort controller sign from config, it will not collect in the abort controller map
*
* @param requestId
*/
cancelRequest: (requestId: string) => void;
/**
* cancel all request
*
* if the request provide abort controller sign from config, it will not collect in the abort controller map
*/
cancelAllRequest: () => void;
/** you can set custom state in the request instance */
state: T;
}
/** The request instance */
export interface RequestInstance<S = Record<string, unknown>> extends RequestInstanceCommon<S> {
<T = any, R extends ResponseType = 'json'>(config: CustomAxiosRequestConfig<R>): Promise<MappedType<R, T>>;
}
export type FlatResponseSuccessData<T = any, ResponseData = any> = {
data: T;
error: null;
response: AxiosResponse<ResponseData>;
};
export type FlatResponseFailData<ResponseData = any> = {
data: null;
error: AxiosError<ResponseData>;
response: AxiosResponse<ResponseData>;
};
export type FlatResponseData<T = any, ResponseData = any> =
| FlatResponseSuccessData<T, ResponseData>
| FlatResponseFailData<ResponseData>;
export interface FlatRequestInstance<S = Record<string, unknown>, ResponseData = any> extends RequestInstanceCommon<S> {
<T = any, R extends ResponseType = 'json'>(
config: CustomAxiosRequestConfig<R>
): Promise<FlatResponseData<MappedType<R, T>, ResponseData>>;
}

View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

View File

@ -0,0 +1,16 @@
{
"name": "@sa/color",
"version": "1.3.15",
"exports": {
".": "./src/index.ts"
},
"typesVersions": {
"*": {
"*": ["./src/*"]
}
},
"dependencies": {
"@sa/utils": "workspace:*",
"colord": "2.9.3"
}
}

View File

@ -0,0 +1,2 @@
export * from './name';
export * from './palette';

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,356 @@
import type { ColorPaletteFamily } from '../types';
export const colorPalettes: ColorPaletteFamily[] = [
{
name: 'Slate',
palettes: [
{ hex: '#f8fafc', number: 50 },
{ hex: '#f1f5f9', number: 100 },
{ hex: '#e2e8f0', number: 200 },
{ hex: '#cbd5e1', number: 300 },
{ hex: '#94a3b8', number: 400 },
{ hex: '#64748b', number: 500 },
{ hex: '#475569', number: 600 },
{ hex: '#334155', number: 700 },
{ hex: '#1e293b', number: 800 },
{ hex: '#0f172a', number: 900 },
{ hex: '#020617', number: 950 }
]
},
{
name: 'Gray',
palettes: [
{ hex: '#f9fafb', number: 50 },
{ hex: '#f3f4f6', number: 100 },
{ hex: '#e5e7eb', number: 200 },
{ hex: '#d1d5db', number: 300 },
{ hex: '#9ca3af', number: 400 },
{ hex: '#6b7280', number: 500 },
{ hex: '#4b5563', number: 600 },
{ hex: '#374151', number: 700 },
{ hex: '#1f2937', number: 800 },
{ hex: '#111827', number: 900 },
{ hex: '#030712', number: 950 }
]
},
{
name: 'Zinc',
palettes: [
{ hex: '#fafafa', number: 50 },
{ hex: '#f4f4f5', number: 100 },
{ hex: '#e4e4e7', number: 200 },
{ hex: '#d4d4d8', number: 300 },
{ hex: '#a1a1aa', number: 400 },
{ hex: '#71717a', number: 500 },
{ hex: '#52525b', number: 600 },
{ hex: '#3f3f46', number: 700 },
{ hex: '#27272a', number: 800 },
{ hex: '#18181b', number: 900 },
{ hex: '#09090b', number: 950 }
]
},
{
name: 'Neutral',
palettes: [
{ hex: '#fafafa', number: 50 },
{ hex: '#f5f5f5', number: 100 },
{ hex: '#e5e5e5', number: 200 },
{ hex: '#d4d4d4', number: 300 },
{ hex: '#a3a3a3', number: 400 },
{ hex: '#737373', number: 500 },
{ hex: '#525252', number: 600 },
{ hex: '#404040', number: 700 },
{ hex: '#262626', number: 800 },
{ hex: '#171717', number: 900 },
{ hex: '#0a0a0a', number: 950 }
]
},
{
name: 'Stone',
palettes: [
{ hex: '#fafaf9', number: 50 },
{ hex: '#f5f5f4', number: 100 },
{ hex: '#e7e5e4', number: 200 },
{ hex: '#d6d3d1', number: 300 },
{ hex: '#a8a29e', number: 400 },
{ hex: '#78716c', number: 500 },
{ hex: '#57534e', number: 600 },
{ hex: '#44403c', number: 700 },
{ hex: '#292524', number: 800 },
{ hex: '#1c1917', number: 900 },
{ hex: '#0c0a09', number: 950 }
]
},
{
name: 'Red',
palettes: [
{ hex: '#fef2f2', number: 50 },
{ hex: '#fee2e2', number: 100 },
{ hex: '#fecaca', number: 200 },
{ hex: '#fca5a5', number: 300 },
{ hex: '#f87171', number: 400 },
{ hex: '#ef4444', number: 500 },
{ hex: '#dc2626', number: 600 },
{ hex: '#b91c1c', number: 700 },
{ hex: '#991b1b', number: 800 },
{ hex: '#7f1d1d', number: 900 },
{ hex: '#450a0a', number: 950 }
]
},
{
name: 'Orange',
palettes: [
{ hex: '#fff7ed', number: 50 },
{ hex: '#ffedd5', number: 100 },
{ hex: '#fed7aa', number: 200 },
{ hex: '#fdba74', number: 300 },
{ hex: '#fb923c', number: 400 },
{ hex: '#f97316', number: 500 },
{ hex: '#ea580c', number: 600 },
{ hex: '#c2410c', number: 700 },
{ hex: '#9a3412', number: 800 },
{ hex: '#7c2d12', number: 900 },
{ hex: '#431407', number: 950 }
]
},
{
name: 'Amber',
palettes: [
{ hex: '#fffbeb', number: 50 },
{ hex: '#fef3c7', number: 100 },
{ hex: '#fde68a', number: 200 },
{ hex: '#fcd34d', number: 300 },
{ hex: '#fbbf24', number: 400 },
{ hex: '#f59e0b', number: 500 },
{ hex: '#d97706', number: 600 },
{ hex: '#b45309', number: 700 },
{ hex: '#92400e', number: 800 },
{ hex: '#78350f', number: 900 },
{ hex: '#451a03', number: 950 }
]
},
{
name: 'Yellow',
palettes: [
{ hex: '#fefce8', number: 50 },
{ hex: '#fef9c3', number: 100 },
{ hex: '#fef08a', number: 200 },
{ hex: '#fde047', number: 300 },
{ hex: '#facc15', number: 400 },
{ hex: '#eab308', number: 500 },
{ hex: '#ca8a04', number: 600 },
{ hex: '#a16207', number: 700 },
{ hex: '#854d0e', number: 800 },
{ hex: '#713f12', number: 900 },
{ hex: '#422006', number: 950 }
]
},
{
name: 'Lime',
palettes: [
{ hex: '#f7fee7', number: 50 },
{ hex: '#ecfccb', number: 100 },
{ hex: '#d9f99d', number: 200 },
{ hex: '#bef264', number: 300 },
{ hex: '#a3e635', number: 400 },
{ hex: '#84cc16', number: 500 },
{ hex: '#65a30d', number: 600 },
{ hex: '#4d7c0f', number: 700 },
{ hex: '#3f6212', number: 800 },
{ hex: '#365314', number: 900 },
{ hex: '#1a2e05', number: 950 }
]
},
{
name: 'Green',
palettes: [
{ hex: '#f0fdf4', number: 50 },
{ hex: '#dcfce7', number: 100 },
{ hex: '#bbf7d0', number: 200 },
{ hex: '#86efac', number: 300 },
{ hex: '#4ade80', number: 400 },
{ hex: '#22c55e', number: 500 },
{ hex: '#16a34a', number: 600 },
{ hex: '#15803d', number: 700 },
{ hex: '#166534', number: 800 },
{ hex: '#14532d', number: 900 },
{ hex: '#052e16', number: 950 }
]
},
{
name: 'Emerald',
palettes: [
{ hex: '#ecfdf5', number: 50 },
{ hex: '#d1fae5', number: 100 },
{ hex: '#a7f3d0', number: 200 },
{ hex: '#6ee7b7', number: 300 },
{ hex: '#34d399', number: 400 },
{ hex: '#10b981', number: 500 },
{ hex: '#059669', number: 600 },
{ hex: '#047857', number: 700 },
{ hex: '#065f46', number: 800 },
{ hex: '#064e3b', number: 900 },
{ hex: '#022c22', number: 950 }
]
},
{
name: 'Teal',
palettes: [
{ hex: '#f0fdfa', number: 50 },
{ hex: '#ccfbf1', number: 100 },
{ hex: '#99f6e4', number: 200 },
{ hex: '#5eead4', number: 300 },
{ hex: '#2dd4bf', number: 400 },
{ hex: '#14b8a6', number: 500 },
{ hex: '#0d9488', number: 600 },
{ hex: '#0f766e', number: 700 },
{ hex: '#115e59', number: 800 },
{ hex: '#134e4a', number: 900 },
{ hex: '#042f2e', number: 950 }
]
},
{
name: 'Cyan',
palettes: [
{ hex: '#ecfeff', number: 50 },
{ hex: '#cffafe', number: 100 },
{ hex: '#a5f3fc', number: 200 },
{ hex: '#67e8f9', number: 300 },
{ hex: '#22d3ee', number: 400 },
{ hex: '#06b6d4', number: 500 },
{ hex: '#0891b2', number: 600 },
{ hex: '#0e7490', number: 700 },
{ hex: '#155e75', number: 800 },
{ hex: '#164e63', number: 900 },
{ hex: '#083344', number: 950 }
]
},
{
name: 'Sky',
palettes: [
{ hex: '#f0f9ff', number: 50 },
{ hex: '#e0f2fe', number: 100 },
{ hex: '#bae6fd', number: 200 },
{ hex: '#7dd3fc', number: 300 },
{ hex: '#38bdf8', number: 400 },
{ hex: '#0ea5e9', number: 500 },
{ hex: '#0284c7', number: 600 },
{ hex: '#0369a1', number: 700 },
{ hex: '#075985', number: 800 },
{ hex: '#0c4a6e', number: 900 },
{ hex: '#082f49', number: 950 }
]
},
{
name: 'Blue',
palettes: [
{ hex: '#eff6ff', number: 50 },
{ hex: '#dbeafe', number: 100 },
{ hex: '#bfdbfe', number: 200 },
{ hex: '#93c5fd', number: 300 },
{ hex: '#60a5fa', number: 400 },
{ hex: '#3b82f6', number: 500 },
{ hex: '#2563eb', number: 600 },
{ hex: '#1d4ed8', number: 700 },
{ hex: '#1e40af', number: 800 },
{ hex: '#1e3a8a', number: 900 },
{ hex: '#172554', number: 950 }
]
},
{
name: 'Indigo',
palettes: [
{ hex: '#eef2ff', number: 50 },
{ hex: '#e0e7ff', number: 100 },
{ hex: '#c7d2fe', number: 200 },
{ hex: '#a5b4fc', number: 300 },
{ hex: '#818cf8', number: 400 },
{ hex: '#6366f1', number: 500 },
{ hex: '#4f46e5', number: 600 },
{ hex: '#4338ca', number: 700 },
{ hex: '#3730a3', number: 800 },
{ hex: '#312e81', number: 900 },
{ hex: '#1e1b4b', number: 950 }
]
},
{
name: 'Violet',
palettes: [
{ hex: '#f5f3ff', number: 50 },
{ hex: '#ede9fe', number: 100 },
{ hex: '#ddd6fe', number: 200 },
{ hex: '#c4b5fd', number: 300 },
{ hex: '#a78bfa', number: 400 },
{ hex: '#8b5cf6', number: 500 },
{ hex: '#7c3aed', number: 600 },
{ hex: '#6d28d9', number: 700 },
{ hex: '#5b21b6', number: 800 },
{ hex: '#4c1d95', number: 900 },
{ hex: '#2e1065', number: 950 }
]
},
{
name: 'Purple',
palettes: [
{ hex: '#faf5ff', number: 50 },
{ hex: '#f3e8ff', number: 100 },
{ hex: '#e9d5ff', number: 200 },
{ hex: '#d8b4fe', number: 300 },
{ hex: '#c084fc', number: 400 },
{ hex: '#a855f7', number: 500 },
{ hex: '#9333ea', number: 600 },
{ hex: '#7e22ce', number: 700 },
{ hex: '#6b21a8', number: 800 },
{ hex: '#581c87', number: 900 },
{ hex: '#3b0764', number: 950 }
]
},
{
name: 'Fuchsia',
palettes: [
{ hex: '#fdf4ff', number: 50 },
{ hex: '#fae8ff', number: 100 },
{ hex: '#f5d0fe', number: 200 },
{ hex: '#f0abfc', number: 300 },
{ hex: '#e879f9', number: 400 },
{ hex: '#d946ef', number: 500 },
{ hex: '#c026d3', number: 600 },
{ hex: '#a21caf', number: 700 },
{ hex: '#86198f', number: 800 },
{ hex: '#701a75', number: 900 },
{ hex: '#4a044e', number: 950 }
]
},
{
name: 'Pink',
palettes: [
{ hex: '#fdf2f8', number: 50 },
{ hex: '#fce7f3', number: 100 },
{ hex: '#fbcfe8', number: 200 },
{ hex: '#f9a8d4', number: 300 },
{ hex: '#f472b6', number: 400 },
{ hex: '#ec4899', number: 500 },
{ hex: '#db2777', number: 600 },
{ hex: '#be185d', number: 700 },
{ hex: '#9d174d', number: 800 },
{ hex: '#831843', number: 900 },
{ hex: '#500724', number: 950 }
]
},
{
name: 'Rose',
palettes: [
{ hex: '#fff1f2', number: 50 },
{ hex: '#ffe4e6', number: 100 },
{ hex: '#fecdd3', number: 200 },
{ hex: '#fda4af', number: 300 },
{ hex: '#fb7185', number: 400 },
{ hex: '#f43f5e', number: 500 },
{ hex: '#e11d48', number: 600 },
{ hex: '#be123c', number: 700 },
{ hex: '#9f1239', number: 800 },
{ hex: '#881337', number: 900 },
{ hex: '#4c0519', number: 950 }
]
}
];

View File

@ -0,0 +1,7 @@
import { colorPalettes } from './constant';
export * from './palette';
export * from './shared';
export { colorPalettes };
export * from './types';

View File

@ -0,0 +1,176 @@
import type { AnyColor, HsvColor } from 'colord';
import { getHex, getHsv, isValidColor, mixColor } from '../shared';
import type { ColorIndex } from '../types';
/** Hue step */
const hueStep = 2;
/** Saturation step, light color part */
const saturationStep = 16;
/** Saturation step, dark color part */
const saturationStep2 = 5;
/** Brightness step, light color part */
const brightnessStep1 = 5;
/** Brightness step, dark color part */
const brightnessStep2 = 15;
/** Light color count, main color up */
const lightColorCount = 5;
/** Dark color count, main color down */
const darkColorCount = 4;
/**
* Get AntD palette color by index
*
* @param color - Color
* @param index - The color index of color palette (the main color index is 6)
* @returns Hex color
*/
export function getAntDPaletteColorByIndex(color: AnyColor, index: ColorIndex): string {
if (!isValidColor(color)) {
throw new Error('invalid input color value');
}
if (index === 6) {
return getHex(color);
}
const isLight = index < 6;
const hsv = getHsv(color);
const i = isLight ? lightColorCount + 1 - index : index - lightColorCount - 1;
const newHsv: HsvColor = {
h: getHue(hsv, i, isLight),
s: getSaturation(hsv, i, isLight),
v: getValue(hsv, i, isLight)
};
return getHex(newHsv);
}
/** Map of dark color index and opacity */
const darkColorMap = [
{ index: 7, opacity: 0.15 },
{ index: 6, opacity: 0.25 },
{ index: 5, opacity: 0.3 },
{ index: 5, opacity: 0.45 },
{ index: 5, opacity: 0.65 },
{ index: 5, opacity: 0.85 },
{ index: 5, opacity: 0.9 },
{ index: 4, opacity: 0.93 },
{ index: 3, opacity: 0.95 },
{ index: 2, opacity: 0.97 },
{ index: 1, opacity: 0.98 }
];
/**
* Get AntD color palette
*
* @param color - Color
* @param darkTheme - Dark theme
* @param darkThemeMixColor - Dark theme mix color (default: #141414)
*/
export function getAntDColorPalette(color: AnyColor, darkTheme = false, darkThemeMixColor = '#141414'): string[] {
const indexes: ColorIndex[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
const patterns = indexes.map(index => getAntDPaletteColorByIndex(color, index));
if (darkTheme) {
const darkPatterns = darkColorMap.map(({ index, opacity }) => {
const darkColor = mixColor(darkThemeMixColor, patterns[index], opacity);
return darkColor;
});
return darkPatterns.map(item => getHex(item));
}
return patterns;
}
/**
* Get hue
*
* @param hsv - Hsv format color
* @param i - The relative distance from 6
* @param isLight - Is light color
*/
function getHue(hsv: HsvColor, i: number, isLight: boolean) {
let hue: number;
const hsvH = Math.round(hsv.h);
if (hsvH >= 60 && hsvH <= 240) {
hue = isLight ? hsvH - hueStep * i : hsvH + hueStep * i;
} else {
hue = isLight ? hsvH + hueStep * i : hsvH - hueStep * i;
}
if (hue < 0) {
hue += 360;
}
if (hue >= 360) {
hue -= 360;
}
return hue;
}
/**
* Get saturation
*
* @param hsv - Hsv format color
* @param i - The relative distance from 6
* @param isLight - Is light color
*/
function getSaturation(hsv: HsvColor, i: number, isLight: boolean) {
if (hsv.h === 0 && hsv.s === 0) {
return hsv.s;
}
let saturation: number;
if (isLight) {
saturation = hsv.s - saturationStep * i;
} else if (i === darkColorCount) {
saturation = hsv.s + saturationStep;
} else {
saturation = hsv.s + saturationStep2 * i;
}
if (saturation > 100) {
saturation = 100;
}
if (isLight && i === lightColorCount && saturation > 10) {
saturation = 10;
}
if (saturation < 6) {
saturation = 6;
}
return saturation;
}
/**
* Get value of hsv
*
* @param hsv - Hsv format color
* @param i - The relative distance from 6
* @param isLight - Is light color
*/
function getValue(hsv: HsvColor, i: number, isLight: boolean) {
let value: number;
if (isLight) {
value = hsv.v + brightnessStep1 * i;
} else {
value = hsv.v - brightnessStep2 * i;
}
if (value > 100) {
value = 100;
}
return value;
}

View File

@ -0,0 +1,45 @@
import type { AnyColor } from 'colord';
import { getHex } from '../shared';
import type { ColorPaletteNumber } from '../types';
import { getRecommendedColorPalette } from './recommend';
import { getAntDColorPalette } from './antd';
/**
* get color palette by provided color
*
* @param color
* @param recommended whether to get recommended color palette (the provided color may not be the main color)
*/
export function getColorPalette(color: AnyColor, recommended = false) {
const colorMap = new Map<ColorPaletteNumber, string>();
if (recommended) {
const colorPalette = getRecommendedColorPalette(getHex(color));
colorPalette.palettes.forEach(palette => {
colorMap.set(palette.number, palette.hex);
});
} else {
const colors = getAntDColorPalette(color);
const colorNumbers: ColorPaletteNumber[] = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
colorNumbers.forEach((number, index) => {
colorMap.set(number, colors[index]);
});
}
return colorMap;
}
/**
* get color palette color by number
*
* @param color the provided color
* @param number the color palette number
* @param recommended whether to get recommended color palette (the provided color may not be the main color)
*/
export function getPaletteColorByNumber(color: AnyColor, number: ColorPaletteNumber, recommended = false) {
const colorMap = getColorPalette(color, recommended);
return colorMap.get(number as ColorPaletteNumber)!;
}

View File

@ -0,0 +1,152 @@
import { getColorName, getDeltaE, getHsl, isValidColor, transformHslToHex } from '../shared';
import { colorPalettes } from '../constant';
import type {
ColorPalette,
ColorPaletteFamily,
ColorPaletteFamilyWithNearestPalette,
ColorPaletteMatch,
ColorPaletteNumber
} from '../types';
/**
* get recommended color palette by provided color
*
* @param color the provided color
*/
export function getRecommendedColorPalette(color: string) {
const colorPaletteFamily = getRecommendedColorPaletteFamily(color);
const colorMap = new Map<ColorPaletteNumber, ColorPalette>();
colorPaletteFamily.palettes.forEach(palette => {
colorMap.set(palette.number, palette);
});
const mainColor = colorMap.get(500)!;
const matchColor = colorPaletteFamily.palettes.find(palette => palette.hex === color)!;
const colorPalette: ColorPaletteMatch = {
...colorPaletteFamily,
colorMap,
main: mainColor,
match: matchColor
};
return colorPalette;
}
/**
* get recommended palette color by provided color
*
* @param color the provided color
* @param number the color palette number
*/
export function getRecommendedPaletteColorByNumber(color: string, number: ColorPaletteNumber) {
const colorPalette = getRecommendedColorPalette(color);
const { hex } = colorPalette.colorMap.get(number)!;
return hex;
}
/**
* get color palette family by provided color and color name
*
* @param color the provided color
*/
export function getRecommendedColorPaletteFamily(color: string) {
if (!isValidColor(color)) {
throw new Error('Invalid color, please check color value!');
}
let colorName = getColorName(color);
colorName = colorName.toLowerCase().replace(/\s/g, '-');
const { h: h1, s: s1 } = getHsl(color);
const { nearestLightnessPalette, palettes } = getNearestColorPaletteFamily(color, colorPalettes);
const { number, hex } = nearestLightnessPalette;
const { h: h2, s: s2 } = getHsl(hex);
const deltaH = h1 - h2;
const sRatio = s1 / s2;
const colorPaletteFamily: ColorPaletteFamily = {
name: colorName,
palettes: palettes.map(palette => {
let hexValue = color;
const isSame = number === palette.number;
if (!isSame) {
const { h: h3, s: s3, l } = getHsl(palette.hex);
const newH = deltaH < 0 ? h3 + deltaH : h3 - deltaH;
const newS = s3 * sRatio;
hexValue = transformHslToHex({
h: newH,
s: newS,
l
});
}
return {
hex: hexValue,
number: palette.number
};
})
};
return colorPaletteFamily;
}
/**
* get nearest color palette family
*
* @param color color
* @param families color palette families
*/
function getNearestColorPaletteFamily(color: string, families: ColorPaletteFamily[]) {
const familyWithConfig = families.map(family => {
const palettes = family.palettes.map(palette => {
return {
...palette,
delta: getDeltaE(color, palette.hex)
};
});
const nearestPalette = palettes.reduce((prev, curr) => (prev.delta < curr.delta ? prev : curr));
return {
...family,
palettes,
nearestPalette
};
});
const nearestPaletteFamily = familyWithConfig.reduce((prev, curr) =>
prev.nearestPalette.delta < curr.nearestPalette.delta ? prev : curr
);
const { l } = getHsl(color);
const paletteFamily: ColorPaletteFamilyWithNearestPalette = {
...nearestPaletteFamily,
nearestLightnessPalette: nearestPaletteFamily.palettes.reduce((prev, curr) => {
const { l: prevLightness } = getHsl(prev.hex);
const { l: currLightness } = getHsl(curr.hex);
const deltaPrev = Math.abs(prevLightness - l);
const deltaCurr = Math.abs(currLightness - l);
return deltaPrev < deltaCurr ? prev : curr;
})
};
return paletteFamily;
}

View File

@ -0,0 +1,93 @@
import { colord, extend } from 'colord';
import namesPlugin from 'colord/plugins/names';
import mixPlugin from 'colord/plugins/mix';
import labPlugin from 'colord/plugins/lab';
import type { AnyColor, HslColor, RgbColor } from 'colord';
extend([namesPlugin, mixPlugin, labPlugin]);
export function isValidColor(color: AnyColor) {
return colord(color).isValid();
}
export function getHex(color: AnyColor) {
return colord(color).toHex();
}
export function getRgb(color: AnyColor) {
return colord(color).toRgb();
}
export function getHsl(color: AnyColor) {
return colord(color).toHsl();
}
export function getHsv(color: AnyColor) {
return colord(color).toHsv();
}
export function getDeltaE(color1: AnyColor, color2: AnyColor) {
return colord(color1).delta(color2);
}
export function transformHslToHex(color: HslColor) {
return colord(color).toHex();
}
/**
* Add color alpha
*
* @param color - Color
* @param alpha - Alpha (0 - 1)
*/
export function addColorAlpha(color: AnyColor, alpha: number) {
return colord(color).alpha(alpha).toHex();
}
/**
* Mix color
*
* @param firstColor - First color
* @param secondColor - Second color
* @param ratio - The ratio of the second color (0 - 1)
*/
export function mixColor(firstColor: AnyColor, secondColor: AnyColor, ratio: number) {
return colord(firstColor).mix(secondColor, ratio).toHex();
}
/**
* Transform color with opacity to similar color without opacity
*
* @param color - Color
* @param alpha - Alpha (0 - 1)
* @param bgColor Background color (usually white or black)
*/
export function transformColorWithOpacity(color: AnyColor, alpha: number, bgColor = '#ffffff') {
const originColor = addColorAlpha(color, alpha);
const { r: oR, g: oG, b: oB } = colord(originColor).toRgb();
const { r: bgR, g: bgG, b: bgB } = colord(bgColor).toRgb();
function calRgb(or: number, bg: number, al: number) {
return bg + (or - bg) * al;
}
const resultRgb: RgbColor = {
r: calRgb(oR, bgR, alpha),
g: calRgb(oG, bgG, alpha),
b: calRgb(oB, bgB, alpha)
};
return colord(resultRgb).toHex();
}
/**
* Is white color
*
* @param color - Color
*/
export function isWhiteColor(color: AnyColor) {
return colord(color).isEqual('#ffffff');
}
export { colord };

View File

@ -0,0 +1,2 @@
export * from './colord';
export * from './name';

View File

@ -0,0 +1,49 @@
import { colorNames } from '../constant';
import { getHex, getHsl, getRgb } from './colord';
/**
* Get color name
*
* @param color
*/
export function getColorName(color: string) {
const hex = getHex(color);
const rgb = getRgb(color);
const hsl = getHsl(color);
let ndf = 0;
let ndf1 = 0;
let ndf2 = 0;
let cl = -1;
let df = -1;
let name = '';
colorNames.some((item, index) => {
const [hexValue, colorName] = item;
const match = hex === hexValue;
if (match) {
name = colorName;
} else {
const { r, g, b } = getRgb(hexValue);
const { h, s, l } = getHsl(hexValue);
ndf1 = (rgb.r - r) ** 2 + (rgb.g - g) ** 2 + (rgb.b - b) ** 2;
ndf2 = (hsl.h - h) ** 2 + (hsl.s - s) ** 2 + (hsl.l - l) ** 2;
ndf = ndf1 + ndf2 * 2;
if (df < 0 || df > ndf) {
df = ndf;
cl = index;
}
}
return match;
});
name = colorNames[cl][1];
return name;
}

View File

@ -0,0 +1,58 @@
/**
* the color palette number
*
* the main color number is 500
*/
export type ColorPaletteNumber = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
/** the color palette */
export type ColorPalette = {
/** the color hex value */
hex: string;
/**
* the color number
*
* - 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950
*/
number: ColorPaletteNumber;
};
/** the color palette family */
export type ColorPaletteFamily = {
/** the color palette family name */
name: string;
/** the color palettes */
palettes: ColorPalette[];
};
/** the color palette with delta */
export type ColorPaletteWithDelta = ColorPalette & {
delta: number;
};
/** the color palette family with nearest palette */
export type ColorPaletteFamilyWithNearestPalette = ColorPaletteFamily & {
nearestPalette: ColorPaletteWithDelta;
nearestLightnessPalette: ColorPaletteWithDelta;
};
/** the color palette match */
export type ColorPaletteMatch = ColorPaletteFamily & {
/** the color map of the palette */
colorMap: Map<ColorPaletteNumber, ColorPalette>;
/**
* the main color of the palette
*
* which number is 500
*/
main: ColorPalette;
/** the match color of the palette */
match: ColorPalette;
};
/**
* The color index of color palette
*
* From left to right, the color is from light to dark, 6 is main color
*/
export type ColorIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;

View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

View File

@ -0,0 +1,16 @@
{
"name": "@sa/hooks",
"version": "1.3.15",
"exports": {
".": "./src/index.ts"
},
"typesVersions": {
"*": {
"*": ["./src/*"]
}
},
"dependencies": {
"@sa/axios": "workspace:*",
"@sa/utils": "workspace:*"
}
}

View File

@ -0,0 +1,11 @@
import useBoolean from './use-boolean';
import useLoading from './use-loading';
import useCountDown from './use-count-down';
import useContext from './use-context';
import useSvgIconRender from './use-svg-icon-render';
import useHookTable from './use-table';
export { useBoolean, useLoading, useCountDown, useContext, useSvgIconRender, useHookTable };
export * from './use-signal';
export * from './use-table';

View File

@ -1,8 +1,9 @@
import { ref } from 'vue';
/**
* boolean组合式函数
* @param initValue
* Boolean
*
* @param initValue Init value
*/
export default function useBoolean(initValue = false) {
const bool = ref(initValue);

View File

@ -0,0 +1,96 @@
import { inject, provide } from 'vue';
import type { InjectionKey } from 'vue';
/**
* Use context
*
* @example
* ```ts
* // there are three vue files: A.vue, B.vue, C.vue, and A.vue is the parent component of B.vue and C.vue
*
* // context.ts
* import { ref } from 'vue';
* import { useContext } from '@sa/hooks';
*
* export const { setupStore, useStore } = useContext('demo', () => {
* const count = ref(0);
*
* function increment() {
* count.value++;
* }
*
* function decrement() {
* count.value--;
* }
*
* return {
* count,
* increment,
* decrement
* };
* })
* ``` // A.vue
* ```vue
* <template>
* <div>A</div>
* </template>
* <script setup lang="ts">
* import { setupStore } from './context';
*
* setupStore();
* // const { increment } = setupStore(); // also can control the store in the parent component
* </script>
* ``` // B.vue
* ```vue
* <template>
* <div>B</div>
* </template>
* <script setup lang="ts">
* import { useStore } from './context';
*
* const { count, increment } = useStore();
* </script>
* ```;
*
* // C.vue is same as B.vue
*
* @param contextName Context name
* @param fn Context function
*/
export default function useContext<T extends (...args: any[]) => any>(contextName: string, fn: T) {
type Context = ReturnType<T>;
const { useProvide, useInject: useStore } = createContext<Context>(contextName);
function setupStore(...args: Parameters<T>) {
const context: Context = fn(...args);
return useProvide(context);
}
return {
/** Setup store in the parent component */
setupStore,
/** Use store in the child component */
useStore
};
}
/** Create context */
function createContext<T>(contextName: string) {
const injectKey: InjectionKey<T> = Symbol(contextName);
function useProvide(context: T) {
provide(injectKey, context);
return context;
}
function useInject() {
return inject(injectKey) as T;
}
return {
useProvide,
useInject
};
}

View File

@ -0,0 +1,68 @@
import { computed, onScopeDispose, ref } from 'vue';
import { useRafFn } from '@vueuse/core';
/**
* A hook for implementing a countdown timer. It uses `requestAnimationFrame` for smooth and accurate timing,
* independent of the screen refresh rate.
*
* @param initialSeconds - The total number of seconds for the countdown.
*/
export default function useCountDown(initialSeconds: number) {
const remainingSeconds = ref(0);
const count = computed(() => Math.ceil(remainingSeconds.value));
const isCounting = computed(() => remainingSeconds.value > 0);
const { pause, resume } = useRafFn(
({ delta }) => {
// delta: milliseconds elapsed since the last frame.
// If countdown already reached zero or below, ensure it's 0 and stop.
if (remainingSeconds.value <= 0) {
remainingSeconds.value = 0;
pause();
return;
}
// Calculate seconds passed since the last frame.
const secondsPassed = delta / 1000;
remainingSeconds.value -= secondsPassed;
// If countdown has finished after decrementing.
if (remainingSeconds.value <= 0) {
remainingSeconds.value = 0;
pause();
}
},
{ immediate: false } // The timer does not start automatically.
);
/**
* Starts the countdown.
*
* @param [updatedSeconds=initialSeconds] - Optionally, start with a new duration. Default is `initialSeconds`
*/
function start(updatedSeconds: number = initialSeconds) {
remainingSeconds.value = updatedSeconds;
resume();
}
/** Stops the countdown and resets the remaining time to 0. */
function stop() {
remainingSeconds.value = 0;
pause();
}
// Ensure the rAF loop is cleaned up when the component is unmounted.
onScopeDispose(() => {
pause();
});
return {
count,
isCounting,
start,
stop
};
}

View File

@ -1,5 +1,10 @@
import useBoolean from './use-boolean';
/**
* Loading
*
* @param initValue Init value
*/
export default function useLoading(initValue = false) {
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue);

View File

@ -0,0 +1,79 @@
import { ref } from 'vue';
import type { Ref } from 'vue';
import { createFlatRequest } from '@sa/axios';
import type {
AxiosError,
CreateAxiosDefaults,
CustomAxiosRequestConfig,
MappedType,
RequestOption,
ResponseType
} from '@sa/axios';
import useLoading from './use-loading';
export type HookRequestInstanceResponseSuccessData<T = any> = {
data: Ref<T>;
error: Ref<null>;
};
export type HookRequestInstanceResponseFailData<ResponseData = any> = {
data: Ref<null>;
error: Ref<AxiosError<ResponseData>>;
};
export type HookRequestInstanceResponseData<T = any, ResponseData = any> = {
loading: Ref<boolean>;
} & (HookRequestInstanceResponseSuccessData<T> | HookRequestInstanceResponseFailData<ResponseData>);
export interface HookRequestInstance<ResponseData = any> {
<T = any, R extends ResponseType = 'json'>(
config: CustomAxiosRequestConfig
): HookRequestInstanceResponseData<MappedType<R, T>, ResponseData>;
cancelRequest: (requestId: string) => void;
cancelAllRequest: () => void;
}
/**
* create a hook request instance
*
* @param axiosConfig
* @param options
*/
export default function createHookRequest<ResponseData = any>(
axiosConfig?: CreateAxiosDefaults,
options?: Partial<RequestOption<ResponseData>>
) {
const request = createFlatRequest<ResponseData>(axiosConfig, options);
const hookRequest: HookRequestInstance<ResponseData> = function hookRequest<T = any, R extends ResponseType = 'json'>(
config: CustomAxiosRequestConfig
) {
const { loading, startLoading, endLoading } = useLoading();
const data = ref<MappedType<R, T> | null>(null) as Ref<MappedType<R, T>>;
const error = ref<AxiosError<ResponseData> | null>(null) as Ref<AxiosError<ResponseData> | null>;
startLoading();
request(config).then(res => {
if (res.data) {
data.value = res.data;
} else {
error.value = res.error;
}
endLoading();
});
return {
loading,
data,
error
};
} as HookRequestInstance<ResponseData>;
hookRequest.cancelRequest = request.cancelRequest;
hookRequest.cancelAllRequest = request.cancelAllRequest;
return hookRequest;
}

View File

@ -0,0 +1,144 @@
import { computed, ref, shallowRef, triggerRef } from 'vue';
import type {
ComputedGetter,
DebuggerOptions,
Ref,
ShallowRef,
WritableComputedOptions,
WritableComputedRef
} from 'vue';
type Updater<T> = (value: T) => T;
type Mutator<T> = (value: T) => void;
/**
* Signal is a reactive value that can be set, updated or mutated
*
* @example
* ```ts
* const count = useSignal(0);
*
* // `watchEffect`
* watchEffect(() => {
* console.log(count());
* });
*
* // watch
* watch(count, value => {
* console.log(value);
* });
*
* // useComputed
* const double = useComputed(() => count() * 2);
* const writeableDouble = useComputed({
* get: () => count() * 2,
* set: value => count.set(value / 2)
* });
* ```
*/
export interface Signal<T> {
(): Readonly<T>;
/**
* Set the value of the signal
*
* It recommend use `set` for primitive values
*
* @param value
*/
set(value: T): void;
/**
* Update the value of the signal using an updater function
*
* It recommend use `update` for non-primitive values, only the first level of the object will be reactive.
*
* @param updater
*/
update(updater: Updater<T>): void;
/**
* Mutate the value of the signal using a mutator function
*
* this action will call `triggerRef`, so the value will be tracked on `watchEffect`.
*
* It recommend use `mutate` for non-primitive values, all levels of the object will be reactive.
*
* @param mutator
*/
mutate(mutator: Mutator<T>): void;
/**
* Get the reference of the signal
*
* Sometimes it can be useful to make `v-model` work with the signal
*
* ```vue
* <template>
* <input v-model="model.count" />
* </template>;
*
* <script setup lang="ts">
* const state = useSignal({ count: 0 }, { useRef: true });
*
* const model = state.getRef();
* </script>
* ```
*/
getRef(): Readonly<ShallowRef<Readonly<T>>>;
}
export interface ReadonlySignal<T> {
(): Readonly<T>;
}
export interface SignalOptions {
/**
* Whether to use `ref` to store the value
*
* @default false use `sharedRef` to store the value
*/
useRef?: boolean;
}
export function useSignal<T>(initialValue: T, options?: SignalOptions): Signal<T> {
const { useRef } = options || {};
const state = useRef ? (ref(initialValue) as Ref<T>) : shallowRef(initialValue);
return createSignal(state);
}
export function useComputed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ReadonlySignal<T>;
export function useComputed<T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): Signal<T>;
export function useComputed<T>(
getterOrOptions: ComputedGetter<T> | WritableComputedOptions<T>,
debugOptions?: DebuggerOptions
) {
const isGetter = typeof getterOrOptions === 'function';
const computedValue = computed(getterOrOptions as any, debugOptions);
if (isGetter) {
return () => computedValue.value as ReadonlySignal<T>;
}
return createSignal(computedValue);
}
function createSignal<T>(state: ShallowRef<T> | WritableComputedRef<T>): Signal<T> {
const signal = () => state.value;
signal.set = (value: T) => {
state.value = value;
};
signal.update = (updater: Updater<T>) => {
state.value = updater(state.value);
};
signal.mutate = (mutator: Mutator<T>) => {
mutator(state.value);
triggerRef(state);
};
signal.getRef = () => state as Readonly<ShallowRef<Readonly<T>>>;
return signal;
}

View File

@ -0,0 +1,50 @@
import { h } from 'vue';
import type { Component } from 'vue';
/**
* Svg icon render hook
*
* @param SvgIcon Svg icon component
*/
export default function useSvgIconRender(SvgIcon: Component) {
interface IconConfig {
/** Iconify icon name */
icon?: string;
/** Local icon name */
localIcon?: string;
/** Icon color */
color?: string;
/** Icon size */
fontSize?: number;
}
type IconStyle = Partial<Pick<CSSStyleDeclaration, 'color' | 'fontSize'>>;
/**
* Svg icon VNode
*
* @param config
*/
const SvgIconVNode = (config: IconConfig) => {
const { color, fontSize, icon, localIcon } = config;
const style: IconStyle = {};
if (color) {
style.color = color;
}
if (fontSize) {
style.fontSize = `${fontSize}px`;
}
if (!icon && !localIcon) {
return undefined;
}
return () => h(SvgIcon, { icon, localIcon, style });
};
return {
SvgIconVNode
};
}

View File

@ -0,0 +1,154 @@
import { computed, reactive, ref } from 'vue';
import type { Ref, VNodeChild } from 'vue';
import { jsonClone } from '@sa/utils';
import useBoolean from './use-boolean';
import useLoading from './use-loading';
export type MaybePromise<T> = T | Promise<T>;
export type ApiFn = (args: any) => Promise<unknown>;
export type TableColumnCheckTitle = string | ((...args: any) => VNodeChild);
export type TableColumnCheck = {
key: string;
title: TableColumnCheckTitle;
checked: boolean;
};
export type TableDataWithIndex<T> = T & { index: number };
export type TransformedData<T> = {
data: TableDataWithIndex<T>[];
pageNum: number;
pageSize: number;
total: number;
};
export type Transformer<T, Response> = (response: Response) => TransformedData<T>;
export type TableConfig<A extends ApiFn, T, C> = {
/** api function to get table data */
apiFn: A;
/** api params */
apiParams?: Parameters<A>[0];
/** transform api response to table data */
transformer: Transformer<T, Awaited<ReturnType<A>>>;
/** columns factory */
columns: () => C[];
/**
* get column checks
*
* @param columns
*/
getColumnChecks: (columns: C[]) => TableColumnCheck[];
/**
* get columns
*
* @param columns
*/
getColumns: (columns: C[], checks: TableColumnCheck[]) => C[];
/**
* callback when response fetched
*
* @param transformed transformed data
*/
onFetched?: (transformed: TransformedData<T>) => MaybePromise<void>;
/**
* whether to get data immediately
*
* @default true
*/
immediate?: boolean;
};
export default function useHookTable<A extends ApiFn, T, C>(config: TableConfig<A, T, C>) {
const { loading, startLoading, endLoading } = useLoading();
const { bool: empty, setBool: setEmpty } = useBoolean();
const { apiFn, apiParams, transformer, immediate = true, getColumnChecks, getColumns } = config;
const searchParams: NonNullable<Parameters<A>[0]> = reactive(jsonClone({ ...apiParams }));
const allColumns = ref(config.columns()) as Ref<C[]>;
const data: Ref<TableDataWithIndex<T>[]> = ref([]);
const columnChecks: Ref<TableColumnCheck[]> = ref(getColumnChecks(config.columns()));
const columns = computed(() => getColumns(allColumns.value, columnChecks.value));
function reloadColumns() {
allColumns.value = config.columns();
const checkMap = new Map(columnChecks.value.map(col => [col.key, col.checked]));
const defaultChecks = getColumnChecks(allColumns.value);
columnChecks.value = defaultChecks.map(col => ({
...col,
checked: checkMap.get(col.key) ?? col.checked
}));
}
async function getData() {
startLoading();
const formattedParams = formatSearchParams(searchParams);
const response = await apiFn(formattedParams);
const transformed = transformer(response as Awaited<ReturnType<A>>);
data.value = transformed.data;
setEmpty(transformed.data.length === 0);
await config.onFetched?.(transformed);
endLoading();
}
function formatSearchParams(params: Record<string, unknown>) {
const formattedParams: Record<string, unknown> = {};
Object.entries(params).forEach(([key, value]) => {
if (value !== null && value !== undefined) {
formattedParams[key] = value;
}
});
return formattedParams;
}
/**
* update search params
*
* @param params
*/
function updateSearchParams(params: Partial<Parameters<A>[0]>) {
Object.assign(searchParams, params);
}
/** reset search params */
function resetSearchParams() {
Object.assign(searchParams, jsonClone(apiParams));
}
if (immediate) {
getData();
}
return {
loading,
empty,
data,
columns,
columnChecks,
reloadColumns,
getData,
searchParams,
updateSearchParams,
resetSearchParams
};
}

View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

View File

@ -0,0 +1,19 @@
{
"name": "@sa/materials",
"version": "1.3.15",
"exports": {
".": "./src/index.ts"
},
"typesVersions": {
"*": {
"*": ["./src/*"]
}
},
"dependencies": {
"@sa/utils": "workspace:*",
"simplebar-vue": "2.4.2"
},
"devDependencies": {
"typed-css-modules": "0.9.1"
}
}

View File

@ -0,0 +1,6 @@
import AdminLayout, { LAYOUT_MAX_Z_INDEX, LAYOUT_SCROLL_EL_ID } from './libs/admin-layout';
import PageTab from './libs/page-tab';
import SimpleScrollbar from './libs/simple-scrollbar';
export { AdminLayout, LAYOUT_SCROLL_EL_ID, LAYOUT_MAX_Z_INDEX, PageTab, SimpleScrollbar };
export * from './types';

Some files were not shown because too many files have changed in this diff Show More