Skip to content

Commit

Permalink
fix: build warning caused by a constant value in SideBar.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Dec 1, 2023
1 parent 14903b6 commit baa4c08
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/src/layouts/SideBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { useRoute } from 'vue-router'
import type { ComputedRef } from 'vue'
import { computed, ref, watch } from 'vue'
import type { AntdIconType } from '@ant-design/icons-vue/lib/components/AntdIcon'
import type { IconComponentProps } from '@ant-design/icons-vue/es/components/Icon'
import Logo from '@/components/Logo/Logo.vue'
Expand All @@ -10,7 +9,7 @@ import EnvIndicator from '@/components/EnvIndicator/EnvIndicator.vue'
const route = useRoute()
const openKeys = [openSub()]
const openKeys = ref([openSub()])
const selectedKey = ref([route.name])
Expand All @@ -25,9 +24,9 @@ watch(route, () => {
selectedKey.value = [route.name]
const sub = openSub()
const p = openKeys.indexOf(sub)
const p = openKeys.value.indexOf(sub)
if (p === -1)
openKeys.push(sub)
openKeys.value.push(sub)
})
const sidebars = computed(() => {
Expand Down

0 comments on commit baa4c08

Please # to comment.