Skip to content

Commit 2f3d09a

Browse files
committed
empty the sql query when switch the store
1 parent b46114c commit 2f3d09a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

console/atest-ui/src/views/DataManager.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,25 @@ watch(store, (s) => {
2323
return
2424
}
2525
})
26+
currentDatabase.value = ''
27+
sqlQuery.value = ''
28+
executeQuery()
2629
})
2730
const queryDataFromTable = (data) => {
2831
sqlQuery.value = `select * from ${data.label} limit 10`
2932
executeQuery()
3033
}
3134
const queryTables = () => {
32-
sqlQuery.value = `show tables`
35+
sqlQuery.value = ``
3336
executeQuery()
3437
}
3538
watch(kind, (k) => {
3639
switch (k) {
3740
case 'atest-store-orm':
38-
sqlQuery.value = ''
3941
queryTip.value = 'Enter SQL query'
40-
executeQuery()
4142
break;
42-
case 'atest-store-etcd', 'atest-store-redis':
43-
sqlQuery.value = ''
43+
case 'atest-store-etcd':
44+
case 'atest-store-redis':
4445
queryTip.value = 'Enter key'
4546
break;
4647
}

0 commit comments

Comments
 (0)