1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-28 12:10:20 +08:00

feat: 集成菜单栏伸缩功能

This commit is contained in:
张传龙
2022-05-08 11:59:01 +08:00
parent f88820b727
commit f15e21b0a0
5 changed files with 51 additions and 16 deletions

View File

@@ -1,6 +1,13 @@
<template>
<n-layout has-sider style="height: 100%">
<n-layout-sider bordered :width="200" :collapsed-width="0" :native-scrollbar="false">
<n-layout-sider
bordered
collapse-mode="width"
:collapsed-width="64"
:width="220"
:native-scrollbar="false"
:collapsed="appStore.collapsed"
>
<SideBar />
</n-layout-sider>
<n-layout>
@@ -27,8 +34,10 @@ import SideBar from './components/sidebar/index.vue'
import AppMain from './components/AppMain.vue'
import AppTags from './components/tags/index.vue'
import { useThemeStore } from '@/store/modules/theme'
import { useAppStore } from '@/store/modules/app'
const useTheme = useThemeStore()
const appStore = useAppStore()
</script>
<style lang="scss" scoped>