Skip to content

Commit 5094b32

Browse files
feat: When linking to a knowledge base, display more information on hover(#4657)
1 parent 1ea52db commit 5094b32

File tree

33 files changed

+436
-209
lines changed

33 files changed

+436
-209
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
placement="bottom-start"
7171
:width="360"
7272
popper-class="vote-popover"
73+
:persistent="false"
7374
v-if="buttonData?.vote_status === '-1' && mode !== 'mobile'"
7475
>
7576
<template #reference>
@@ -118,6 +119,7 @@
118119
placement="bottom-start"
119120
:width="360"
120121
popper-class="vote-popover"
122+
:persistent="false"
121123
v-if="buttonData?.vote_status === '-1' && mode !== 'mobile'"
122124
>
123125
<template #reference>

ui/src/components/dynamics-form/constructor/items/JsonInputConstructor.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
<el-row style="width: 100%" :gutter="10">
1010
<el-radio-group v-model="formValue.default_value_assignment_method">
11-
<el-radio :value="item.value" size="large" v-for="item in assignment_method_option_list"
11+
<el-radio :value="item.value" size="large" v-for="(item,index) in assignment_method_option_list" :key="index"
1212
>{{ item.label }}
1313
<el-popover
1414
width="300px"
1515
v-if="item.value == 'ref_variables'"
1616
class="box-item"
1717
placement="top-start"
18+
:persistent="false"
1819
>
1920
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover') }}:
2021
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.json_format') }}

ui/src/components/dynamics-form/constructor/items/MultiRowConstructor.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
<el-row style="width: 100%" :gutter="10">
1010
<el-radio-group @change="formValue.option_list = []" v-model="formValue.assignment_method">
11-
<el-radio :value="item.value" size="large" v-for="item in assignment_method_option_list"
11+
<el-radio :value="item.value" size="large" v-for="(item,index) in assignment_method_option_list" :key="index"
1212
>{{ item.label }}
1313
<el-popover
1414
width="300px"
1515
v-if="item.value == 'ref_variables'"
1616
class="box-item"
1717
placement="top-start"
18+
:persistent="false"
1819
>
1920
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover') }}:<br />
2021
[<br />
@@ -177,9 +178,7 @@ const default_ref_variables_value_rule = {
177178
validator: (rule: any, value: any, callback: any) => {
178179
console.log(value.length)
179180
if (!(Array.isArray(value) && value.length > 1)) {
180-
callback(
181-
t('workflow.variable.Referencing') + t('common.required'),
182-
)
181+
callback(t('workflow.variable.Referencing') + t('common.required'))
183182
}
184183
185184
return true
@@ -237,5 +236,4 @@ onMounted(() => {
237236
top: -35px;
238237
}
239238
}
240-
241239
</style>

ui/src/components/dynamics-form/constructor/items/MultiSelectConstructor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
<el-row style="width: 100%" :gutter="10">
1010
<el-radio-group @change="formValue.option_list = []" v-model="formValue.assignment_method">
11-
<el-radio :value="item.value" size="large" v-for="item in assignment_method_option_list"
11+
<el-radio :value="item.value" size="large" v-for="(item,index) in assignment_method_option_list" :key="index"
1212
>{{ item.label }}
1313
<el-popover
1414
width="300px"
1515
v-if="item.value == 'ref_variables'"
1616
class="box-item"
1717
placement="top-start"
18+
:persistent="false"
1819
>
1920
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover') }}:<br />
2021
[<br />
@@ -243,5 +244,4 @@ onMounted(() => {
243244
top: -35px;
244245
}
245246
}
246-
247247
</style>

ui/src/components/dynamics-form/constructor/items/RadioCardConstructor.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
<el-row style="width: 100%" :gutter="10">
1010
<el-radio-group @change="formValue.option_list = []" v-model="formValue.assignment_method">
11-
<el-radio :value="item.value" size="large" v-for="item in assignment_method_option_list"
11+
<el-radio :value="item.value" size="large" v-for="(item,index) in assignment_method_option_list" :key="index"
1212
>{{ item.label }}
1313
<el-popover
1414
width="300px"
1515
v-if="item.value == 'ref_variables'"
1616
class="box-item"
1717
placement="top-start"
18+
:persistent="false"
1819
>
1920
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover') }}:<br />
2021
[<br />

ui/src/components/dynamics-form/constructor/items/RadioRowConstructor.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88

99
<el-row style="width: 100%" :gutter="10">
1010
<el-radio-group @change="formValue.option_list = []" v-model="formValue.assignment_method">
11-
<el-radio :value="item.value" size="large" v-for="item in assignment_method_option_list"
11+
<el-radio
12+
:value="item.value"
13+
size="large"
14+
v-for="(item, index) in assignment_method_option_list"
15+
:key="index"
1216
>{{ item.label }}
1317
<el-popover
1418
width="300px"
1519
v-if="item.value == 'ref_variables'"
1620
class="box-item"
1721
placement="top-start"
22+
:persistent="false"
1823
>
1924
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover') }}:<br />
2025
[<br />
@@ -177,9 +182,7 @@ const default_ref_variables_value_rule = {
177182
validator: (rule: any, value: any, callback: any) => {
178183
console.log(value.length)
179184
if (!(Array.isArray(value) && value.length > 1)) {
180-
callback(
181-
t('workflow.variable.Referencing') + t('common.required'),
182-
)
185+
callback(t('workflow.variable.Referencing') + t('common.required'))
183186
}
184187
185188
return true

ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88

99
<el-row style="width: 100%" :gutter="10">
1010
<el-radio-group @change="formValue.option_list = []" v-model="formValue.assignment_method">
11-
<el-radio :value="item.value" size="large" v-for="item in assignment_method_option_list"
11+
<el-radio
12+
:value="item.value"
13+
size="large"
14+
v-for="(item, index) in assignment_method_option_list"
15+
:key="index"
1216
>{{ item.label }}
1317
<el-popover
1418
width="300px"
1519
v-if="item.value == 'ref_variables'"
1620
class="box-item"
1721
placement="top-start"
22+
:persistent="false"
1823
>
1924
{{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover') }}:<br />
2025
[<br />
@@ -31,8 +36,9 @@
3136
default: {{ $t('dynamicsForm.AssignmentMethod.ref_variables.popover_default') }}
3237
<template #reference>
3338
<el-icon><InfoFilled /></el-icon>
34-
</template> </el-popover
35-
></el-radio>
39+
</template>
40+
</el-popover>
41+
</el-radio>
3642
</el-radio-group>
3743
</el-row>
3844
</el-form-item>
@@ -119,11 +125,7 @@
119125
/>
120126
</div>
121127

122-
<el-select
123-
v-model="formValue.default_value"
124-
:teleported="false"
125-
popper-class="max-w-350"
126-
>
128+
<el-select v-model="formValue.default_value" :teleported="false" popper-class="max-w-350">
127129
<el-option
128130
v-for="(option, index) in formValue.option_list"
129131
:key="index"
@@ -238,5 +240,4 @@ onMounted(() => {
238240
top: -35px;
239241
}
240242
}
241-
242243
</style>

ui/src/components/dynamics-form/items/table/ProgressTableItem.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<template>
22
<div class="progress-table-item">
3-
<el-popover placement="top-start" :title="row[text_field]" :width="200" trigger="hover">
3+
<el-popover
4+
placement="top-start"
5+
:title="row[text_field]"
6+
:width="200"
7+
trigger="hover"
8+
:persistent="false"
9+
>
410
<template #reference>
511
<el-progress v-bind="$attrs" :percentage="row[value_field]"></el-progress
612
></template>

ui/src/components/resource_mapping/index.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
:maxTableHeight="200"
9595
:row-key="(row: any) => row.id"
9696
v-loading="loading"
97-
9897
>
9998
<el-table-column prop="name" :label="$t('common.name')" min-width="130" show-overflow-tooltip>
10099
<template #default="{ row }">
@@ -151,7 +150,12 @@
151150
<template #header>
152151
<div>
153152
<span>{{ $t('views.workspace.title') }}</span>
154-
<el-popover :width="200" trigger="click" :visible="workspaceVisible">
153+
<el-popover
154+
:width="200"
155+
trigger="click"
156+
:visible="workspaceVisible"
157+
:persistent="false"
158+
>
155159
<template #reference>
156160
<el-button
157161
style="margin-top: -2px"

ui/src/components/tag-group/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
placement="bottom"
88
:disabled="tooltipDisabled"
99
:popper-style="{ width: 'auto', maxWidth: '300px' }"
10+
:persistent="false"
1011
>
1112
<template #reference>
1213
<el-tag :size="props.size" class="info-tag ml-4 cursor" v-if="props.tags?.length > 1">

0 commit comments

Comments
 (0)