@@ -121,6 +121,9 @@ const handleSelectTableList = () => {
121121const clickTable = (table : any ) => {
122122 loading .value = true
123123 currentTable .value = table
124+ fieldList .value = []
125+ pageInfo .total = 0
126+ previewData .value = []
124127 datasourceApi
125128 .fieldList (table .id )
126129 .then ((res ) => {
@@ -332,9 +335,9 @@ const btnSelectClick = (val: any) => {
332335 </el-button >
333336 </div >
334337
335- <div class =" preview-or-schema" >
336- <div class =" table-content_preview" >
337- <el-table v-if = " btnSelect === 'd' " :data =" fieldListComputed" style =" width : 100% " >
338+ <div class =" preview-or-schema" v-if = " !loading " >
339+ <div v-if = " btnSelect === 'd' " class =" table-content_preview" >
340+ <el-table :data =" fieldListComputed" style =" width : 100% " >
338341 <el-table-column
339342 prop =" field_name"
340343 :label =" t('datasource.field_name')"
@@ -381,7 +384,7 @@ const btnSelectClick = (val: any) => {
381384 </el-table-column >
382385 </el-table >
383386 </div >
384- <div v-if =" fieldList.length" class =" pagination-container" >
387+ <div v-if =" fieldList.length && btnSelect === 'd' " class =" pagination-container" >
385388 <el-pagination
386389 v-model:current-page =" pageInfo.currentPage"
387390 v-model:page-size =" pageInfo.pageSize"
@@ -393,7 +396,7 @@ const btnSelectClick = (val: any) => {
393396 @current-change =" handleCurrentChange"
394397 />
395398 </div >
396- <template v-else >
399+ <template v-if = " btnSelect === ' q ' " >
397400 <div class =" preview-num" >
398401 {{ t('ds.pieces_in_total', { msg: total, ms: showNum }) }}
399402 </div >
0 commit comments