Skip to content

Commit a3a21cc

Browse files
committed
fix(Embedded Management): Clearing the search results in a page prompting that there is no application
1 parent a19353d commit a3a21cc

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

frontend/src/views/dashboard/common/AddViewDashboard.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ defineExpose({
234234
>
235235
<el-select
236236
v-model="resourceForm.dashboardId"
237+
filterable
237238
:placeholder="t('dashboard.select_dashboard')"
238239
>
239240
<el-option

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const emits = defineEmits(['btnSelectChange'])
3535
const { t } = useI18n()
3636
const multipleSelectionAll = ref<any[]>([])
3737
const keywords = ref('')
38+
const oldKeywords = ref('')
3839
const searchLoading = ref(false)
3940
4041
const selectable = () => {
@@ -187,6 +188,7 @@ const search = () => {
187188
})
188189
})
189190
.finally(() => {
191+
oldKeywords.value = keywords.value
190192
searchLoading.value = false
191193
})
192194
}
@@ -290,7 +292,6 @@ const copyCode = (row: any, key: any = 'app_secret') => {
290292
style="width: 240px; margin-right: 12px"
291293
:placeholder="$t('dashboard.search')"
292294
clearable
293-
@keyup.enter="search"
294295
@blur="search"
295296
>
296297
<template #prefix>
@@ -313,7 +314,7 @@ const copyCode = (row: any, key: any = 'app_secret') => {
313314
class="table-content"
314315
:class="multipleSelectionAll.length && 'show-pagination_height'"
315316
>
316-
<template v-if="!keywords && !fieldList.length">
317+
<template v-if="!oldKeywords && !fieldList.length">
317318
<EmptyBackground
318319
class="datasource-yet"
319320
:description="$t('embedded.no_application')"
@@ -486,13 +487,13 @@ const copyCode = (row: any, key: any = 'app_secret') => {
486487
</el-table-column>
487488
<template #empty>
488489
<EmptyBackground
489-
v-if="!keywords && !fieldList.length"
490+
v-if="!oldKeywords && !fieldList.length"
490491
:description="$t('embedded.no_application')"
491492
img-type="noneWhite"
492493
/>
493494

494495
<EmptyBackground
495-
v-if="!!keywords && !fieldList.length"
496+
v-if="!!oldKeywords && !fieldList.length"
496497
:description="$t('datasource.relevant_content_found')"
497498
img-type="tree"
498499
/>

frontend/src/views/system/model/ModelForm.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ defineExpose({
360360
</div>
361361
<div v-if="modelSelected && configExpand" class="model-params">
362362
{{ t('model.model_parameters') }}
363-
<span class="add" @click="handleParamsCreate">
363+
<span class="btn" @click="handleParamsCreate">
364364
<el-icon size="16">
365365
<icon_add_outlined></icon_add_outlined>
366366
</el-icon>
@@ -523,10 +523,18 @@ defineExpose({
523523
line-height: 22px;
524524
margin: 16px 0 8px 0;
525525
526-
.add {
526+
.btn {
527+
height: 26px;
527528
display: flex;
528529
align-items: center;
530+
justify-content: center;
531+
padding: 0 4px;
532+
border-radius: 6px;
529533
cursor: pointer;
534+
535+
&:hover {
536+
background-color: #1f23291a;
537+
}
530538
}
531539
532540
.ed-icon {

0 commit comments

Comments
 (0)