mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
fix: build warning caused by a constant value in SideBar.vue
This commit is contained in:
parent
14903b6aa6
commit
baa4c08264
1 changed files with 3 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import type { ComputedRef } from 'vue'
|
import type { ComputedRef } from 'vue'
|
||||||
import { computed, ref, watch } from 'vue'
|
|
||||||
import type { AntdIconType } from '@ant-design/icons-vue/lib/components/AntdIcon'
|
import type { AntdIconType } from '@ant-design/icons-vue/lib/components/AntdIcon'
|
||||||
import type { IconComponentProps } from '@ant-design/icons-vue/es/components/Icon'
|
import type { IconComponentProps } from '@ant-design/icons-vue/es/components/Icon'
|
||||||
import Logo from '@/components/Logo/Logo.vue'
|
import Logo from '@/components/Logo/Logo.vue'
|
||||||
|
@ -10,7 +9,7 @@ import EnvIndicator from '@/components/EnvIndicator/EnvIndicator.vue'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const openKeys = [openSub()]
|
const openKeys = ref([openSub()])
|
||||||
|
|
||||||
const selectedKey = ref([route.name])
|
const selectedKey = ref([route.name])
|
||||||
|
|
||||||
|
@ -25,9 +24,9 @@ watch(route, () => {
|
||||||
selectedKey.value = [route.name]
|
selectedKey.value = [route.name]
|
||||||
|
|
||||||
const sub = openSub()
|
const sub = openSub()
|
||||||
const p = openKeys.indexOf(sub)
|
const p = openKeys.value.indexOf(sub)
|
||||||
if (p === -1)
|
if (p === -1)
|
||||||
openKeys.push(sub)
|
openKeys.value.push(sub)
|
||||||
})
|
})
|
||||||
|
|
||||||
const sidebars = computed(() => {
|
const sidebars = computed(() => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue