Compare commits
	
		
			32 Commits
		
	
	
		
			tauri-v1.2
			...
			v1.2.8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | cf9fc7d31f | ||
|  | 58fc09623c | ||
|  | 276ea7fa2f | ||
|  | 96c1044ffb | ||
|  | a91335d74b | ||
|  | 3e2a993db8 | ||
|  | cf0192ad71 | ||
|  | a454b620f1 | ||
|  | 752ec1e9e7 | ||
|  | e035eab223 | ||
|  | be13ca274b | ||
|  | 72ede8bf9c | ||
|  | 0d20e4c915 | ||
|  | c791adc6bc | ||
|  | 693f704690 | ||
|  | 49f60b2d50 | ||
|  | 425c69acc2 | ||
|  | f7de3fd0f1 | ||
|  | c7f6f2a537 | ||
|  | 531432d5ff | ||
|  | ff1d50461f | ||
|  | b5027c8f3e | ||
|  | 1e67ae8c49 | ||
|  | 5c67d0650e | ||
|  | af735e87b8 | ||
|  | b336841567 | ||
|  | b094d6882b | ||
|  | b94baa18c1 | ||
|  | 3eeace94dd | ||
|  | ad2f24707a | ||
|  | cd9d58d4de | ||
|  | 2198b982f0 | 
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/bug-report_cn.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +1,4 @@ | ||||
| name: Bug提交 | ||||
| name: 🐞 Bug提交 | ||||
| description: 在使用软件或功能的过程中遇到了错误 | ||||
| title: '[Bug]: ' | ||||
| labels: [ "bug?" ] | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/bug-report_en.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +1,4 @@ | ||||
| name: Bug Report | ||||
| name: 🐞 Bug Report | ||||
| description: Encountered an error while using the software or feature | ||||
| title: '[Bug]: ' | ||||
| labels: [ "bug?" ] | ||||
|   | ||||
							
								
								
									
										48
									
								
								.github/ISSUE_TEMPLATE/feature_request_cn.yaml
									
									
									
									
										vendored
									
									
										Normal 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 | ||||
							
								
								
									
										48
									
								
								.github/ISSUE_TEMPLATE/feature_request_en.yaml
									
									
									
									
										vendored
									
									
										Normal 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 | ||||
							
								
								
									
										2
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -3,7 +3,7 @@ | ||||
|     "source.fixAll.eslint": "explicit", | ||||
|     "source.organizeImports": "never" | ||||
|   }, | ||||
|   "eslint.experimental.useFlatConfig": true, | ||||
|   "eslint.useFlatConfig": true, | ||||
|   "editor.formatOnSave": false, | ||||
|   "eslint.validate": ["html", "css", "scss", "json", "jsonc"], | ||||
|   "i18n-ally.displayLanguage": "zh-cn", | ||||
|   | ||||
							
								
								
									
										110
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						| @@ -1,6 +1,116 @@ | ||||
| # Changelog | ||||
|  | ||||
|  | ||||
| ## [v1.2.8](https://github.com/soybeanjs/soybean-admin/compare/v1.2.7...v1.2.8) (2024-07-20) | ||||
|  | ||||
| ###    🐞 Bug Fixes | ||||
|  | ||||
| - **packages**: | ||||
|   - @sa/hooks: fix searchParams of useHookTable. fixed #552  -  by @honghuangdc in https://github.com/soybeanjs/soybean-admin/issues/552 [<samp>(96c10)</samp>](https://github.com/soybeanjs/soybean-admin/commit/96c1044) | ||||
| - **types**: | ||||
|   - Fixed the reference type error  -  by **dodu2014** in https://github.com/soybeanjs/soybean-admin/issues/551 [<samp>(3e2a9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3e2a993) | ||||
|   - fix data type of useHookTable  -  by @honghuangdc [<samp>(276ea)</samp>](https://github.com/soybeanjs/soybean-admin/commit/276ea7f) | ||||
|  | ||||
| ###    💅 Refactors | ||||
|  | ||||
| - **projects**: replace `cloneDeep` of `lodash-es` with `klona`  -  by @honghuangdc [<samp>(a9133)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a91335d) | ||||
|  | ||||
| ###    📖 Documentation | ||||
|  | ||||
| - **projects**: update CHANGELOG  -  by @honghuangdc [<samp>(58fc0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/58fc096) | ||||
|  | ||||
| ###    🏡 Chore | ||||
|  | ||||
| - **deps**: update deps  -  by @honghuangdc [<samp>(cf019)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cf0192a) | ||||
|  | ||||
| ###    ❤️ Contributors | ||||
|  | ||||
| [](https://github.com/honghuangdc)   | ||||
| [dodu2014](mailto:dodu@live.cn) | ||||
|  | ||||
| ## [v1.2.7](https://github.com/honghuangdc/soybean-admin/compare/v1.2.6...v1.2.7) (2024-07-12) | ||||
|  | ||||
| ###    🛠 Optimizations | ||||
|  | ||||
| - **projects**: supports custom menu icon sizes  -  by @wynn-w in https://github.com/honghuangdc/soybean-admin/issues/534 [<samp>(e035e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e035eab) | ||||
|  | ||||
| ###    🏡 Chore | ||||
|  | ||||
| - **deps**: | ||||
|   - update deps  -  by @honghuangdc [<samp>(72ede)</samp>](https://github.com/honghuangdc/soybean-admin/commit/72ede8b) | ||||
|   - update deps  -  by @honghuangdc [<samp>(be13c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/be13ca2) | ||||
|   - update deps  -  by @honghuangdc [<samp>(752ec)</samp>](https://github.com/honghuangdc/soybean-admin/commit/752ec1e) | ||||
| - **projects**: | ||||
|   - Fix deprecated configuration config  -  by @paynezhuang in https://github.com/honghuangdc/soybean-admin/issues/524 [<samp>(0d20e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/0d20e4c) | ||||
|  | ||||
| ###    ❤️ Contributors | ||||
|  | ||||
| [](https://github.com/honghuangdc)  [](https://github.com/wynn-w)  [](https://github.com/paynezhuang)   | ||||
|  | ||||
| ## [v1.2.6](https://github.com/honghuangdc/soybean-admin/compare/v1.2.5...v1.2.6) (2024-06-21) | ||||
|  | ||||
| ###    🐞 Bug Fixes | ||||
|  | ||||
| - **projects**: | ||||
|   - request modal title use i18n. fixed #507  -  by @honghuangdc in https://github.com/honghuangdc/soybean-admin/issues/507 [<samp>(f7de3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/f7de3fd) | ||||
|   - add `getDataByPage` for `useTable`. fixed #499  -  by @honghuangdc in https://github.com/honghuangdc/soybean-admin/issues/499 [<samp>(425c6)</samp>](https://github.com/honghuangdc/soybean-admin/commit/425c69a) | ||||
|   - fix login redirect to routeHome when routeHome of dynamic route is not same as static route. fixed #511  -  by @honghuangdc in https://github.com/honghuangdc/soybean-admin/issues/511 [<samp>(49f60)</samp>](https://github.com/honghuangdc/soybean-admin/commit/49f60b2) | ||||
|  | ||||
| ###    🛠 Optimizations | ||||
|  | ||||
| - **projects**: optimize `getRouteQueryOfLoginRoute`  -  by @honghuangdc [<samp>(693f7)</samp>](https://github.com/honghuangdc/soybean-admin/commit/693f704) | ||||
|  | ||||
| ###    📖 Documentation | ||||
|  | ||||
| - **projects**: | ||||
|   - update CHANGELOG  -  by @honghuangdc [<samp>(5c67d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/5c67d06) | ||||
|   - update README  -  by @honghuangdc [<samp>(1e67a)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1e67ae8) | ||||
|  | ||||
| ###    🏡 Chore | ||||
|  | ||||
| - **deps**: | ||||
|   - update deps. close #510  -  by @honghuangdc in https://github.com/honghuangdc/soybean-admin/issues/510 [<samp>(53143)</samp>](https://github.com/honghuangdc/soybean-admin/commit/531432d) | ||||
|   - update deps  -  by @honghuangdc [<samp>(c7f6f)</samp>](https://github.com/honghuangdc/soybean-admin/commit/c7f6f2a) | ||||
|  | ||||
| ###    🤖 CI | ||||
|  | ||||
| - **projects**: | ||||
|   - add github issues template  -  by @honghuangdc [<samp>(b5027)</samp>](https://github.com/honghuangdc/soybean-admin/commit/b5027c8) | ||||
|   - update github issues template  -  by @honghuangdc [<samp>(ff1d5)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ff1d504) | ||||
|  | ||||
| ###    ❤️ Contributors | ||||
|  | ||||
| [](https://github.com/honghuangdc)   | ||||
|  | ||||
| ## [v1.2.5](https://github.com/soybeanjs/soybean-admin/compare/v1.2.4...v1.2.5) (2024-06-15) | ||||
|  | ||||
| ###    🐞 Bug Fixes | ||||
|  | ||||
| - **projects**: Fix the issue of abnormal tab caching after logout. fixed #495  -  by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/495 [<samp>(3eeac)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3eeace9) | ||||
|  | ||||
| ###    🔥 Performance | ||||
|  | ||||
| - **project**: Initializing the static routing function does not require asynchronization  -  by **CHENZL** in https://github.com/soybeanjs/soybean-admin/issues/493 [<samp>(2198b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2198b98) | ||||
|  | ||||
| ###    🛠 Optimizations | ||||
|  | ||||
| - **projects**: optimize code  -  by @soybeanjs [<samp>(b94ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b94baa1) | ||||
| - **types**: Enhance compatibility of global types  -  by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/494 [<samp>(cd9d5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cd9d58d) | ||||
| - **utils**: Reduce code indentation and improve readability  -  by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/496 [<samp>(ad2f2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ad2f247) | ||||
|  | ||||
| ###    📖 Documentation | ||||
|  | ||||
| - **projects**: update CHANGELOG  -  by @soybeanjs [<samp>(b3368)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b336841) | ||||
|  | ||||
| ###    🏡 Chore | ||||
|  | ||||
| - **deps**: update deps  -  by @soybeanjs [<samp>(b094d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b094d68) | ||||
|  | ||||
| ###    ❤️ Contributors | ||||
|  | ||||
| [](https://github.com/soybeanjs)  [](https://github.com/Azir-11)   | ||||
| [CHENZL](mailto:zlong5568863@qq.com) | ||||
|  | ||||
| ## [v1.2.4](https://github.com/soybeanjs/soybean-admin/compare/v1.2.3...v1.2.4) (2024-06-14) | ||||
|  | ||||
| ###    🛠 Optimizations | ||||
|   | ||||
| @@ -1,6 +1,168 @@ | ||||
| # 更新日志 | ||||
|  | ||||
|  | ||||
| ## [v1.2.7](https://github.com/honghuangdc/soybean-admin/compare/v1.2.6...v1.2.7) (2024-07-12) | ||||
|  | ||||
| ###    🛠 优化 | ||||
|  | ||||
| - **项目**: 支持自定义菜单图标大小  -  由 @wynn-w 在 https://github.com/honghuangdc/soybean-admin/issues/534 提出 [<samp>(e035e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e035eab) | ||||
|  | ||||
| ###    🏡 杂务 | ||||
|  | ||||
| - **依赖**: | ||||
|   - 更新依赖  -  由 @honghuangdc [<samp>(72ede)</samp>](https://github.com/honghuangdc/soybean-admin/commit/72ede8b) | ||||
|   - 更新依赖  -  由 @honghuangdc [<samp>(be13c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/be13ca2) | ||||
|   - 更新依赖  -  由 @honghuangdc [<samp>(752ec)</samp>](https://github.com/honghuangdc/soybean-admin/commit/752ec1e) | ||||
| - **项目**: | ||||
|   - 修复已弃用的配置配置  -  由 @paynezhuang 在 https://github.com/honghuangdc/soybean-admin/issues/524 提出 [<samp>(0d20e)</samp>](https://github.com/honghuangdc/soybean-admin/commit/0d20e4c) | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/honghuangdc)  [](https://github.com/wynn-w)  [](https://github.com/paynezhuang)   | ||||
|  | ||||
| ## [v1.2.6](https://github.com/honghuangdc/soybean-admin/compare/v1.2.5...v1.2.6) (2024-06-21) | ||||
|  | ||||
| ###    🐞 修复 | ||||
|  | ||||
| - **项目**: | ||||
|   - 请求模态标题使用 i18n。修复 #507  -  由 @honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/507 提出 [<samp>(f7de3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/f7de3fd) | ||||
|   - 为 `useTable` 添加 `getDataByPage`。修复 #499  -  由 @honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/499 提出 [<samp>(425c6)</samp>](https://github.com/honghuangdc/soybean-admin/commit/425c69a) | ||||
|   - 修复登录重定向到 routeHome 时,动态路由的 routeHome 与静态路由不同的问题。修复 #511  -  由 @honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/511 提出 [<samp>(49f60)</samp>](https://github.com/honghuangdc/soybean-admin/commit/49f60b2) | ||||
|  | ||||
| ###    🛠 优化 | ||||
|  | ||||
| - **项目**: 优化 `getRouteQueryOfLoginRoute`  -  由 @honghuangdc [<samp>(693f7)</samp>](https://github.com/honghuangdc/soybean-admin/commit/693f704) | ||||
|  | ||||
| ###    📖 文档 | ||||
|  | ||||
| - **项目**: | ||||
|   - 更新更新日志  -  由 @honghuangdc [<samp>(5c67d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/5c67d06) | ||||
|   - 更新自述文件  -  由 @honghuangdc [<samp>(1e67a)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1e67ae8) | ||||
|  | ||||
| ###    🏡 杂务 | ||||
|  | ||||
| - **依赖**: | ||||
|   - 更新依赖。关闭 #510  -  由 @honghuangdc 在 https://github.com/honghuangdc/soybean-admin/issues/510 提出 [<samp>(53143)</samp>](https://github.com/honghuangdc/soybean-admin/commit/531432d) | ||||
|   - 更新依赖  -  由 @honghuangdc [<samp>(c7f6f)</samp>](https://github.com/honghuangdc/soybean-admin/commit/c7f6f2a) | ||||
|  | ||||
| ###    🤖 CI | ||||
|  | ||||
| - **项目**: | ||||
|   - 添加 github 问题模板  -  由 @honghuangdc [<samp>(b5027)</samp>](https://github.com/honghuangdc/soybean-admin/commit/b5027c8) | ||||
|   - 更新 github 问题模板  -  由 @honghuangdc [<samp>(ff1d5)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ff1d504) | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/honghuangdc)   | ||||
|  | ||||
| ## [v1.2.5](https://github.com/soybeanjs/soybean-admin/compare/v1.2.4...v1.2.5) (2024-06-15) | ||||
|  | ||||
| ###    🐞 错误修复 | ||||
|  | ||||
| - **项目**: 修复登出后标签页异常缓存的问题。已修复 #495  -  由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/495 [<samp>(3eeac)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3eeace9) | ||||
|  | ||||
| ###    🔥 性能 | ||||
|  | ||||
| - **项目**: 初始化静态路由功能不需要异步  -  由 **CHENZL** 在 https://github.com/soybeanjs/soybean-admin/issues/493 [<samp>(2198b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2198b98) | ||||
|  | ||||
| ###    🛠 优化 | ||||
|  | ||||
| - **项目**: 优化代码  -  由 @soybeanjs [<samp>(b94ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b94baa1) | ||||
| - **类型**: 提高全局类型的兼容性  -  由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/494 [<samp>(cd9d5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cd9d58d) | ||||
| - **工具**: 减少代码缩进,提高可读性  -  由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/496 [<samp>(ad2f2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ad2f247) | ||||
|  | ||||
| ###    📖 文档 | ||||
|  | ||||
| - **项目**: 更新CHANGELOG  -  由 @soybeanjs [<samp>(f70d2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f70d29b) | ||||
|  | ||||
| ###    🏡 杂项 | ||||
|  | ||||
| - **依赖**: 更新依赖  -  由 @soybeanjs [<samp>(b094d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b094d68) | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/soybeanjs)  [](https://github.com/Azir-11)   | ||||
| [CHENZL](mailto:zlong5568863@qq.com) | ||||
|  | ||||
|  | ||||
| ## [v1.2.4](https://github.com/soybeanjs/soybean-admin/compare/v1.2.3...v1.2.4) (2024-06-14) | ||||
|  | ||||
| ###    🛠 优化 | ||||
|  | ||||
| - **项目**: | ||||
|   - 优化 `setupAppVersionNotification`  -  由 @soybeanjs 提交 [<samp>(b5a72)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b5a723c) | ||||
|   - 获取 'Asia/Shanghai' 时区的构建时间  -  由 @soybeanjs 提交 [<samp>(069fa)</samp>](https://github.com/soybeanjs/soybean-admin/commit/069fa8a) | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/soybeanjs)   | ||||
|  | ||||
| ## [v1.2.3](https://github.com/soybeanjs/soybean-admin/compare/v1.2.2...v1.2.3) (2024-06-13) | ||||
|  | ||||
| ###    🐞 修复错误 | ||||
|  | ||||
| - **项目**: | ||||
|   - 通过在index.html中添加color-scheme元标签修复移动浏览器主题问题  -  由 @KickCashew 在 https://github.com/soybeanjs/soybean-admin/issues/488 中提交 [<samp>(c2125)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c212565) | ||||
|   - 修复二级目录组件为空  -  由 @paynezhuang 在 https://github.com/soybeanjs/soybean-admin/issues/491 中提交 [<samp>(aabb2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/aabb2a4) | ||||
|  | ||||
| ###    📖 文档 | ||||
|  | ||||
| - **项目**: | ||||
|   - 修复超链接指向错误  -  由 **Azir** 提交 [<samp>(20a81)</samp>](https://github.com/soybeanjs/soybean-admin/commit/20a8127) | ||||
|   - 更新 README  -  由 @soybeanjs 提交 [<samp>(70261)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7026126) | ||||
|  | ||||
| ###    🏡 杂项 | ||||
|  | ||||
| - **依赖**: | ||||
|   - 更新依赖  -  由 @soybeanjs 提交 [<samp>(813d8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/813d8ce) | ||||
|   - 更新依赖  -  由 @soybeanjs 提交 [<samp>(bf718)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bf71837) | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/soybeanjs)  [](https://github.com/paynezhuang)  [](https://github.com/KickCashew)   | ||||
| [Azir](mailto:2075125282@qq.com) | ||||
|  | ||||
| ## [v1.2.2](https://github.com/honghuangdc/soybean-admin/compare/v1.2.1...v1.2.2) (2024-06-12) | ||||
|  | ||||
| ###    🚀 特性 | ||||
|  | ||||
| - **项目**: 切换标签时重置滚动位置  -  由 @soybeanjs 提交 [<samp>(9094b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/9094b21) | ||||
|  | ||||
| ###    🐞 修复错误 | ||||
|  | ||||
| - **项目**: | ||||
|   - 在DEV模式下隐藏AppVersionNotification  -  由 @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  -  由 @soybeanjs 在 https://github.com/honghuangdc/soybean-admin/issues/483 中提交 [<samp>(4470c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/4470cb4) | ||||
|  | ||||
| ###    📖 文档 | ||||
|  | ||||
| - **项目**: 更新 README  -  由 @soybeanjs 提交 [<samp>(8f9a7)</samp>](https://github.com/honghuangdc/soybean-admin/commit/8f9a705) | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/soybeanjs)  [](https://github.com/sigma-plus)   | ||||
|  | ||||
| ## [v1.2.1](https://github.com/honghuangdc/soybean-admin/compare/v1.2.0...v1.2.1) (2024-06-07) | ||||
|  | ||||
| ###    🐞 修复错误 | ||||
|  | ||||
| - **项目**: | ||||
|   - 修复页面重新加载时获取用户信息  -  由 @soybeanjs 提交 [<samp>(ff51b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ff51b72) | ||||
|   - 修复setupAppVersionNotification渲染  -  由 @soybeanjs 提交 [<samp>(6a6eb)</samp>](https://github.com/honghuangdc/soybean-admin/commit/6a6eb9a) | ||||
|  | ||||
| ###    📖 文档 | ||||
|  | ||||
| - **项目**: 更新CHANGELOG  -  由 @soybeanjs [<samp>(fe06b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/fe06b8c)完成 | ||||
|  | ||||
| ###    🏡 日常任务 | ||||
|  | ||||
| - **依赖**: 更新依赖  -  由 @soybeanjs [<samp>(08827)</samp>](https://github.com/honghuangdc/soybean-admin/commit/08827a4)完成 | ||||
|  | ||||
| ###    ❤️ 贡献者 | ||||
|  | ||||
| [](https://github.com/soybeanjs)   | ||||
|  | ||||
|  | ||||
| ## [v1.2.0](https://github.com/soybeanjs/soybean-admin/compare/v1.1.5...v1.2.0) (2024-06-06) | ||||
|  | ||||
| ###    🚀 功能 | ||||
|   | ||||
| @@ -157,10 +157,10 @@ Thanks the following people for their contributions. If you want to contribute t | ||||
|   	<p>QQ Group</p> | ||||
|     <img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-2.jpg" style="width:200px" /> | ||||
|   </div> | ||||
| 	<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> --> | ||||
| 	<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" /> | ||||
|   | ||||
| @@ -157,10 +157,10 @@ pnpm build | ||||
|   	<p>QQ交流群</p> | ||||
|     <img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-2.jpg" style="width:200px" /> | ||||
|   </div> | ||||
| 	<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> --> | ||||
| 	<div> | ||||
| 		<p>添加下面微信邀请进微信群</p> | ||||
| 		<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/wechat-soybeanjs.jpg" style="width:200px" /> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| import { defineConfig } from '@soybeanjs/eslint-config'; | ||||
|  | ||||
| export default defineConfig( | ||||
|   { vue: true, unocss: true, ignores: ['src-tauri/target'] }, | ||||
|   { vue: true, unocss: true }, | ||||
|   { | ||||
|     rules: { | ||||
|       'vue/multi-word-component-names': [ | ||||
|   | ||||
							
								
								
									
										58
									
								
								package.json
									
									
									
									
									
								
							
							
						
						| @@ -1,7 +1,7 @@ | ||||
| { | ||||
|   "name": "soybean-admin", | ||||
|   "type": "module", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。", | ||||
|   "author": { | ||||
|     "name": "Soybean", | ||||
| @@ -32,19 +32,16 @@ | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "build": "vite build --mode prod", | ||||
|     "build:tauri": "pnpm tauri build", | ||||
|     "build:test": "vite build --mode test", | ||||
|     "cleanup": "sa cleanup", | ||||
|     "commit": "sa git-commit", | ||||
|     "dev": "vite --mode test", | ||||
|     "dev:prod": "vite --mode prod", | ||||
|     "dev:tauri": "pnpm tauri dev", | ||||
|     "gen-route": "sa gen-route", | ||||
|     "lint": "eslint . --fix", | ||||
|     "prepare": "simple-git-hooks", | ||||
|     "preview": "vite preview", | ||||
|     "release": "sa release", | ||||
|     "tauri-icon": "pnpm tauri icon ./public/logo.png", | ||||
|     "typecheck": "vue-tsc --noEmit --skipLibCheck", | ||||
|     "update-pkg": "sa update-pkg" | ||||
|   }, | ||||
| @@ -58,51 +55,48 @@ | ||||
|     "@sa/utils": "workspace:*", | ||||
|     "@vueuse/core": "10.11.0", | ||||
|     "clipboard": "2.0.11", | ||||
|     "dayjs": "1.11.11", | ||||
|     "echarts": "5.5.0", | ||||
|     "lodash-es": "4.17.21", | ||||
|     "naive-ui": "2.38.2", | ||||
|     "dayjs": "1.11.12", | ||||
|     "echarts": "5.5.1", | ||||
|     "naive-ui": "2.39.0", | ||||
|     "nprogress": "0.2.0", | ||||
|     "pinia": "2.1.7", | ||||
|     "tailwind-merge": "2.3.0", | ||||
|     "vue": "3.4.27", | ||||
|     "vue-draggable-plus": "0.5.0", | ||||
|     "tailwind-merge": "2.4.0", | ||||
|     "vue": "3.4.33", | ||||
|     "vue-draggable-plus": "0.5.2", | ||||
|     "vue-i18n": "9.13.1", | ||||
|     "vue-router": "4.3.3" | ||||
|     "vue-router": "4.4.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@elegant-router/vue": "0.3.7", | ||||
|     "@iconify/json": "2.2.218", | ||||
|     "@iconify/json": "2.2.229", | ||||
|     "@sa/scripts": "workspace:*", | ||||
|     "@sa/uno-preset": "workspace:*", | ||||
|     "@soybeanjs/eslint-config": "1.3.6", | ||||
|     "@tauri-apps/cli": "1.5.14", | ||||
|     "@types/lodash-es": "4.17.12", | ||||
|     "@types/node": "20.14.2", | ||||
|     "@soybeanjs/eslint-config": "1.3.7", | ||||
|     "@types/node": "20.14.11", | ||||
|     "@types/nprogress": "0.2.3", | ||||
|     "@unocss/eslint-config": "0.61.0", | ||||
|     "@unocss/preset-icons": "0.61.0", | ||||
|     "@unocss/preset-uno": "0.61.0", | ||||
|     "@unocss/transformer-directives": "0.61.0", | ||||
|     "@unocss/transformer-variant-group": "0.61.0", | ||||
|     "@unocss/vite": "0.61.0", | ||||
|     "@unocss/eslint-config": "0.61.5", | ||||
|     "@unocss/preset-icons": "0.61.5", | ||||
|     "@unocss/preset-uno": "0.61.5", | ||||
|     "@unocss/transformer-directives": "0.61.5", | ||||
|     "@unocss/transformer-variant-group": "0.61.5", | ||||
|     "@unocss/vite": "0.61.5", | ||||
|     "@vitejs/plugin-vue": "5.0.5", | ||||
|     "@vitejs/plugin-vue-jsx": "4.0.0", | ||||
|     "eslint": "9.4.0", | ||||
|     "eslint-plugin-vue": "9.26.0", | ||||
|     "eslint": "9.7.0", | ||||
|     "eslint-plugin-vue": "9.27.0", | ||||
|     "lint-staged": "15.2.7", | ||||
|     "sass": "1.77.5", | ||||
|     "sass": "1.77.8", | ||||
|     "simple-git-hooks": "2.11.1", | ||||
|     "tsx": "4.15.4", | ||||
|     "typescript": "5.4.5", | ||||
|     "tsx": "4.16.2", | ||||
|     "typescript": "5.5.3", | ||||
|     "unplugin-icons": "0.19.0", | ||||
|     "unplugin-vue-components": "0.27.0", | ||||
|     "vite": "5.3.0", | ||||
|     "unplugin-vue-components": "0.27.3", | ||||
|     "vite": "5.3.4", | ||||
|     "vite-plugin-progress": "0.0.7", | ||||
|     "vite-plugin-svg-icons": "2.0.1", | ||||
|     "vite-plugin-vue-devtools": "7.2.1", | ||||
|     "vite-plugin-vue-devtools": "7.3.6", | ||||
|     "vue-eslint-parser": "9.4.3", | ||||
|     "vue-tsc": "2.0.21" | ||||
|     "vue-tsc": "2.0.26" | ||||
|   }, | ||||
|   "simple-git-hooks": { | ||||
|     "commit-msg": "pnpm sa git-commit-verify", | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/axios", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
| @@ -12,8 +12,8 @@ | ||||
|   "dependencies": { | ||||
|     "@sa/utils": "workspace:*", | ||||
|     "axios": "1.7.2", | ||||
|     "axios-retry": "4.4.0", | ||||
|     "qs": "6.12.1" | ||||
|     "axios-retry": "4.4.1", | ||||
|     "qs": "6.12.3" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/qs": "6.9.15" | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/color", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/hooks", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
| @@ -10,6 +10,7 @@ | ||||
|     } | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@sa/axios": "workspace:*" | ||||
|     "@sa/axios": "workspace:*", | ||||
|     "@sa/utils": "workspace:*" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| import { computed, reactive, ref } from 'vue'; | ||||
| import type { Ref } from 'vue'; | ||||
| import { jsonClone } from '@sa/utils'; | ||||
| import useBoolean from './use-boolean'; | ||||
| import useLoading from './use-loading'; | ||||
|  | ||||
| @@ -65,11 +66,11 @@ export default function useHookTable<A extends ApiFn, T, C>(config: TableConfig< | ||||
|  | ||||
|   const { apiFn, apiParams, transformer, immediate = true, getColumnChecks, getColumns } = config; | ||||
|  | ||||
|   const searchParams: NonNullable<Parameters<A>[0]> = reactive({ ...apiParams }); | ||||
|   const searchParams: NonNullable<Parameters<A>[0]> = reactive(jsonClone({ ...apiParams })); | ||||
|  | ||||
|   const allColumns = ref(config.columns()) as Ref<C[]>; | ||||
|  | ||||
|   const data: Ref<T[]> = ref([]); | ||||
|   const data: Ref<TableDataWithIndex<T>[]> = ref([]); | ||||
|  | ||||
|   const columnChecks: Ref<TableColumnCheck[]> = ref(getColumnChecks(config.columns())); | ||||
|  | ||||
| @@ -129,7 +130,7 @@ export default function useHookTable<A extends ApiFn, T, C>(config: TableConfig< | ||||
|  | ||||
|   /** reset search params */ | ||||
|   function resetSearchParams() { | ||||
|     Object.assign(searchParams, apiParams); | ||||
|     Object.assign(searchParams, jsonClone(apiParams)); | ||||
|   } | ||||
|  | ||||
|   if (immediate) { | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/materials", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
| @@ -11,7 +11,7 @@ | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@sa/utils": "workspace:*", | ||||
|     "simplebar-vue": "2.3.4" | ||||
|     "simplebar-vue": "2.3.5" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "typed-css-modules": "0.9.1" | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/fetch", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/scripts", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "bin": { | ||||
|     "sa": "./bin.ts" | ||||
|   }, | ||||
| @@ -15,13 +15,13 @@ | ||||
|   "devDependencies": { | ||||
|     "@soybeanjs/changelog": "0.3.24", | ||||
|     "bumpp": "9.4.1", | ||||
|     "c12": "1.10.0", | ||||
|     "c12": "1.11.1", | ||||
|     "cac": "6.7.14", | ||||
|     "consola": "3.2.3", | ||||
|     "enquirer": "2.4.1", | ||||
|     "execa": "9.2.0", | ||||
|     "execa": "9.3.0", | ||||
|     "kolorist": "1.8.0", | ||||
|     "npm-check-updates": "16.14.20", | ||||
|     "rimraf": "5.0.7" | ||||
|     "rimraf": "6.0.1" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/uno-preset", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@sa/utils", | ||||
|   "version": "1.2.4", | ||||
|   "version": "1.2.8", | ||||
|   "exports": { | ||||
|     ".": "./src/index.ts" | ||||
|   }, | ||||
| @@ -12,6 +12,7 @@ | ||||
|   "dependencies": { | ||||
|     "colord": "2.9.3", | ||||
|     "crypto-js": "4.2.0", | ||||
|     "klona": "2.0.6", | ||||
|     "localforage": "1.10.0", | ||||
|     "nanoid": "5.0.7" | ||||
|   }, | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| export * from './crypto'; | ||||
| export * from './storage'; | ||||
| export * from './nanoid'; | ||||
| export * from './klona'; | ||||
|   | ||||
							
								
								
									
										3
									
								
								packages/utils/src/klona.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,3 @@ | ||||
| import { klona as jsonClone } from 'klona/json'; | ||||
|  | ||||
| export { jsonClone }; | ||||
							
								
								
									
										2242
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								public/logo.png
									
									
									
									
									
								
							
							
						
						| Before Width: | Height: | Size: 20 KiB | 
							
								
								
									
										3
									
								
								src-tauri/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,3 +0,0 @@ | ||||
| # Generated by Cargo | ||||
| # will have compiled files and executables | ||||
| /target/ | ||||
							
								
								
									
										3664
									
								
								src-tauri/Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						| @@ -1,26 +0,0 @@ | ||||
| [package] | ||||
| name = "app" | ||||
| version = "0.1.0" | ||||
| description = "A Tauri App" | ||||
| authors = ["you"] | ||||
| license = "" | ||||
| repository = "" | ||||
| default-run = "app" | ||||
| edition = "2021" | ||||
| rust-version = "1.60" | ||||
|  | ||||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||||
|  | ||||
| [build-dependencies] | ||||
| tauri-build = { version = "1.5.1", features = [] } | ||||
|  | ||||
| [dependencies] | ||||
| serde_json = "1.0" | ||||
| serde = { version = "1.0", features = ["derive"] } | ||||
| tauri = { version = "1.6.1", features = [] } | ||||
|  | ||||
| [features] | ||||
| # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. | ||||
| # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. | ||||
| # DO NOT REMOVE!! | ||||
| custom-protocol = [ "tauri/custom-protocol" ] | ||||
| @@ -1,3 +0,0 @@ | ||||
| fn main() { | ||||
|   tauri_build::build() | ||||
| } | ||||
| Before Width: | Height: | Size: 8.8 KiB | 
| Before Width: | Height: | Size: 19 KiB | 
| Before Width: | Height: | Size: 1.7 KiB | 
| Before Width: | Height: | Size: 7.4 KiB | 
| Before Width: | Height: | Size: 9.9 KiB | 
| Before Width: | Height: | Size: 10 KiB | 
| Before Width: | Height: | Size: 21 KiB | 
| Before Width: | Height: | Size: 1.6 KiB | 
| Before Width: | Height: | Size: 23 KiB | 
| Before Width: | Height: | Size: 2.6 KiB | 
| Before Width: | Height: | Size: 4.7 KiB | 
| Before Width: | Height: | Size: 6.1 KiB | 
| Before Width: | Height: | Size: 3.0 KiB | 
| Before Width: | Height: | Size: 31 KiB | 
| Before Width: | Height: | Size: 39 KiB | 
| @@ -1,8 +0,0 @@ | ||||
| // Prevents additional console window on Windows in release, DO NOT REMOVE!! | ||||
| #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] | ||||
|  | ||||
| fn main() { | ||||
|   tauri::Builder::default() | ||||
|     .run(tauri::generate_context!()) | ||||
|     .expect("error while running tauri application"); | ||||
| } | ||||
| @@ -1,60 +0,0 @@ | ||||
| { | ||||
|   "$schema": "../node_modules/@tauri-apps/cli/schema.json", | ||||
|   "build": { | ||||
|     "beforeBuildCommand": "npm run build", | ||||
|     "beforeDevCommand": "npm run dev", | ||||
|     "devPath": "http://localhost:9527", | ||||
|     "distDir": "../dist" | ||||
|   }, | ||||
|   "package": { | ||||
|     "productName": "soybean-admin", | ||||
|     "version": "1.0.0" | ||||
|   }, | ||||
|   "tauri": { | ||||
|     "allowlist": { | ||||
|       "all": false | ||||
|     }, | ||||
|     "bundle": { | ||||
|       "active": true, | ||||
|       "category": "DeveloperTool", | ||||
|       "copyright": "", | ||||
|       "deb": { | ||||
|         "depends": [] | ||||
|       }, | ||||
|       "externalBin": [], | ||||
|       "icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"], | ||||
|       "identifier": "cn.soybeanjs.admin", | ||||
|       "longDescription": "", | ||||
|       "macOS": { | ||||
|         "entitlements": null, | ||||
|         "exceptionDomain": "", | ||||
|         "frameworks": [], | ||||
|         "providerShortName": null, | ||||
|         "signingIdentity": null | ||||
|       }, | ||||
|       "resources": [], | ||||
|       "shortDescription": "", | ||||
|       "targets": "all", | ||||
|       "windows": { | ||||
|         "certificateThumbprint": null, | ||||
|         "digestAlgorithm": "sha256", | ||||
|         "timestampUrl": "" | ||||
|       } | ||||
|     }, | ||||
|     "security": { | ||||
|       "csp": null | ||||
|     }, | ||||
|     "updater": { | ||||
|       "active": false | ||||
|     }, | ||||
|     "windows": [ | ||||
|       { | ||||
|         "fullscreen": false, | ||||
|         "height": 768, | ||||
|         "resizable": true, | ||||
|         "title": "SoybeanAdmin", | ||||
|         "width": 1366 | ||||
|       } | ||||
|     ] | ||||
|   } | ||||
| } | ||||
| @@ -1,7 +1,7 @@ | ||||
| import { computed, effectScope, onScopeDispose, reactive, ref, watch } from 'vue'; | ||||
| import type { Ref } from 'vue'; | ||||
| import type { PaginationProps } from 'naive-ui'; | ||||
| import { cloneDeep } from 'lodash-es'; | ||||
| import { jsonClone } from '@sa/utils'; | ||||
| import { useBoolean, useHookTable } from '@sa/hooks'; | ||||
| import { useAppStore } from '@/store/modules/app'; | ||||
| import { $t } from '@/locales'; | ||||
| @@ -160,6 +160,24 @@ export function useTable<A extends NaiveUI.TableApiFn>(config: NaiveUI.NaiveTabl | ||||
|     Object.assign(pagination, update); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * get data by page number | ||||
|    * | ||||
|    * @param pageNum the page number. default is 1 | ||||
|    */ | ||||
|   async function getDataByPage(pageNum: number = 1) { | ||||
|     updatePagination({ | ||||
|       page: pageNum | ||||
|     }); | ||||
|  | ||||
|     updateSearchParams({ | ||||
|       current: pageNum, | ||||
|       size: pagination.pageSize! | ||||
|     }); | ||||
|  | ||||
|     await getData(); | ||||
|   } | ||||
|  | ||||
|   scope.run(() => { | ||||
|     watch( | ||||
|       () => appStore.locale, | ||||
| @@ -184,6 +202,7 @@ export function useTable<A extends NaiveUI.TableApiFn>(config: NaiveUI.NaiveTabl | ||||
|     mobilePagination, | ||||
|     updatePagination, | ||||
|     getData, | ||||
|     getDataByPage, | ||||
|     searchParams, | ||||
|     updateSearchParams, | ||||
|     resetSearchParams | ||||
| @@ -206,7 +225,7 @@ export function useTableOperate<T extends TableData = TableData>(data: Ref<T[]>, | ||||
|   function handleEdit(id: T['id']) { | ||||
|     operateType.value = 'edit'; | ||||
|     const findItem = data.value.find(item => item.id === id) || null; | ||||
|     editingData.value = cloneDeep(findItem); | ||||
|     editingData.value = jsonClone(findItem); | ||||
|  | ||||
|     openDrawer(); | ||||
|   } | ||||
|   | ||||
| @@ -23,6 +23,7 @@ const local: App.I18n.Schema = { | ||||
|     deleteSuccess: 'Delete Success', | ||||
|     confirmDelete: 'Are you sure you want to delete?', | ||||
|     edit: 'Edit', | ||||
|     error: 'Error', | ||||
|     index: 'Index', | ||||
|     keywordSearch: 'Please enter keyword', | ||||
|     logout: 'Logout', | ||||
|   | ||||
| @@ -23,6 +23,7 @@ const local: App.I18n.Schema = { | ||||
|     deleteSuccess: '删除成功', | ||||
|     confirmDelete: '确认删除吗?', | ||||
|     edit: '编辑', | ||||
|     error: '错误', | ||||
|     index: '序号', | ||||
|     keywordSearch: '请输入关键词搜索', | ||||
|     logout: '退出登录', | ||||
|   | ||||
| @@ -12,40 +12,42 @@ export function setupAppVersionNotification() { | ||||
|  | ||||
|     const buildTime = await getHtmlBuildTime(); | ||||
|  | ||||
|     if (buildTime !== BUILD_TIME) { | ||||
|       isShow = true; | ||||
|  | ||||
|       const n = window.$notification?.create({ | ||||
|         title: $t('system.updateTitle'), | ||||
|         content: $t('system.updateContent'), | ||||
|         action() { | ||||
|           return h('div', { style: { display: 'flex', justifyContent: 'end', gap: '12px', width: '325px' } }, [ | ||||
|             h( | ||||
|               NButton, | ||||
|               { | ||||
|                 onClick() { | ||||
|                   n?.destroy(); | ||||
|                 } | ||||
|               }, | ||||
|               () => $t('system.updateCancel') | ||||
|             ), | ||||
|             h( | ||||
|               NButton, | ||||
|               { | ||||
|                 type: 'primary', | ||||
|                 onClick() { | ||||
|                   location.reload(); | ||||
|                 } | ||||
|               }, | ||||
|               () => $t('system.updateConfirm') | ||||
|             ) | ||||
|           ]); | ||||
|         }, | ||||
|         onClose() { | ||||
|           isShow = false; | ||||
|         } | ||||
|       }); | ||||
|     if (buildTime === BUILD_TIME) { | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     isShow = true; | ||||
|  | ||||
|     const n = window.$notification?.create({ | ||||
|       title: $t('system.updateTitle'), | ||||
|       content: $t('system.updateContent'), | ||||
|       action() { | ||||
|         return h('div', { style: { display: 'flex', justifyContent: 'end', gap: '12px', width: '325px' } }, [ | ||||
|           h( | ||||
|             NButton, | ||||
|             { | ||||
|               onClick() { | ||||
|                 n?.destroy(); | ||||
|               } | ||||
|             }, | ||||
|             () => $t('system.updateCancel') | ||||
|           ), | ||||
|           h( | ||||
|             NButton, | ||||
|             { | ||||
|               type: 'primary', | ||||
|               onClick() { | ||||
|                 location.reload(); | ||||
|               } | ||||
|             }, | ||||
|             () => $t('system.updateConfirm') | ||||
|           ) | ||||
|         ]); | ||||
|       }, | ||||
|       onClose() { | ||||
|         isShow = false; | ||||
|       } | ||||
|     }); | ||||
|   }); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -6,6 +6,7 @@ import type { | ||||
|   Router | ||||
| } from 'vue-router'; | ||||
| import type { RouteKey, RoutePath } from '@elegant-router/types'; | ||||
| import { getRouteName } from '@/router/elegant/transform'; | ||||
| import { useAuthStore } from '@/store/modules/auth'; | ||||
| import { useRouteStore } from '@/store/modules/route'; | ||||
| import { localStg } from '@/utils/storage'; | ||||
| @@ -149,9 +150,7 @@ async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw | ||||
|   // initialize the auth route requires the user to be logged in, if not, redirect to the login page | ||||
|   if (!isLogin) { | ||||
|     const loginRoute: RouteKey = 'login'; | ||||
|     const redirect = to.fullPath; | ||||
|  | ||||
|     const query: LocationQueryRaw = to.name !== loginRoute ? { redirect } : {}; | ||||
|     const query = getRouteQueryOfLoginRoute(to, routeStore.routeHome); | ||||
|  | ||||
|     const location: RouteLocationRaw = { | ||||
|       name: loginRoute, | ||||
| @@ -197,3 +196,20 @@ function handleRouteSwitch(to: RouteLocationNormalized, from: RouteLocationNorma | ||||
|  | ||||
|   next(); | ||||
| } | ||||
|  | ||||
| function getRouteQueryOfLoginRoute(to: RouteLocationNormalized, routeHome: RouteKey) { | ||||
|   const loginRoute: RouteKey = 'login'; | ||||
|   const redirect = to.fullPath; | ||||
|   const [redirectPath, redirectQuery] = redirect.split('?'); | ||||
|   const redirectName = getRouteName(redirectPath as RoutePath); | ||||
|  | ||||
|   const isRedirectHome = routeHome === redirectName; | ||||
|  | ||||
|   const query: LocationQueryRaw = to.name !== loginRoute && !isRedirectHome ? { redirect } : {}; | ||||
|  | ||||
|   if (isRedirectHome && redirectQuery) { | ||||
|     query.redirect = `/?${redirectQuery}`; | ||||
|   } | ||||
|  | ||||
|   return query; | ||||
| } | ||||
|   | ||||
| @@ -63,7 +63,7 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt | ||||
|         window.addEventListener('beforeunload', handleLogout); | ||||
|  | ||||
|         window.$dialog?.error({ | ||||
|           title: 'Error', | ||||
|           title: $t('common.error'), | ||||
|           content: response.data.msg, | ||||
|           positiveText: $t('common.confirm'), | ||||
|           maskClosable: false, | ||||
|   | ||||
| @@ -8,11 +8,13 @@ import { fetchGetUserInfo, fetchLogin } from '@/service/api'; | ||||
| import { localStg } from '@/utils/storage'; | ||||
| import { $t } from '@/locales'; | ||||
| import { useRouteStore } from '../route'; | ||||
| import { useTabStore } from '../tab'; | ||||
| import { clearAuthStorage, getToken } from './shared'; | ||||
|  | ||||
| export const useAuthStore = defineStore(SetupStoreId.Auth, () => { | ||||
|   const route = useRoute(); | ||||
|   const routeStore = useRouteStore(); | ||||
|   const tabStore = useTabStore(); | ||||
|   const { toLogin, redirectFromLogin } = useRouterPush(false); | ||||
|   const { loading: loginLoading, startLoading, endLoading } = useLoading(); | ||||
|  | ||||
| @@ -47,6 +49,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => { | ||||
|       await toLogin(); | ||||
|     } | ||||
|  | ||||
|     tabStore.cacheTabs(); | ||||
|     routeStore.resetStore(); | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -219,7 +219,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { | ||||
|   /** Init auth route */ | ||||
|   async function initAuthRoute() { | ||||
|     if (authRouteMode.value === 'static') { | ||||
|       await initStaticAuthRoute(); | ||||
|       initStaticAuthRoute(); | ||||
|     } else { | ||||
|       await initDynamicAuthRoute(); | ||||
|     } | ||||
| @@ -228,7 +228,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { | ||||
|   } | ||||
|  | ||||
|   /** Init static auth route */ | ||||
|   async function initStaticAuthRoute() { | ||||
|   function initStaticAuthRoute() { | ||||
|     const { authRoutes: staticAuthRoutes } = createStaticRoutes(); | ||||
|  | ||||
|     if (authStore.isStaticSuper) { | ||||
|   | ||||
| @@ -123,7 +123,7 @@ function getGlobalMenuByBaseRoute(route: RouteLocationNormalizedLoaded | Elegant | ||||
|   const { SvgIconVNode } = useSvgIcon(); | ||||
|  | ||||
|   const { name, path } = route; | ||||
|   const { title, i18nKey, icon = import.meta.env.VITE_MENU_ICON, localIcon } = route.meta ?? {}; | ||||
|   const { title, i18nKey, icon = import.meta.env.VITE_MENU_ICON, localIcon, iconFontSize } = route.meta ?? {}; | ||||
|  | ||||
|   const label = i18nKey ? $t(i18nKey) : title!; | ||||
|  | ||||
| @@ -133,7 +133,7 @@ function getGlobalMenuByBaseRoute(route: RouteLocationNormalizedLoaded | Elegant | ||||
|     i18nKey, | ||||
|     routeKey: name as RouteKey, | ||||
|     routePath: path as RouteMap[RouteKey], | ||||
|     icon: SvgIconVNode({ icon, localIcon, fontSize: 20 }) | ||||
|     icon: SvgIconVNode({ icon, localIcon, fontSize: iconFontSize || 20 }) | ||||
|   }; | ||||
|  | ||||
|   return menu; | ||||
|   | ||||
| @@ -290,6 +290,7 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => { | ||||
|     resetTabLabel, | ||||
|     isTabRetain, | ||||
|     updateTabsByLocale, | ||||
|     getTabIdByRoute | ||||
|     getTabIdByRoute, | ||||
|     cacheTabs | ||||
|   }; | ||||
| }); | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import type { PiniaPluginContext } from 'pinia'; | ||||
| import { cloneDeep } from 'lodash-es'; | ||||
| import { jsonClone } from '@sa/utils'; | ||||
| import { SetupStoreId } from '@/enum'; | ||||
|  | ||||
| /** | ||||
| @@ -13,7 +13,7 @@ export function resetSetupStore(context: PiniaPluginContext) { | ||||
|   if (setupSyntaxIds.includes(context.store.$id)) { | ||||
|     const { $state } = context.store; | ||||
|  | ||||
|     const defaultStore = cloneDeep($state); | ||||
|     const defaultStore = jsonClone($state); | ||||
|  | ||||
|     context.store.$reset = () => { | ||||
|       context.store.$patch(defaultStore); | ||||
|   | ||||
							
								
								
									
										1
									
								
								src/typings/app.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -273,6 +273,7 @@ declare namespace App { | ||||
|         deleteSuccess: string; | ||||
|         confirmDelete: string; | ||||
|         edit: string; | ||||
|         error: string; | ||||
|         index: string; | ||||
|         keywordSearch: string; | ||||
|         logout: string; | ||||
|   | ||||
							
								
								
									
										4
									
								
								src/typings/env.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -105,3 +105,7 @@ declare namespace Env { | ||||
|     readonly VITE_STORAGE_PREFIX?: string; | ||||
|   } | ||||
| } | ||||
|  | ||||
| interface ImportMeta { | ||||
|   readonly env: Env.ImportMeta; | ||||
| } | ||||
|   | ||||
							
								
								
									
										46
									
								
								src/typings/global.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,27 +1,27 @@ | ||||
| interface Window { | ||||
|   /** NProgress instance */ | ||||
|   NProgress?: import('nprogress').NProgress; | ||||
|   /** Loading bar instance */ | ||||
|   $loadingBar?: import('naive-ui').LoadingBarProviderInst; | ||||
|   /** Dialog instance */ | ||||
|   $dialog?: import('naive-ui').DialogProviderInst; | ||||
|   /** Message instance */ | ||||
|   $message?: import('naive-ui').MessageProviderInst; | ||||
|   /** Notification instance */ | ||||
|   $notification?: import('naive-ui').NotificationProviderInst; | ||||
| } | ||||
| export {}; | ||||
|  | ||||
| interface ViewTransition { | ||||
|   ready: Promise<void>; | ||||
| } | ||||
| declare global { | ||||
|   export interface Window { | ||||
|     /** NProgress instance */ | ||||
|     NProgress?: import('nprogress').NProgress; | ||||
|     /** Loading bar instance */ | ||||
|     $loadingBar?: import('naive-ui').LoadingBarProviderInst; | ||||
|     /** Dialog instance */ | ||||
|     $dialog?: import('naive-ui').DialogProviderInst; | ||||
|     /** Message instance */ | ||||
|     $message?: import('naive-ui').MessageProviderInst; | ||||
|     /** Notification instance */ | ||||
|     $notification?: import('naive-ui').NotificationProviderInst; | ||||
|   } | ||||
|  | ||||
| interface Document { | ||||
|   startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition; | ||||
| } | ||||
|   interface ViewTransition { | ||||
|     ready: Promise<void>; | ||||
|   } | ||||
|  | ||||
| interface ImportMeta { | ||||
|   readonly env: Env.ImportMeta; | ||||
| } | ||||
|   export interface Document { | ||||
|     startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition; | ||||
|   } | ||||
|  | ||||
| /** Build time of the project */ | ||||
| declare const BUILD_TIME: string; | ||||
|   /** Build time of the project */ | ||||
|   export const BUILD_TIME: string; | ||||
| } | ||||
|   | ||||
							
								
								
									
										2
									
								
								src/typings/router.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -42,6 +42,8 @@ declare module 'vue-router' { | ||||
|      * In "src/assets/svg-icon", if it is set, the icon will be ignored | ||||
|      */ | ||||
|     localIcon?: string; | ||||
|     /** Icon size. width and height are the same. */ | ||||
|     iconFontSize?: number; | ||||
|     /** Router order */ | ||||
|     order?: number | null; | ||||
|     /** The outer link of the route */ | ||||
|   | ||||
| @@ -18,7 +18,7 @@ const { bool: visible, setTrue: openModal } = useBoolean(); | ||||
|  | ||||
| const wrapperRef = ref<HTMLElement | null>(null); | ||||
|  | ||||
| const { columns, columnChecks, data, loading, pagination, getData } = useTable({ | ||||
| const { columns, columnChecks, data, loading, pagination, getData, getDataByPage } = useTable({ | ||||
|   apiFn: fetchGetMenuList, | ||||
|   columns: () => [ | ||||
|     { | ||||
| @@ -37,7 +37,7 @@ const { columns, columnChecks, data, loading, pagination, getData } = useTable({ | ||||
|       align: 'center', | ||||
|       width: 80, | ||||
|       render: row => { | ||||
|         const tagMap: Record<Api.Common.EnableStatus, NaiveUI.ThemeColor> = { | ||||
|         const tagMap: Record<Api.SystemManage.MenuType, NaiveUI.ThemeColor> = { | ||||
|           1: 'default', | ||||
|           2: 'primary' | ||||
|         }; | ||||
| @@ -257,7 +257,7 @@ init(); | ||||
|         :operate-type="operateType" | ||||
|         :row-data="editingData" | ||||
|         :all-pages="allPages" | ||||
|         @submitted="getData" | ||||
|         @submitted="getDataByPage" | ||||
|       /> | ||||
|     </NCard> | ||||
|   </div> | ||||
|   | ||||
| @@ -10,7 +10,17 @@ import RoleSearch from './modules/role-search.vue'; | ||||
|  | ||||
| const appStore = useAppStore(); | ||||
|  | ||||
| const { columns, columnChecks, data, loading, getData, mobilePagination, searchParams, resetSearchParams } = useTable({ | ||||
| const { | ||||
|   columns, | ||||
|   columnChecks, | ||||
|   data, | ||||
|   loading, | ||||
|   getData, | ||||
|   getDataByPage, | ||||
|   mobilePagination, | ||||
|   searchParams, | ||||
|   resetSearchParams | ||||
| } = useTable({ | ||||
|   apiFn: fetchGetRoleList, | ||||
|   apiParams: { | ||||
|     current: 1, | ||||
| @@ -129,7 +139,7 @@ function edit(id: number) { | ||||
|  | ||||
| <template> | ||||
|   <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> | ||||
|     <RoleSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getData" /> | ||||
|     <RoleSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getDataByPage" /> | ||||
|     <NCard :title="$t('page.manage.role.title')" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> | ||||
|       <template #header-extra> | ||||
|         <TableHeaderOperation | ||||
| @@ -158,7 +168,7 @@ function edit(id: number) { | ||||
|         v-model:visible="drawerVisible" | ||||
|         :operate-type="operateType" | ||||
|         :row-data="editingData" | ||||
|         @submitted="getData" | ||||
|         @submitted="getDataByPage" | ||||
|       /> | ||||
|     </NCard> | ||||
|   </div> | ||||
|   | ||||
| @@ -10,7 +10,17 @@ import UserSearch from './modules/user-search.vue'; | ||||
|  | ||||
| const appStore = useAppStore(); | ||||
|  | ||||
| const { columns, columnChecks, data, getData, loading, mobilePagination, searchParams, resetSearchParams } = useTable({ | ||||
| const { | ||||
|   columns, | ||||
|   columnChecks, | ||||
|   data, | ||||
|   getData, | ||||
|   getDataByPage, | ||||
|   loading, | ||||
|   mobilePagination, | ||||
|   searchParams, | ||||
|   resetSearchParams | ||||
| } = useTable({ | ||||
|   apiFn: fetchGetUserList, | ||||
|   showTotal: true, | ||||
|   apiParams: { | ||||
| @@ -160,7 +170,7 @@ function edit(id: number) { | ||||
|  | ||||
| <template> | ||||
|   <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> | ||||
|     <UserSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getData" /> | ||||
|     <UserSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getDataByPage" /> | ||||
|     <NCard :title="$t('page.manage.user.title')" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> | ||||
|       <template #header-extra> | ||||
|         <TableHeaderOperation | ||||
| @@ -189,7 +199,7 @@ function edit(id: number) { | ||||
|         v-model:visible="drawerVisible" | ||||
|         :operate-type="operateType" | ||||
|         :row-data="editingData" | ||||
|         @submitted="getData" | ||||
|         @submitted="getDataByPage" | ||||
|       /> | ||||
|     </NCard> | ||||
|   </div> | ||||
|   | ||||