From 234544c40d6598d47f0dd20651752e3c1e9591a4 Mon Sep 17 00:00:00 2001 From: afe1 <2279948211@qq.com> Date: Sun, 20 Oct 2024 21:06:37 +0800 Subject: [PATCH 1/6] fix: vite-config warmup config (#4693) --- internal/vite-config/src/config/application.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/vite-config/src/config/application.ts b/internal/vite-config/src/config/application.ts index f323e662..6e228c34 100644 --- a/internal/vite-config/src/config/application.ts +++ b/internal/vite-config/src/config/application.ts @@ -84,7 +84,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) { // 预热文件 clientFiles: [ './index.html', - './bootstrap.ts', + './src/bootstrap.ts', './src/{views,layouts,router,store,api}/*', ], }, From 646598afba45fdab910f5a3f85a99ac993df5428 Mon Sep 17 00:00:00 2001 From: Svend Date: Sun, 20 Oct 2024 21:07:34 +0800 Subject: [PATCH 2/6] fix(@vben-core/form-ui): fix the issue of Textarea not being able to wrap lines in the form (#4691) --- packages/@core/ui-kit/form-ui/src/vben-use-form.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/@core/ui-kit/form-ui/src/vben-use-form.vue b/packages/@core/ui-kit/form-ui/src/vben-use-form.vue index bf06a073..8926232f 100644 --- a/packages/@core/ui-kit/form-ui/src/vben-use-form.vue +++ b/packages/@core/ui-kit/form-ui/src/vben-use-form.vue @@ -39,7 +39,14 @@ const handleUpdateCollapsed = (value: boolean) => { props.formApi?.setState({ collapsed: !!value }); }; -function handleKeyDownEnter() { +function handleKeyDownEnter(event: KeyboardEvent) { + // 如果是 textarea 不阻止默认行为,否则会导致无法换行。 + // 跳过 textarea 的回车提交处理 + if (event.target instanceof HTMLTextAreaElement) { + return; + } + event.preventDefault(); + if (!state.value.submitOnEnter || !formActionsRef.value) { return; } @@ -49,7 +56,7 @@ function handleKeyDownEnter() {