From 812dc142c8b13d8be8e37f0485a561301abb6c92 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud <79562285+wangdan-fit2cloud@users.noreply.github.com> Date: Tue, 1 Apr 2025 14:21:44 +0800 Subject: [PATCH] perf: Optimize some style issues --- .../component/chat-input-operate/index.vue | 4 +++- .../items/select/MultiSelect.vue | 1 - .../component/XPackDisplaySettingDialog.vue | 19 +++++++++++++------ ui/src/views/hit-test/index.vue | 11 ++++++++--- .../component/UserInputFieldTable.vue | 6 ++++-- 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 497fbc98b..9ee2762b6 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -686,7 +686,9 @@ function sendChatHandle(event?: any) { } } const insertNewlineAtCursor = (event?: any) => { - const textarea = document.querySelector('.el-textarea__inner') as HTMLTextAreaElement + const textarea = quickInputRef.value.$el.querySelector( + '.el-textarea__inner' + ) as HTMLTextAreaElement const startPos = textarea.selectionStart const endPos = textarea.selectionEnd // 阻止默认行为(避免额外的换行符) diff --git a/ui/src/components/dynamics-form/items/select/MultiSelect.vue b/ui/src/components/dynamics-form/items/select/MultiSelect.vue index f78f898c5..f397b37cb 100644 --- a/ui/src/components/dynamics-form/items/select/MultiSelect.vue +++ b/ui/src/components/dynamics-form/items/select/MultiSelect.vue @@ -2,7 +2,6 @@ -
+
-
+
-
+
@@ -233,6 +233,7 @@ const { params: { id } } = route as any +const quickInputRef = ref() const ParagraphDialogRef = ref() const loading = ref(false) const paragraphDetail = ref([]) @@ -297,7 +298,9 @@ function sendChatHandle(event: any) { } } const insertNewlineAtCursor = (event?: any) => { - const textarea = document.querySelector('.el-textarea__inner') as HTMLTextAreaElement + const textarea = quickInputRef.value.$el.querySelector( + '.el-textarea__inner' + ) as HTMLTextAreaElement const startPos = textarea.selectionStart const endPos = textarea.selectionEnd // 阻止默认行为(避免额外的换行符) @@ -354,6 +357,8 @@ onMounted(() => {}) padding-left: 40px; .text { padding: 6px 0; + height: 34px; + box-sizing: border-box; } } } @@ -402,7 +407,7 @@ onMounted(() => {}) } .hit-test-height { - height: calc(var(--app-main-height) - 135px); + height: calc(var(--app-main-height) - 170px); } .document-card { height: 210px; diff --git a/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue b/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue index fc39c4910..88615954c 100644 --- a/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue +++ b/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue @@ -1,6 +1,8 @@