mirror of
https://github.com/yangzongzhuan/RuoYi-Vue3.git
synced 2026-02-27 01:01:11 +08:00
update TopBar/index.vue
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import SidebarItem from '../Sidebar/SidebarItem'
|
||||
import SidebarItem from '../Sidebar/SidebarItem.vue'
|
||||
import useAppStore from '@/store/modules/app'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import usePermissionStore from '@/store/modules/permission'
|
||||
@@ -35,14 +35,14 @@ const activeMenu = computed(() => {
|
||||
|
||||
const visibleNumber = ref<number>(5)
|
||||
const topMenus = computed(() => {
|
||||
return permissionStore.sidebarRouters.filter((f) => !f.hidden).slice(0, visibleNumber.value)
|
||||
return permissionStore.sidebarRouters.filter((f: any) => !f.hidden).slice(0, visibleNumber.value)
|
||||
})
|
||||
const moreRoutes = computed(() => {
|
||||
return permissionStore.sidebarRouters.filter((f) => !f.hidden).slice(visibleNumber.value, sidebarRouters.value.length - visibleNumber.value)
|
||||
return permissionStore.sidebarRouters.filter((f: any) => !f.hidden).slice(visibleNumber.value, sidebarRouters.value.length - visibleNumber.value)
|
||||
})
|
||||
function setVisibleNumber(): void {
|
||||
const width = document.body.getBoundingClientRect().width / 3
|
||||
visibleNumber.value = parseInt(width / 85)
|
||||
visibleNumber.value = parseInt(String(width / 85))
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user