Compare commits

...

10 Commits

Author SHA1 Message Date
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
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
21 changed files with 751 additions and 1012 deletions

1
.npmrc
View File

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

View File

@@ -13,7 +13,6 @@
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": ["src/locales/langs"],
"prettier.enable": false,
"unocss.root": ["./"],
"typescript.tsdk": "node_modules/typescript/lib",
"vue.server.hybridMode": true
"unocss.root": ["./"]
}

View File

@@ -1,6 +1,36 @@
# Changelog
## [v1.0.9](https://github.com/soybeanjs/soybean-admin/compare/v1.0.8...v1.0.9) (2024-05-05)
###    🚀 Features
- **packages**: @sa/scripts: add new commit type `optimize` and commit scope `packages` &nbsp;-&nbsp; by @honghuangdc [<samp>(fbc2e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/fbc2e61)
### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes
- **projects**: fix manage page drawer operate about data reset. fixed #415, fixed #417 &nbsp;-&nbsp; by @honghuangdc in https://github.com/soybeanjs/soybean-admin/issues/415 and https://github.com/soybeanjs/soybean-admin/issues/417 [<samp>(f4513)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f4513e1)
### &nbsp;&nbsp;&nbsp;📖 Documentation
- **projects**:
- add ecosystem to README.md &nbsp;-&nbsp; by @honghuangdc [<samp>(d0f17)</samp>](https://github.com/soybeanjs/soybean-admin/commit/d0f17a4)
- add PanisAdmin to README &nbsp;-&nbsp; by **paynezhuang** [<samp>(ce2a7)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ce2a75b)
### &nbsp;&nbsp;&nbsp;🏡 Chore
- **deps**:
- update deps &nbsp;-&nbsp; by @honghuangdc [<samp>(413a8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/413a8b2)
- update deps &nbsp;-&nbsp; by @honghuangdc [<samp>(734ef)</samp>](https://github.com/soybeanjs/soybean-admin/commit/734ef98)
- **projects**:
- update .npmrc &nbsp;-&nbsp; by @honghuangdc [<samp>(52188)</samp>](https://github.com/soybeanjs/soybean-admin/commit/52188d8)
- update vscode settings &nbsp;-&nbsp; by @honghuangdc [<samp>(c137b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c137b97)
### &nbsp;&nbsp;&nbsp;❤️ Contributors
[![honghuangdc](https://github.com/honghuangdc.png?size=48)](https://github.com/honghuangdc)&nbsp;&nbsp;
[paynezhuang](mailto:paynezhuang@gmail.com)
## [v1.0.8](https://github.com/soybeanjs/soybean-admin/compare/v1.0.7...v1.0.8) (2024-04-27)
### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes

View File

@@ -106,6 +106,15 @@ pnpm dev
pnpm build
```
## Ecosystem
- [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.
## 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).

View File

@@ -105,6 +105,15 @@ pnpm dev
pnpm build
```
## 周边生态
- [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),适配动态菜单/按钮级别的鉴权,保留原汁原味、清新优雅、高颜值的后台管理系统脚手架。
## 如何贡献
我们热烈欢迎并感谢所有形式的贡献。如果您有任何想法或建议,欢迎通过提交 [pull requests](https://github.com/soybeanjs/soybean-admin/pulls) 或创建 GitHub [issue](https://github.com/soybeanjs/soybean-admin/issues/new) 来分享。
@@ -126,6 +135,7 @@ pnpm build
[Soybean](https://github.com/honghuangdc)
## 贡献者
感谢以下贡献者的贡献。如果您想为本项目做出贡献,请参考 [如何贡献](#如何贡献)。

View File

@@ -1,7 +1,7 @@
{
"name": "soybean-admin",
"type": "module",
"version": "1.0.8",
"version": "1.0.9",
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
"author": {
"name": "Soybean",
@@ -55,25 +55,25 @@
"@sa/utils": "workspace:*",
"@vueuse/core": "10.9.0",
"clipboard": "2.0.11",
"dayjs": "1.11.10",
"dayjs": "1.11.11",
"echarts": "5.5.0",
"lodash-es": "4.17.21",
"naive-ui": "2.38.1",
"naive-ui": "2.38.2",
"nprogress": "0.2.0",
"pinia": "2.1.7",
"vue": "3.4.25",
"vue": "3.4.26",
"vue-draggable-plus": "0.4.0",
"vue-i18n": "9.13.1",
"vue-router": "4.3.2"
},
"devDependencies": {
"@elegant-router/vue": "0.3.6",
"@iconify/json": "2.2.204",
"@iconify/json": "2.2.206",
"@sa/scripts": "workspace:*",
"@sa/uno-preset": "workspace:*",
"@soybeanjs/eslint-config": "1.3.2",
"@soybeanjs/eslint-config": "1.3.4",
"@types/lodash-es": "4.17.12",
"@types/node": "20.12.7",
"@types/node": "20.12.8",
"@types/nprogress": "0.2.3",
"@unocss/eslint-config": "0.59.4",
"@unocss/preset-icons": "0.59.4",
@@ -83,21 +83,21 @@
"@unocss/vite": "0.59.4",
"@vitejs/plugin-vue": "5.0.4",
"@vitejs/plugin-vue-jsx": "3.1.0",
"eslint": "9.1.1",
"eslint": "9.2.0",
"eslint-plugin-vue": "9.25.0",
"lint-staged": "15.2.2",
"sass": "1.75.0",
"sass": "1.76.0",
"simple-git-hooks": "2.11.1",
"tsx": "4.7.3",
"tsx": "4.9.1",
"typescript": "5.4.5",
"unplugin-icons": "0.18.5",
"unplugin-vue-components": "0.26.0",
"vite": "5.2.10",
"unplugin-icons": "0.19.0",
"unplugin-vue-components": "0.27.0",
"vite": "5.2.11",
"vite-plugin-progress": "0.0.7",
"vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-devtools": "7.1.2",
"vite-plugin-vue-devtools": "7.1.3",
"vue-eslint-parser": "9.4.2",
"vue-tsc": "2.0.14"
"vue-tsc": "2.0.16"
},
"simple-git-hooks": {
"commit-msg": "pnpm sa git-commit-verify",

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/axios",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/color-palette",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/hooks",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/materials",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/fetch",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/scripts",
"version": "1.0.8",
"version": "1.0.9",
"bin": {
"sa": "./bin.ts"
},
@@ -13,15 +13,15 @@
}
},
"devDependencies": {
"@soybeanjs/changelog": "0.3.22",
"bumpp": "9.4.0",
"@soybeanjs/changelog": "0.3.23",
"bumpp": "9.4.1",
"c12": "1.10.0",
"cac": "6.7.14",
"consola": "3.2.3",
"enquirer": "2.4.1",
"execa": "8.0.1",
"kolorist": "1.8.0",
"npm-check-updates": "16.14.19",
"npm-check-updates": "16.14.20",
"rimraf": "5.0.5"
}
}

View File

@@ -19,6 +19,7 @@ const defaultOptions: CliOption = {
['style', 'Changes that do not affect the meaning of the code'],
['refactor', 'A code change that neither fixes a bug nor adds a feature'],
['perf', 'A code change that improves performance'],
['optimize', 'A code change that optimizes code quality'],
['test', 'Adding missing tests or correcting existing tests'],
['build', 'Changes that affect the build system or external dependencies'],
['ci', 'Changes to our CI configuration files and scripts'],
@@ -27,6 +28,7 @@ const defaultOptions: CliOption = {
],
gitCommitScopes: [
['projects', 'project'],
['packages', 'packages'],
['components', 'components'],
['hooks', 'hook functions'],
['utils', 'utils functions'],

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/uno-preset",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@sa/utils",
"version": "1.0.8",
"version": "1.0.9",
"exports": {
".": "./src/index.ts"
},

1616
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +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 { useBoolean, useHookTable } from '@sa/hooks';
import { useAppStore } from '@/store/modules/app';
import { $t } from '@/locales';
@@ -186,7 +187,8 @@ export function useTableOperate<T extends TableData = TableData>(data: Ref<T[]>,
function handleEdit(id: T['id']) {
operateType.value = 'edit';
editingData.value = data.value.find(item => item.id === id) || null;
const findItem = data.value.find(item => item.id === id) || null;
editingData.value = cloneDeep(findItem);
openDrawer();
}

View File

@@ -1,10 +1,10 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
AppProvider: typeof import('./../components/common/app-provider.vue')['default']

View File

@@ -136,20 +136,18 @@ const layoutOptions: CommonType.Option[] = [
}
];
function handleUpdateModel() {
if (props.operateType === 'add') {
Object.assign(model, createDefaultModel());
function handleInitModel() {
Object.assign(model, createDefaultModel());
return;
}
if (!props.rowData) return;
if (props.operateType === 'addChild' && props.rowData) {
if (props.operateType === 'addChild') {
const { id } = props.rowData;
Object.assign(model, createDefaultModel(), { parentId: id });
Object.assign(model, { parentId: id });
}
if (props.operateType === 'edit' && props.rowData) {
if (props.operateType === 'edit') {
const { component, ...rest } = props.rowData;
const { layout, page } = getLayoutAndPage(component);
@@ -175,7 +173,7 @@ async function handleSubmit() {
watch(visible, () => {
if (visible.value) {
handleUpdateModel();
handleInitModel();
restoreValidation();
}
});

View File

@@ -68,11 +68,8 @@ const roleId = computed(() => props.rowData?.id || -1);
const isEdit = computed(() => props.operateType === 'edit');
function handleUpdateModelWhenEdit() {
if (props.operateType === 'add') {
Object.assign(model, createDefaultModel());
return;
}
function handleInitModel() {
Object.assign(model, createDefaultModel());
if (props.operateType === 'edit' && props.rowData) {
Object.assign(model, props.rowData);
@@ -93,7 +90,7 @@ async function handleSubmit() {
watch(visible, () => {
if (visible.value) {
handleUpdateModelWhenEdit();
handleInitModel();
restoreValidation();
}
});

View File

@@ -89,11 +89,8 @@ async function getRoleOptions() {
}
}
function handleUpdateModelWhenEdit() {
if (props.operateType === 'add') {
Object.assign(model, createDefaultModel());
return;
}
function handleInitModel() {
Object.assign(model, createDefaultModel());
if (props.operateType === 'edit' && props.rowData) {
Object.assign(model, props.rowData);
@@ -114,7 +111,7 @@ async function handleSubmit() {
watch(visible, () => {
if (visible.value) {
handleUpdateModelWhenEdit();
handleInitModel();
restoreValidation();
getRoleOptions();
}