diff --git a/docs/package.json b/docs/package.json index f57dfc85..639ca07a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@vben/docs", - "version": "5.5.7", + "version": "5.5.8", "private": true, "scripts": { "build": "vitepress build", diff --git a/docs/src/components/common-ui/vben-form.md b/docs/src/components/common-ui/vben-form.md index a6d45525..aed2b9f8 100644 --- a/docs/src/components/common-ui/vben-form.md +++ b/docs/src/components/common-ui/vben-form.md @@ -395,7 +395,7 @@ export interface FormCommonConfig { * 所有表单项的栅格布局 * @default "" */ - formItemClass?: string; + formItemClass?: (() => string) | string; /** * 隐藏所有表单项label * @default false diff --git a/internal/lint-configs/commitlint-config/package.json b/internal/lint-configs/commitlint-config/package.json index a137f947..16984c2f 100644 --- a/internal/lint-configs/commitlint-config/package.json +++ b/internal/lint-configs/commitlint-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/commitlint-config", - "version": "5.5.7", + "version": "5.5.8", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/lint-configs/stylelint-config/package.json b/internal/lint-configs/stylelint-config/package.json index 8e2a97c2..00f9b1d1 100644 --- a/internal/lint-configs/stylelint-config/package.json +++ b/internal/lint-configs/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/stylelint-config", - "version": "5.5.7", + "version": "5.5.8", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/node-utils/package.json b/internal/node-utils/package.json index 8b8db745..490df9e9 100644 --- a/internal/node-utils/package.json +++ b/internal/node-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vben/node-utils", - "version": "5.5.7", + "version": "5.5.8", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/tailwind-config/package.json b/internal/tailwind-config/package.json index 8506891b..72c63819 100644 --- a/internal/tailwind-config/package.json +++ b/internal/tailwind-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/tailwind-config", - "version": "5.5.7", + "version": "5.5.8", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/tsconfig/package.json b/internal/tsconfig/package.json index 44ee3f1b..74cfb915 100644 --- a/internal/tsconfig/package.json +++ b/internal/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@vben/tsconfig", - "version": "5.5.7", + "version": "5.5.8", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/vite-config/package.json b/internal/vite-config/package.json index d7ba6a65..c37777f2 100644 --- a/internal/vite-config/package.json +++ b/internal/vite-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/vite-config", - "version": "5.5.6", + "version": "5.5.8", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/package.json b/package.json index b99d4f4b..784bea4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vben-admin-monorepo", - "version": "5.5.7", + "version": "5.5.8", "private": true, "keywords": [ "monorepo", diff --git a/packages/@core/base/design/package.json b/packages/@core/base/design/package.json index 33e92474..13d2fefc 100644 --- a/packages/@core/base/design/package.json +++ b/packages/@core/base/design/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/design", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/base/icons/package.json b/packages/@core/base/icons/package.json index 9a349883..1e6e5250 100644 --- a/packages/@core/base/icons/package.json +++ b/packages/@core/base/icons/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/icons", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/base/shared/package.json b/packages/@core/base/shared/package.json index b02cc6e4..6599c54c 100644 --- a/packages/@core/base/shared/package.json +++ b/packages/@core/base/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/shared", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/base/typings/package.json b/packages/@core/base/typings/package.json index e2ab1870..e0e2c372 100644 --- a/packages/@core/base/typings/package.json +++ b/packages/@core/base/typings/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/typings", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/composables/package.json b/packages/@core/composables/package.json index 08db5106..39ca108f 100644 --- a/packages/@core/composables/package.json +++ b/packages/@core/composables/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/composables", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/preferences/package.json b/packages/@core/preferences/package.json index 726b473d..786e6c2c 100644 --- a/packages/@core/preferences/package.json +++ b/packages/@core/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/preferences", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/ui-kit/form-ui/package.json b/packages/@core/ui-kit/form-ui/package.json index 36ae1678..497da77a 100644 --- a/packages/@core/ui-kit/form-ui/package.json +++ b/packages/@core/ui-kit/form-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/form-ui", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form.vue b/packages/@core/ui-kit/form-ui/src/form-render/form.vue index ff827c42..a8ca22a4 100644 --- a/packages/@core/ui-kit/form-ui/src/form-render/form.vue +++ b/packages/@core/ui-kit/form-ui/src/form-render/form.vue @@ -12,7 +12,12 @@ import type { import { computed } from 'vue'; import { Form } from '@vben-core/shadcn-ui'; -import { cn, isString, mergeWithArrayOverride } from '@vben-core/shared/utils'; +import { + cn, + isFunction, + isString, + mergeWithArrayOverride, +} from '@vben-core/shared/utils'; import { provideFormRenderProps } from './context'; import { useExpandable } from './expandable'; @@ -110,6 +115,17 @@ const computedSchema = computed( ? keepIndex <= index : false; + // 处理函数形式的formItemClass + let resolvedSchemaFormItemClass = schema.formItemClass; + if (isFunction(schema.formItemClass)) { + try { + resolvedSchemaFormItemClass = schema.formItemClass(); + } catch (error) { + console.error('Error calling formItemClass function:', error); + resolvedSchemaFormItemClass = ''; + } + } + return { colon, disabled, @@ -133,7 +149,7 @@ const computedSchema = computed( 'flex-shrink-0', { hidden }, formItemClass, - schema.formItemClass, + resolvedSchemaFormItemClass, ), labelClass: cn(labelClass, schema.labelClass), }; diff --git a/packages/@core/ui-kit/form-ui/src/types.ts b/packages/@core/ui-kit/form-ui/src/types.ts index ccfe8dd8..a8501e81 100644 --- a/packages/@core/ui-kit/form-ui/src/types.ts +++ b/packages/@core/ui-kit/form-ui/src/types.ts @@ -174,10 +174,10 @@ export interface FormCommonConfig { */ formFieldProps?: FormFieldOptions; /** - * 所有表单项的栅格布局 + * 所有表单项的栅格布局,支持函数形式 * @default "" */ - formItemClass?: string; + formItemClass?: (() => string) | string; /** * 隐藏所有表单项label * @default false diff --git a/packages/@core/ui-kit/layout-ui/package.json b/packages/@core/ui-kit/layout-ui/package.json index 57a462fe..0cf9ff87 100644 --- a/packages/@core/ui-kit/layout-ui/package.json +++ b/packages/@core/ui-kit/layout-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/layout-ui", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/ui-kit/menu-ui/package.json b/packages/@core/ui-kit/menu-ui/package.json index 760d7646..3f893168 100644 --- a/packages/@core/ui-kit/menu-ui/package.json +++ b/packages/@core/ui-kit/menu-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/menu-ui", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/ui-kit/shadcn-ui/package.json b/packages/@core/ui-kit/shadcn-ui/package.json index 11d2918f..0525a303 100644 --- a/packages/@core/ui-kit/shadcn-ui/package.json +++ b/packages/@core/ui-kit/shadcn-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/shadcn-ui", - "version": "5.5.7", + "version": "5.5.8", "#main": "./dist/index.mjs", "#module": "./dist/index.mjs", "homepage": "https://github.com/vbenjs/vue-vben-admin", diff --git a/packages/@core/ui-kit/tabs-ui/package.json b/packages/@core/ui-kit/tabs-ui/package.json index bc84b4d6..93c16e1e 100644 --- a/packages/@core/ui-kit/tabs-ui/package.json +++ b/packages/@core/ui-kit/tabs-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/tabs-ui", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/constants/package.json b/packages/constants/package.json index c71e1184..2b098a2a 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -1,6 +1,6 @@ { "name": "@vben/constants", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/access/package.json b/packages/effects/access/package.json index e4c39eb2..f620d6dc 100644 --- a/packages/effects/access/package.json +++ b/packages/effects/access/package.json @@ -1,6 +1,6 @@ { "name": "@vben/access", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/common-ui/package.json b/packages/effects/common-ui/package.json index 66f9f21a..2072e8ba 100644 --- a/packages/effects/common-ui/package.json +++ b/packages/effects/common-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben/common-ui", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/hooks/package.json b/packages/effects/hooks/package.json index 004f3c50..b5bcc0a0 100644 --- a/packages/effects/hooks/package.json +++ b/packages/effects/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@vben/hooks", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/layouts/package.json b/packages/effects/layouts/package.json index a8439a02..76c99faf 100644 --- a/packages/effects/layouts/package.json +++ b/packages/effects/layouts/package.json @@ -1,6 +1,6 @@ { "name": "@vben/layouts", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/plugins/package.json b/packages/effects/plugins/package.json index 40c16c7d..edbb7284 100644 --- a/packages/effects/plugins/package.json +++ b/packages/effects/plugins/package.json @@ -1,6 +1,6 @@ { "name": "@vben/plugins", - "version": "5.5.6", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue index 3867b065..c1a73260 100644 --- a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue +++ b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue @@ -303,7 +303,7 @@ async function init() { if (enableProxyConfig && autoLoad) { // 第一次拿到的是readonly的数据 如果需要修改 需要cloneDeep props.api.grid.commitProxy?.( - 'initial', + 'query', cloneDeep(formOptions.value) ? (cloneDeep(await formApi.getValues()) ?? {}) : {}, diff --git a/packages/effects/request/package.json b/packages/effects/request/package.json index 527f6d90..5e6bb141 100644 --- a/packages/effects/request/package.json +++ b/packages/effects/request/package.json @@ -1,6 +1,6 @@ { "name": "@vben/request", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/icons/package.json b/packages/icons/package.json index a21d92cd..4e20050d 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@vben/icons", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/locales/package.json b/packages/locales/package.json index 5e92de54..281df25a 100644 --- a/packages/locales/package.json +++ b/packages/locales/package.json @@ -1,6 +1,6 @@ { "name": "@vben/locales", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/preferences/package.json b/packages/preferences/package.json index de276c72..e3334f33 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@vben/preferences", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/stores/package.json b/packages/stores/package.json index c9860b59..bb5796f4 100644 --- a/packages/stores/package.json +++ b/packages/stores/package.json @@ -1,6 +1,6 @@ { "name": "@vben/stores", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/styles/package.json b/packages/styles/package.json index 127bd4d5..960842da 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,6 +1,6 @@ { "name": "@vben/styles", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/types/package.json b/packages/types/package.json index 2fa047d8..74a4b547 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@vben/types", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/utils/package.json b/packages/utils/package.json index d2994bbb..b8f81b5e 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@vben/utils", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/playground/package.json b/playground/package.json index 8bfd17d5..c918f2de 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,6 +1,6 @@ { "name": "@vben/playground", - "version": "5.5.7", + "version": "5.5.8", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/playground/src/views/system/dept/list.vue b/playground/src/views/system/dept/list.vue index 1b4154d4..13d45a6e 100644 --- a/playground/src/views/system/dept/list.vue +++ b/playground/src/views/system/dept/list.vue @@ -110,7 +110,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ toolbarConfig: { custom: true, export: false, - refresh: { code: 'query' }, + refresh: true, zoom: true, }, treeConfig: { diff --git a/playground/src/views/system/menu/list.vue b/playground/src/views/system/menu/list.vue index 9ab45644..759dccf6 100644 --- a/playground/src/views/system/menu/list.vue +++ b/playground/src/views/system/menu/list.vue @@ -44,7 +44,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ toolbarConfig: { custom: true, export: false, - refresh: { code: 'query' }, + refresh: true, zoom: true, }, treeConfig: { diff --git a/playground/src/views/system/role/list.vue b/playground/src/views/system/role/list.vue index b5e383a6..f89228f6 100644 --- a/playground/src/views/system/role/list.vue +++ b/playground/src/views/system/role/list.vue @@ -52,7 +52,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ toolbarConfig: { custom: true, export: false, - refresh: { code: 'query' }, + refresh: true, search: true, zoom: true, }, diff --git a/scripts/turbo-run/package.json b/scripts/turbo-run/package.json index 4639c873..0a884157 100644 --- a/scripts/turbo-run/package.json +++ b/scripts/turbo-run/package.json @@ -1,6 +1,6 @@ { "name": "@vben/turbo-run", - "version": "5.5.7", + "version": "5.5.8", "private": true, "license": "MIT", "type": "module", diff --git a/scripts/vsh/package.json b/scripts/vsh/package.json index a901e3c7..db4c55f6 100644 --- a/scripts/vsh/package.json +++ b/scripts/vsh/package.json @@ -1,6 +1,6 @@ { "name": "@vben/vsh", - "version": "5.5.6", + "version": "5.5.8", "private": true, "license": "MIT", "type": "module",