Skip to content

Commit 7b8a5bb

Browse files
committed
chore: upgrade element-plugin to 2.9.6
1 parent 66b2f1e commit 7b8a5bb

File tree

4 files changed

+35
-20
lines changed

4 files changed

+35
-20
lines changed

console/atest-ui/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/atest-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@vueuse/core": "^10.11.0",
2020
"codemirror": "^5.65.17",
2121
"diff-match-patch": "^1.0.5",
22-
"element-plus": "^2.9.1",
22+
"element-plus": "^2.9.6",
2323
"intro.js": "^7.0.1",
2424
"jsonlint-mod": "^1.7.6",
2525
"jsonpath-plus": "^10.0.7",

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

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<script setup lang="ts">
22
import { ref, watch } from 'vue'
33
import { API } from './net'
4+
import type { Store } from './store'
5+
import type { Pair } from './types'
46
import { ElMessage } from 'element-plus'
57
import { Codemirror } from 'vue-codemirror'
68
import HistoryInput from '../components/HistoryInput.vue'
79
8-
const stores = ref([])
10+
const stores = ref([] as Store[])
911
const kind = ref('')
1012
const store = ref('')
1113
const sqlQuery = ref('')
12-
const queryResult = ref([])
14+
const queryResult = ref([] as any[])
1315
const queryResultAsJSON= ref('')
14-
const columns = ref([])
16+
const columns = ref([] as string[])
1517
const queryTip = ref('')
1618
const databases = ref([])
1719
const tables = ref([])
@@ -33,7 +35,15 @@ watch(store, (s) => {
3335
sqlQuery.value = ''
3436
executeQuery()
3537
})
36-
const queryDataFromTable = (data) => {
38+
39+
interface QueryData {
40+
items: any[]
41+
data: any[]
42+
label: string
43+
meta: any
44+
}
45+
46+
const queryDataFromTable = (data: QueryData) => {
3747
sqlQuery.value = `select * from ${data.label} limit 10`
3848
executeQuery()
3949
}
@@ -66,13 +76,13 @@ API.GetStores((data) => {
6676
loadingStores.value = false
6777
})
6878
69-
const ormDataHandler = (data) => {
70-
const result = []
79+
const ormDataHandler = (data: QueryData) => {
80+
const result = [] as any[]
7181
const cols = new Set()
7282
7383
data.items.forEach(e => {
7484
const obj = {}
75-
e.data.forEach(item => {
85+
e.data.forEach((item: Pair) => {
7686
obj[item.key] = item.value
7787
cols.add(item.key)
7888
})
@@ -98,12 +108,12 @@ const ormDataHandler = (data) => {
98108
})
99109
}
100110
101-
const keyValueDataHandler = (data) => {
111+
const keyValueDataHandler = (data: QueryData) => {
102112
queryResult.value = []
103113
data.data.forEach(e => {
104-
const obj = {}
105-
obj['key'] = e.key
106-
obj['value'] = e.value
114+
const obj = new Map<string, string>();
115+
obj.set('key', e.key)
116+
obj.set('value', e.value)
107117
queryResult.value.push(obj)
108118
109119
columns.value = ['key', 'value']

console/atest-ui/src/views/store.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ limitations under the License.
1515
*/
1616
import type { Pair } from './types'
1717

18-
interface Store {
18+
export interface Store {
1919
name: string;
2020
link: string;
21+
ready: boolean;
22+
kind: {
23+
name: string;
24+
description: string;
25+
};
2126
params: Pair[];
2227
}
2328

0 commit comments

Comments
 (0)