Skip to content

Commit df7befe

Browse files
perf: Optimize some style issues
1 parent 26946d0 commit df7befe

File tree

5 files changed

+28
-13
lines changed

5 files changed

+28
-13
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,9 @@ function sendChatHandle(event?: any) {
686686
}
687687
}
688688
const insertNewlineAtCursor = (event?: any) => {
689-
const textarea = document.querySelector('.el-textarea__inner') as HTMLTextAreaElement
689+
const textarea = quickInputRef.value.$el.querySelector(
690+
'.el-textarea__inner'
691+
) as HTMLTextAreaElement
690692
const startPos = textarea.selectionStart
691693
const endPos = textarea.selectionEnd
692694
// 阻止默认行为(避免额外的换行符)

ui/src/components/dynamics-form/items/select/MultiSelect.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<el-select
33
class="m-2"
44
multiple
5-
collapse-tags
65
filterable
76
clearable
87
v-bind="$attrs"

ui/src/views/application-overview/component/XPackDisplaySettingDialog.vue

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,30 @@
102102
:width="
103103
xpackForm.show_avatar
104104
? xpackForm.show_user_avatar
105-
? '240px'
105+
? '232px'
106106
: '270px'
107107
: xpackForm.show_user_avatar
108-
? '270px'
108+
? '260px'
109109
: '300px'
110110
"
111111
/>
112112
</div>
113-
<div class="flex" style="justify-content: flex-end">
113+
<div class="flex mt-4" style="justify-content: flex-end">
114114
<img
115115
src="@/assets/display-bg3.png"
116116
alt=""
117-
:width="xpackForm.show_user_avatar ? '240px' : '270px'"
118-
class="mr-8"
117+
:width="
118+
xpackForm.show_user_avatar
119+
? xpackForm.show_avatar
120+
? '227px'
121+
: '255px'
122+
: xpackForm.show_avatar
123+
? '265px'
124+
: '292px'
125+
"
119126
style="object-fit: contain"
120127
/>
121-
<div class="avatar" v-if="xpackForm.show_user_avatar">
128+
<div class="avatar ml-8" v-if="xpackForm.show_user_avatar">
122129
<el-image
123130
v-if="imgUrl.user_avatar"
124131
:src="imgUrl.user_avatar"

ui/src/views/hit-test/index.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</h4>
99
</template>
1010
<div class="hit-test__main p-16" v-loading="loading">
11-
<div class="question-title clearfix" v-if="questionTitle">
11+
<div class="question-title" :style="{ visibility: questionTitle ? 'visible' : 'hidden' }">
1212
<div class="avatar">
1313
<AppAvatar>
1414
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
@@ -233,6 +233,7 @@ const {
233233
params: { id }
234234
} = route as any
235235
236+
const quickInputRef = ref()
236237
const ParagraphDialogRef = ref()
237238
const loading = ref(false)
238239
const paragraphDetail = ref<any[]>([])
@@ -297,7 +298,9 @@ function sendChatHandle(event: any) {
297298
}
298299
}
299300
const insertNewlineAtCursor = (event?: any) => {
300-
const textarea = document.querySelector('.el-textarea__inner') as HTMLTextAreaElement
301+
const textarea = quickInputRef.value.$el.querySelector(
302+
'.el-textarea__inner'
303+
) as HTMLTextAreaElement
301304
const startPos = textarea.selectionStart
302305
const endPos = textarea.selectionEnd
303306
// 阻止默认行为(避免额外的换行符)
@@ -354,6 +357,8 @@ onMounted(() => {})
354357
padding-left: 40px;
355358
.text {
356359
padding: 6px 0;
360+
height: 34px;
361+
box-sizing: border-box;
357362
}
358363
}
359364
}
@@ -402,7 +407,7 @@ onMounted(() => {})
402407
}
403408
404409
.hit-test-height {
405-
height: calc(var(--app-main-height) - 135px);
410+
height: calc(var(--app-main-height) - 170px);
406411
}
407412
.document-card {
408413
height: 210px;

ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<template>
22
<div class="flex-between mb-16">
3-
<h5 class="lighter">{{ inputFieldConfig.title }}</h5>
3+
<h5 class="break-all ellipsis lighter" style="max-width:80%" :title="inputFieldConfig.title">
4+
{{ inputFieldConfig.title }}
5+
</h5>
46
<div>
57
<el-button type="primary" link @click="openChangeTitleDialog">
68
<el-icon>
@@ -172,7 +174,7 @@ function refreshFieldTitle(data: any) {
172174
}
173175
174176
const getDefaultValue = (row: any) => {
175-
if(row.input_type === 'PasswordInput') {
177+
if (row.input_type === 'PasswordInput') {
176178
return '******'
177179
}
178180
if (row.default_value) {

0 commit comments

Comments
 (0)