File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/pages/host/components/CoDatabase Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ const fetchDbs = async () => {
17
17
}
18
18
fetchDbs ()
19
19
const reload = async (v : number ) => {
20
- console .log (v )
20
+ if (v == Number (route .query .db || 0 )) {
21
+ return
22
+ }
21
23
await router .replace ({
22
24
query: {
23
25
... route .query ,
@@ -26,10 +28,9 @@ const reload = async (v: number) => {
26
28
})
27
29
location .reload ()
28
30
}
29
- console .log (route .query )
30
31
</script >
31
32
<template >
32
- <el-dropdown @command =" reload" trigger =" click" class =" w-full" >
33
+ <el-dropdown :max-height = " 248 " @command =" reload" trigger =" click" class =" w-full" >
33
34
<q-btn outline unelevated dense no-caps push long color =" primary" class =" w-full mx-2" >
34
35
<div style =" width : 100% ;" >
35
36
<i class =" i-material-symbols:database" ></i >
@@ -38,9 +39,13 @@ console.log(route.query)
38
39
</q-btn >
39
40
<template #dropdown >
40
41
<el-dropdown-menu >
41
- <el-dropdown-item :key =" item" v-for =" item in Number(dbs)" :command =" item - 1" >
42
+ <el-dropdown-item :disabled =" item - 1 == (route.query.db || 0)" :key =" item" v-for =" item in Number(dbs)"
43
+ :command =" item - 1" >
42
44
<div class =" w-40 text-center" >
43
- {{ $t('normal.0') + '.' + (item - 1) }}</div >
45
+ {{ $t('normal.0') +
46
+ '.' +
47
+ (item - 1) }}
48
+ </div >
44
49
</el-dropdown-item >
45
50
</el-dropdown-menu >
46
51
</template >
You can’t perform that action at this time.
0 commit comments