fix(Embedded Management): Clearing the search results in a page prompting that there is no application

This commit is contained in:
dataeaseShu
2025-09-02 10:12:14 +08:00
parent a19353d126
commit a3a21cc5ec
3 changed files with 16 additions and 6 deletions
@@ -234,6 +234,7 @@ defineExpose({
>
<el-select
v-model="resourceForm.dashboardId"
filterable
:placeholder="t('dashboard.select_dashboard')"
>
<el-option
+5 -4
View File
@@ -35,6 +35,7 @@ const emits = defineEmits(['btnSelectChange'])
const { t } = useI18n()
const multipleSelectionAll = ref<any[]>([])
const keywords = ref('')
const oldKeywords = ref('')
const searchLoading = ref(false)
const selectable = () => {
@@ -187,6 +188,7 @@ const search = () => {
})
})
.finally(() => {
oldKeywords.value = keywords.value
searchLoading.value = false
})
}
@@ -290,7 +292,6 @@ const copyCode = (row: any, key: any = 'app_secret') => {
style="width: 240px; margin-right: 12px"
:placeholder="$t('dashboard.search')"
clearable
@keyup.enter="search"
@blur="search"
>
<template #prefix>
@@ -313,7 +314,7 @@ const copyCode = (row: any, key: any = 'app_secret') => {
class="table-content"
:class="multipleSelectionAll.length && 'show-pagination_height'"
>
<template v-if="!keywords && !fieldList.length">
<template v-if="!oldKeywords && !fieldList.length">
<EmptyBackground
class="datasource-yet"
:description="$t('embedded.no_application')"
@@ -486,13 +487,13 @@ const copyCode = (row: any, key: any = 'app_secret') => {
</el-table-column>
<template #empty>
<EmptyBackground
v-if="!keywords && !fieldList.length"
v-if="!oldKeywords && !fieldList.length"
:description="$t('embedded.no_application')"
img-type="noneWhite"
/>
<EmptyBackground
v-if="!!keywords && !fieldList.length"
v-if="!!oldKeywords && !fieldList.length"
:description="$t('datasource.relevant_content_found')"
img-type="tree"
/>
+10 -2
View File
@@ -360,7 +360,7 @@ defineExpose({
</div>
<div v-if="modelSelected && configExpand" class="model-params">
{{ t('model.model_parameters') }}
<span class="add" @click="handleParamsCreate">
<span class="btn" @click="handleParamsCreate">
<el-icon size="16">
<icon_add_outlined></icon_add_outlined>
</el-icon>
@@ -523,10 +523,18 @@ defineExpose({
line-height: 22px;
margin: 16px 0 8px 0;
.add {
.btn {
height: 26px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 4px;
border-radius: 6px;
cursor: pointer;
&:hover {
background-color: #1f23291a;
}
}
.ed-icon {