Compare commits
1 Commits
master
...
perf/sideb
Author | SHA1 | Date |
---|---|---|
|
532cac465b |
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar ref="scrollbar" wrap-class="scrollbar-wrapper">
|
||||||
<el-menu
|
<el-menu
|
||||||
:show-timeout="200"
|
:show-timeout="200"
|
||||||
:default-active="$route.path"
|
:default-active="$route.path"
|
||||||
|
@ -8,6 +8,8 @@
|
||||||
:text-color="variables.menuText"
|
:text-color="variables.menuText"
|
||||||
:active-text-color="variables.menuActiveText"
|
:active-text-color="variables.menuActiveText"
|
||||||
mode="vertical"
|
mode="vertical"
|
||||||
|
@close="change"
|
||||||
|
@open="change"
|
||||||
>
|
>
|
||||||
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path"/>
|
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path"/>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
@ -34,6 +36,13 @@ export default {
|
||||||
isCollapse() {
|
isCollapse() {
|
||||||
return !this.sidebar.opened
|
return !this.sidebar.opened
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
change() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.scrollbar.update()
|
||||||
|
}, 500) // update after animation
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue