diff --git a/.vscode/settings.json b/.vscode/settings.json index 62dc9828..49b28039 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -227,5 +227,6 @@ "typescript.tsdk": "node_modules/typescript/lib", "editor.linkedEditing": true, // 自动同步更改html标签, "vscodeCustomCodeColor.highlightValue": "v-access", // v-access显示的颜色 - "vscodeCustomCodeColor.highlightValueColor": "#CCFFFF" + "vscodeCustomCodeColor.highlightValueColor": "#CCFFFF", + "oxc.enable": false } diff --git a/cspell.json b/cspell.json index f89cb492..2baadf89 100644 --- a/cspell.json +++ b/cspell.json @@ -25,9 +25,12 @@ "lockb", "logininfor", "lucide", + "minh", + "minw", "mkdist", "mockjs", - "vitejs", + "naiveui", + "nocheck", "noopener", "noreferrer", "nprogress", @@ -51,6 +54,7 @@ "vben", "vbenjs", "vite", + "vitejs", "vitepress", "vnode", "vueuse", diff --git a/docs/.vitepress/config/en.mts b/docs/.vitepress/config/en.mts index b598bece..3f7dd4fa 100644 --- a/docs/.vitepress/config/en.mts +++ b/docs/.vitepress/config/en.mts @@ -221,9 +221,9 @@ function nav(): DefaultTheme.NavItem[] { link: '/commercial/community', text: '👨‍👦‍👦 Community', }, - { - link: '/friend-links/', - text: '🤝 Friend Links', - }, + // { + // link: '/friend-links/', + // text: '🤝 Friend Links', + // }, ]; } diff --git a/docs/.vitepress/config/zh.mts b/docs/.vitepress/config/zh.mts index 5c8505ab..fea3a3dd 100644 --- a/docs/.vitepress/config/zh.mts +++ b/docs/.vitepress/config/zh.mts @@ -282,10 +282,10 @@ function nav(): DefaultTheme.NavItem[] { // }, // ], }, - { - link: '/friend-links/', - text: '🤝 友情链接', - }, + // { + // link: '/friend-links/', + // text: '🤝 友情链接', + // }, ]; } diff --git a/package.json b/package.json index 04e68e78..302a7bfe 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "node": ">=20.10.0", "pnpm": ">=9.12.0" }, - "packageManager": "pnpm@9.12.3", + "packageManager": "pnpm@9.13.0", "pnpm": { "peerDependencyRules": { "allowedVersions": { diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue index af0ed900..bd3acaeb 100644 --- a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue +++ b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue @@ -238,6 +238,12 @@ function createComponentProps(slotProps: Record) { ...slotProps.componentField, ...computedProps.value, ...bindEvents, + ...(Reflect.has(computedProps.value, 'onChange') + ? { onChange: computedProps.value.onChange } + : {}), + ...(Reflect.has(computedProps.value, 'onInput') + ? { onInput: computedProps.value.onInput } + : {}), }; return binds; diff --git a/packages/effects/common-ui/src/components/index.ts b/packages/effects/common-ui/src/components/index.ts index 64653b5a..f1a04bb9 100644 --- a/packages/effects/common-ui/src/components/index.ts +++ b/packages/effects/common-ui/src/components/index.ts @@ -5,6 +5,7 @@ export * from './icon-picker'; export * from './json-preview'; export * from './markdown'; export * from './page'; +export * from './resize'; export * from '@vben-core/form-ui'; export * from '@vben-core/popup-ui'; diff --git a/packages/effects/common-ui/src/components/resize/index.ts b/packages/effects/common-ui/src/components/resize/index.ts new file mode 100644 index 00000000..f9375221 --- /dev/null +++ b/packages/effects/common-ui/src/components/resize/index.ts @@ -0,0 +1 @@ +export { default as VResize } from './resize.vue'; diff --git a/packages/effects/common-ui/src/components/resize/resize.vue b/packages/effects/common-ui/src/components/resize/resize.vue new file mode 100644 index 00000000..aaf89eaf --- /dev/null +++ b/packages/effects/common-ui/src/components/resize/resize.vue @@ -0,0 +1,1122 @@ + + + + + diff --git a/packages/effects/plugins/src/vxe-table/extends.ts b/packages/effects/plugins/src/vxe-table/extends.ts index 70a0ba44..4cb36fd6 100644 --- a/packages/effects/plugins/src/vxe-table/extends.ts +++ b/packages/effects/plugins/src/vxe-table/extends.ts @@ -1,3 +1,4 @@ +import type { Recordable } from '@vben/types'; import type { VxeGridProps, VxeUIExport } from 'vxe-table'; import type { VxeGridApi } from './api'; @@ -7,7 +8,7 @@ import { formatDate, formatDateTime, isFunction } from '@vben/utils'; export function extendProxyOptions( api: VxeGridApi, options: VxeGridProps, - getFormValues: () => Record, + getFormValues: () => Recordable, ) { [ 'query', @@ -25,17 +26,28 @@ function extendProxyOption( key: string, api: VxeGridApi, options: VxeGridProps, - getFormValues: () => Record, + getFormValues: () => Recordable, ) { const { proxyConfig } = options; - const configFn = (proxyConfig?.ajax as any)?.[key]; + const configFn = (proxyConfig?.ajax as Recordable)?.[key]; if (!isFunction(configFn)) { return options; } - const wrapperFn = async (params: any, _formValues: any, ...args: any[]) => { + const wrapperFn = async ( + params: Recordable, + customValues: Recordable, + ...args: Recordable[] + ) => { const formValues = getFormValues(); - const data = await configFn(params, formValues, ...args); + const data = await configFn( + params, + { + ...customValues, + ...formValues, + }, + ...args, + ); return data; }; api.setState({ diff --git a/packages/effects/plugins/src/vxe-table/theme.css b/packages/effects/plugins/src/vxe-table/style.css similarity index 98% rename from packages/effects/plugins/src/vxe-table/theme.css rename to packages/effects/plugins/src/vxe-table/style.css index 72c42c11..cafa397f 100644 --- a/packages/effects/plugins/src/vxe-table/theme.css +++ b/packages/effects/plugins/src/vxe-table/style.css @@ -81,7 +81,8 @@ } .vxe-tools--operate { - @apply ml-3; + margin-right: 0.25rem; + margin-left: 0.75rem; } .vxe-table-custom--checkbox-option:hover { 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 2d760e69..547d32d3 100644 --- a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue +++ b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue @@ -32,7 +32,7 @@ import { useTableForm } from './init'; import 'vxe-table/styles/cssvar.scss'; import 'vxe-pc-ui/styles/cssvar.scss'; -import './theme.css'; +import './style.css'; interface Props extends VxeGridProps { api: ExtendedVxeGridApi; @@ -278,7 +278,7 @@ onUnmounted(() => { ref="gridRef" :class=" cn( - 'p-2', + 'p-2 pt-0', { 'pt-0': showToolbar && !formOptions, }, diff --git a/playground/src/locales/langs/zh-CN/examples.json b/playground/src/locales/langs/zh-CN/examples.json index 5a6c1a27..227ec494 100644 --- a/playground/src/locales/langs/zh-CN/examples.json +++ b/playground/src/locales/langs/zh-CN/examples.json @@ -9,6 +9,9 @@ "ellipsis": { "title": "文本省略" }, + "resize": { + "title": "拖动调整" + }, "form": { "title": "表单", "basic": "基础表单", diff --git a/playground/src/router/routes/modules/examples.ts b/playground/src/router/routes/modules/examples.ts index 4adee5e5..82202b38 100644 --- a/playground/src/router/routes/modules/examples.ts +++ b/playground/src/router/routes/modules/examples.ts @@ -228,6 +228,15 @@ const routes: RouteRecordRaw[] = [ title: $t('examples.ellipsis.title'), }, }, + { + name: 'VueResizeDemo', + path: '/demos/resize/basic', + component: () => import('#/views/examples/resize/basic.vue'), + meta: { + icon: 'material-symbols:resize', + title: $t('examples.resize.title'), + }, + }, ], }, ]; diff --git a/playground/src/views/examples/resize/basic.vue b/playground/src/views/examples/resize/basic.vue new file mode 100644 index 00000000..a8fcd0dc --- /dev/null +++ b/playground/src/views/examples/resize/basic.vue @@ -0,0 +1,44 @@ + + + diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0d436f30..95d9b1d1 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -23,7 +23,7 @@ catalog: '@ctrl/tinycolor': ^4.1.0 '@eslint/js': ^9.14.0 '@faker-js/faker': ^9.2.0 - '@iconify/json': ^2.2.270 + '@iconify/json': ^2.2.271 '@iconify/tailwind': ^1.1.3 '@iconify/vue': ^4.1.2 '@intlify/core-base': ^10.0.4 @@ -37,7 +37,7 @@ catalog: '@tailwindcss/nesting': 0.0.0-insiders.565cd3e '@tailwindcss/typography': ^0.5.15 '@tanstack/vue-query': ^5.59.20 - '@tanstack/vue-store': ^0.5.6 + '@tanstack/vue-store': ^0.5.7 '@types/archiver': ^6.0.3 '@types/eslint': ^9.6.1 '@types/html-minifier-terser': ^7.0.2 @@ -53,7 +53,7 @@ catalog: '@typescript-eslint/parser': ^8.14.0 '@vee-validate/zod': ^4.14.7 '@vite-pwa/vitepress': ^0.5.3 - '@vitejs/plugin-vue': ^5.1.5 + '@vitejs/plugin-vue': ^5.2.0 '@vitejs/plugin-vue-jsx': ^4.1.0 '@vue/reactivity': ^3.5.12 '@vue/shared': ^3.5.12 @@ -89,7 +89,7 @@ catalog: eslint-plugin-command: ^0.2.6 eslint-plugin-eslint-comments: ^3.2.0 eslint-plugin-import-x: ^4.4.2 - eslint-plugin-jsdoc: ^50.4.3 + eslint-plugin-jsdoc: ^50.5.0 eslint-plugin-jsonc: ^2.18.1 eslint-plugin-n: ^17.13.1 eslint-plugin-no-only-tests: ^3.3.0 @@ -105,7 +105,7 @@ catalog: get-port: ^7.1.0 globals: ^15.12.0 h3: ^1.13.0 - happy-dom: ^15.11.2 + happy-dom: ^15.11.4 html-minifier-terser: ^7.2.0 husky: ^9.1.6 is-ci: ^3.0.1 @@ -137,7 +137,7 @@ catalog: radix-vue: ^1.9.9 resolve.exports: ^2.0.2 rimraf: ^6.0.1 - rollup: ^4.25.0 + rollup: ^4.26.0 rollup-plugin-visualizer: ^5.12.0 sass: 1.80.6 sortablejs: ^1.15.3 @@ -164,7 +164,7 @@ catalog: vite-plugin-dts: 4.2.1 vite-plugin-html: ^3.2.2 vite-plugin-lazy-import: ^1.0.7 - vite-plugin-pwa: ^0.20.5 + vite-plugin-pwa: ^0.21.0 vite-plugin-vue-devtools: ^7.6.4 vitepress: ^1.5.0 vitepress-plugin-group-icons: ^1.3.0 @@ -174,8 +174,8 @@ catalog: vue-i18n: ^10.0.4 vue-router: ^4.4.5 vue-tsc: ^2.1.10 - vxe-pc-ui: ^4.2.51 - vxe-table: ^4.8.10 + vxe-pc-ui: ^4.2.53 + vxe-table: ^4.8.14 watermark-js-plus: ^1.5.7 zod: ^3.23.8 zod-defaults: ^0.1.3