Skip to content

Commit

Permalink
refactor: Optimize db search
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-xufei committed Nov 27, 2024
1 parent 53dfeee commit 74fc1d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 9 additions & 3 deletions packages/dag/src/components/LeftSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,13 @@ export default {
this.dbPage = 1
}
const data = await connectionsApi.get(this.getDbFilter(), {
cancelToken: this.connectionCancelSource.token
})
const data = await connectionsApi
.get(this.getDbFilter(), {
cancelToken: this.connectionCancelSource.token
})
.finally(() => {
this.connectionCancelSource = null
})
this.dbTotal = data.total
Expand Down Expand Up @@ -530,6 +534,7 @@ export default {
},
loadMoreDB() {
if (this.disabledDBMore) return
this.loadDatabase(true)
},
Expand Down Expand Up @@ -617,6 +622,7 @@ export default {
},
loadMoreTable() {
if (this.disabled) return
this.loadDatabaseTable(true)
},
Expand Down
2 changes: 0 additions & 2 deletions packages/dag/src/components/migration/LeftSider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ export default {
},
disabledDBMore() {
console.log('disabledDBMore', this.dbLoading, this.noDBMore) // eslint-disable-line
return this.dbLoading || this.noDBMore || this.dbLoadingMore
},
Expand Down Expand Up @@ -415,7 +414,6 @@ export default {
},
loadMoreDB() {
console.log('loadMoreDB') // eslint-disable-line
if (this.disabledDBMore) return
this.loadDatabase(true)
},
Expand Down

0 comments on commit 74fc1d0

Please sign in to comment.