Skip to content

Commit 90af17b

Browse files
committed
fix(Embedded Management): The welcome message is limited to 50 characters. After embedding, the characters on the left and right sides of the assistant are not fully displayed.
1 parent c50815f commit 90af17b

File tree

5 files changed

+52
-30
lines changed

5 files changed

+52
-30
lines changed

frontend/src/views/chat/index.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,9 @@ onMounted(() => {
11821182
font-size: 24px;
11831183
line-height: 32px;
11841184
margin: 16px 0;
1185+
max-width: 100%;
1186+
word-break: break-all;
1187+
padding: 0 20px;
11851188
}
11861189
11871190
.i-can {
@@ -1192,6 +1195,9 @@ onMounted(() => {
11921195
font-size: 14px;
11931196
line-height: 24px;
11941197
color: #646a73;
1198+
max-width: 100%;
1199+
word-break: break-all;
1200+
padding: 0 20px;
11951201
}
11961202
}
11971203

frontend/src/views/embedded/AssistantPreview.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const pageLogo = computed(() => {
3333
<LOGO></LOGO>
3434
</el-icon>
3535
<img v-else :src="pageLogo" class="logo" width="30px" height="30px" alt="" />
36-
<span class="title">{{ name }}</span>
36+
<span :title="name" class="title ellipsis">{{ name }}</span>
3737

3838
<el-tooltip effect="dark" :content="$t('embedded.new_conversation')" placement="top">
3939
<el-icon class="new-chat" size="20">
@@ -115,10 +115,10 @@ const pageLogo = computed(() => {
115115
font-size: 16px;
116116
line-height: 24px;
117117
color: var(--ed-text-color-primary);
118+
width: 200px;
118119
}
119120
120-
.ed-icon {
121-
position: relative;
121+
.ed-icon:not(.logo) {
122122
cursor: pointer;
123123
124124
&::after {

frontend/src/views/embedded/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
<LOGO></LOGO>
99
</el-icon>
1010
<img v-else :src="logo" class="logo" width="30px" height="30px" alt="" />
11-
<span class="title">{{ appName || $t('embedded.intelligent_customer_service') }}</span>
11+
<span
12+
:title="appName || $t('embedded.intelligent_customer_service')"
13+
class="title ellipsis"
14+
>{{ appName || $t('embedded.intelligent_customer_service') }}</span
15+
>
1216

1317
<el-tooltip effect="dark" :content="$t('embedded.new_conversation')" placement="top">
1418
<el-icon class="new-chat" size="20" @click="createChat">
@@ -230,10 +234,10 @@ onBeforeUnmount(() => {
230234
font-size: 16px;
231235
line-height: 24px;
232236
color: var(--ed-text-color-primary);
237+
max-width: calc(100% - 180px);
233238
}
234239
235-
.ed-icon {
236-
position: relative;
240+
.ed-icon:not(.logo) {
237241
cursor: pointer;
238242
239243
&::after {

frontend/src/views/system/embedded/SetUi.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ defineExpose({
277277
<el-upload
278278
name="logo"
279279
:show-file-list="false"
280-
accept=".jpeg,.jpg,.png,.gif,.svg"
280+
accept=".jpg,.png,.gif,.svg"
281281
:before-upload="(e: any) => beforeUpload(e, 'logo')"
282282
:http-request="uploadImg"
283283
>
@@ -293,7 +293,7 @@ defineExpose({
293293
<el-upload
294294
name="float_icon"
295295
:show-file-list="false"
296-
accept=".jpeg,.jpg,.png,.gif,.svg"
296+
accept=".jpg,.png,.gif,.svg"
297297
:before-upload="(e: any) => beforeUpload(e, 'float_icon')"
298298
:http-request="uploadImg"
299299
>
@@ -403,8 +403,11 @@ defineExpose({
403403
404404
.left-preview {
405405
width: 460px;
406-
pointer-events: none;
407406
height: 100%;
407+
408+
.content {
409+
pointer-events: none;
410+
}
408411
}
409412
410413
.right-form {

frontend/src/views/system/embedded/iframe.vue

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const currentEmbedded = reactive<any>(cloneDeep(defaultEmbedded))
6363
const isCreate = ref(false)
6464
const defaultForm = {
6565
oid: 1,
66-
private_list: [] as any,
66+
public_list: [] as any,
6767
}
6868
const dsForm = reactive(cloneDeep(defaultForm))
6969
@@ -124,15 +124,15 @@ const handleAddEmbedded = (val: any) => {
124124
}
125125
}
126126
const wsChanged = (val: any) => {
127-
dsForm.private_list = []
127+
dsForm.public_list = []
128128
dsForm.oid = val
129129
getDsList(true)
130130
}
131131
const getDsList = (change: boolean = false) => {
132132
dsApi(dsForm.oid).then((res: any) => {
133133
dsListOptions.value = res || []
134134
if (change || !currentEmbedded.id) {
135-
dsForm.private_list = dsListOptions.value.map((ele: any) => ele.id)
135+
dsForm.public_list = dsListOptions.value.map((ele: any) => ele.id)
136136
}
137137
})
138138
}
@@ -185,11 +185,11 @@ const handleActive = (row: any) => {
185185
}
186186
187187
const handlePrivate = (row: any) => {
188-
dsForm.private_list.push(row.id)
188+
dsForm.public_list = dsForm.public_list.filter((ele: any) => ele !== row.id)
189189
}
190190
191191
const handlePublic = (row: any) => {
192-
dsForm.private_list = dsForm.private_list.filter((ele: any) => ele !== row.id)
192+
dsForm.public_list.push(row.id)
193193
}
194194
195195
const searchLoading = ref(false)
@@ -822,7 +822,10 @@ const saveHandler = () => {
822822
</el-form-item>
823823
</el-form>
824824
</div>
825-
<div v-if="activeStep === 1 && !advancedApplication" class="drawer-content">
825+
<div
826+
v-if="activeStep === 1 && !advancedApplication"
827+
class="drawer-content drawer-content_scroll"
828+
>
826829
<div class="title">
827830
{{ $t('embedded.set_data_source') }}
828831
</div>
@@ -864,21 +867,23 @@ const saveHandler = () => {
864867
</div>
865868
</template>
866869
<div class="card-ds_content">
867-
<DsCard
868-
v-for="(ele, index) in dsListOptions"
869-
:id="ele.id"
870-
:key="ele.id"
871-
:class="[0, 1].includes(index) && 'no-margin_top'"
872-
:name="ele.name"
873-
:type="ele.type"
874-
:type-name="ele.type_name"
875-
:description="ele.description"
876-
:is-private="dsForm.private_list.includes(ele.id)"
877-
:num="ele.num"
878-
@active="handleActive(ele)"
879-
@private="handlePrivate(ele)"
880-
@public="handlePublic(ele)"
881-
></DsCard>
870+
<el-scrollbar>
871+
<DsCard
872+
v-for="(ele, index) in dsListOptions"
873+
:id="ele.id"
874+
:key="ele.id"
875+
:class="[0, 1].includes(index) && 'no-margin_top'"
876+
:name="ele.name"
877+
:type="ele.type"
878+
:type-name="ele.type_name"
879+
:description="ele.description"
880+
:is-private="!dsForm.public_list.includes(ele.id)"
881+
:num="ele.num"
882+
@active="handleActive(ele)"
883+
@private="handlePrivate(ele)"
884+
@public="handlePublic(ele)"
885+
></DsCard>
886+
</el-scrollbar>
882887
</div>
883888
</el-form-item>
884889
</el-form>
@@ -1194,6 +1199,10 @@ const saveHandler = () => {
11941199
}
11951200
}
11961201
1202+
.drawer-content_scroll {
1203+
overflow: hidden;
1204+
}
1205+
11971206
.certificate-table_form {
11981207
.ed-form-item__label:after {
11991208
display: none;

0 commit comments

Comments
 (0)