mirror of
https://gitcode.com/yangzongzhuan/RuoYi-Vue3.git
synced 2026-05-22 19:08:37 +00:00
优化顶部导航更多菜单路由截取
This commit is contained in:
@@ -114,7 +114,7 @@ const activeMenu = computed(() => {
|
||||
|
||||
function setVisibleNumber(): void {
|
||||
const width = document.body.getBoundingClientRect().width / 3
|
||||
visibleNumber.value = parseInt(String(width / 85))
|
||||
visibleNumber.value = Math.max(1, parseInt(String(width / 85)))
|
||||
}
|
||||
|
||||
function handleSelect(key: string, keyPath: string[]): void {
|
||||
|
||||
@@ -38,11 +38,11 @@ const topMenus = computed(() => {
|
||||
return permissionStore.sidebarRouters.filter((f: any) => !f.hidden).slice(0, visibleNumber.value)
|
||||
})
|
||||
const moreRoutes = computed(() => {
|
||||
return permissionStore.sidebarRouters.filter((f: any) => !f.hidden).slice(visibleNumber.value, sidebarRouters.value.length - visibleNumber.value)
|
||||
return permissionStore.sidebarRouters.filter((f: any) => !f.hidden).slice(visibleNumber.value)
|
||||
})
|
||||
function setVisibleNumber(): void {
|
||||
const width = document.body.getBoundingClientRect().width / 3
|
||||
visibleNumber.value = parseInt(String(width / 85))
|
||||
visibleNumber.value = Math.max(1, parseInt(String(width / 85)))
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user