| | |
| | | :text-color="getMenuTextColor" |
| | | :unique-opened="true" |
| | | :active-text-color="theme" |
| | | :collapse-transition="false" |
| | | :collapse-transition="true" |
| | | mode="vertical" |
| | | :class="sideTheme" |
| | | > |
| | |
| | | const showLogo = computed(() => settingsStore.sidebarLogo) |
| | | const sideTheme = computed(() => settingsStore.sideTheme) |
| | | const theme = computed(() => settingsStore.theme) |
| | | const isCollapse = computed(() => !appStore.sidebar.opened) |
| | | |
| | | // 获取菜单背景色 |
| | | const getMenuBackground = computed(() => { |
| | |
| | | }), |
| | | actions: { |
| | | toggleSideBar(withoutAnimation) { |
| | | return true |
| | | console.log('toggleSideBar', withoutAnimation) |
| | | if (this.sidebar.hide) { |
| | | return false |
| | | } |
| | | this.sidebar.opened = !this.sidebar.opened |
| | | this.sidebar.withoutAnimation = withoutAnimation |
| | | if (this.sidebar.opened) { |
| | | Cookies.set('sidebarStatus', 1) |
| | | } else { |
| | | Cookies.set('sidebarStatus', 0) |
| | | } |
| | | }, |
| | | closeSideBar({ withoutAnimation }) { |
| | | Cookies.set('sidebarStatus', 0) |