File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
console/atest-ui/src/views Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { ElMessage } from 'element-plus'
77import { Codemirror } from ' vue-codemirror'
88import HistoryInput from ' ../components/HistoryInput.vue'
99import type { Ref } from ' vue'
10- import { Refresh } from ' @element-plus/icons-vue'
10+ import { Refresh , Document } from ' @element-plus/icons-vue'
1111
1212const stores: Ref <Store []> = ref ([])
1313const kind = ref (' ' )
@@ -58,6 +58,10 @@ const queryDataFromTable = (data: QueryData) => {
5858 sqlQuery .value = ` @selectTableLImit100_${data .label } `
5959 executeQuery ()
6060}
61+ const describeTable = (data : QueryData ) => {
62+ sqlQuery .value = ` @describeTable_${data .label } `
63+ executeQuery ()
64+ }
6165const queryTables = () => {
6266 sqlQuery .value = ` `
6367 executeQuery ()
@@ -194,8 +198,15 @@ const executeWithQuery = async (sql: string) => {
194198 <el-option v-for =" item in queryDataMeta.databases" :key =" item" :label =" item"
195199 :value =" item" ></el-option >
196200 </el-select >
197- <el-tree :data =" tablesTree" node-key =" label" @node-click =" queryDataFromTable" highlight-current
198- draggable />
201+ <el-tree :data =" tablesTree" node-key =" label" highlight-current
202+ draggable >
203+ <template #default =" {node , data } " >
204+ <span @click =" queryDataFromTable(data)" >
205+ {{ node.label }}
206+ </span >
207+ <el-icon style =" margin-left : 6px ;" @click =" describeTable(data)" v-if =" kind === 'atest-store-orm'" ><Document /></el-icon >
208+ </template >
209+ </el-tree >
199210 </el-scrollbar >
200211 </el-aside >
201212 <el-container >
You can’t perform that action at this time.
0 commit comments