mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-22 03:26:38 +08:00
chore(projects): merge branch main into example
This commit is contained in:
commit
447bda2b48
27
CHANGELOG.md
27
CHANGELOG.md
@ -1,6 +1,33 @@
|
||||
# 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
|
||||
|
@ -1,6 +1,60 @@
|
||||
# 更新日志
|
||||
|
||||
|
||||
## [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)
|
||||
|
||||
### 🐞 错误修复
|
||||
|
34
package.json
34
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "soybean-admin",
|
||||
"type": "module",
|
||||
"version": "1.2.7",
|
||||
"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",
|
||||
@ -57,12 +57,12 @@
|
||||
"@sa/utils": "workspace:*",
|
||||
"@vueuse/core": "10.11.0",
|
||||
"clipboard": "2.0.11",
|
||||
"dayjs": "1.11.11",
|
||||
"dayjs": "1.11.12",
|
||||
"dompurify": "3.1.6",
|
||||
"echarts": "5.5.1",
|
||||
"jsbarcode": "3.11.6",
|
||||
"lodash-es": "4.17.21",
|
||||
"naive-ui": "2.38.2",
|
||||
"naive-ui": "2.39.0",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.1.7",
|
||||
"pinyin-pro": "3.23.1",
|
||||
@ -70,7 +70,7 @@
|
||||
"swiper": "11.1.1",
|
||||
"tailwind-merge": "2.4.0",
|
||||
"vditor": "3.10.4",
|
||||
"vue": "3.4.31",
|
||||
"vue": "3.4.33",
|
||||
"vue-draggable-plus": "0.5.2",
|
||||
"vue-i18n": "9.13.1",
|
||||
"vue-router": "4.4.0",
|
||||
@ -80,36 +80,36 @@
|
||||
"devDependencies": {
|
||||
"@amap/amap-jsapi-types": "0.0.8",
|
||||
"@elegant-router/vue": "0.3.7",
|
||||
"@iconify/json": "2.2.226",
|
||||
"@iconify/json": "2.2.229",
|
||||
"@sa/scripts": "workspace:*",
|
||||
"@sa/uno-preset": "workspace:*",
|
||||
"@soybeanjs/eslint-config": "1.3.7",
|
||||
"@types/bmapgl": "0.0.5",
|
||||
"@types/dompurify": "3.0.5",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/node": "20.14.10",
|
||||
"@types/node": "20.14.11",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@unocss/eslint-config": "0.61.3",
|
||||
"@unocss/preset-icons": "0.61.3",
|
||||
"@unocss/preset-uno": "0.61.3",
|
||||
"@unocss/transformer-directives": "0.61.3",
|
||||
"@unocss/transformer-variant-group": "0.61.3",
|
||||
"@unocss/vite": "0.61.3",
|
||||
"@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.6.0",
|
||||
"eslint": "9.7.0",
|
||||
"eslint-plugin-vue": "9.27.0",
|
||||
"lint-staged": "15.2.7",
|
||||
"sass": "1.77.7",
|
||||
"sass": "1.77.8",
|
||||
"simple-git-hooks": "2.11.1",
|
||||
"tsx": "4.16.2",
|
||||
"typescript": "5.5.3",
|
||||
"unplugin-icons": "0.19.0",
|
||||
"unplugin-vue-components": "0.27.2",
|
||||
"vite": "5.3.3",
|
||||
"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.3.5",
|
||||
"vite-plugin-vue-devtools": "7.3.6",
|
||||
"vue-eslint-parser": "9.4.3",
|
||||
"vue-tsc": "2.0.26"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/axios",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/color",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/hooks",
|
||||
"version": "1.2.7",
|
||||
"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.7",
|
||||
"version": "1.2.8",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/fetch",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/scripts",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"bin": {
|
||||
"sa": "./bin.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/uno-preset",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/utils",
|
||||
"version": "1.2.7",
|
||||
"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
3
packages/utils/src/klona.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { klona as jsonClone } from 'klona/json';
|
||||
|
||||
export { jsonClone };
|
1113
pnpm-lock.yaml
1113
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -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';
|
||||
@ -225,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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user