| | |
| | | <template> |
| | | <div :class="{ 'has-logo': showLogo }"> |
| | | <logo v-if="showLogo" :collapse="isCollapse" /> |
| | | <logo |
| | | v-if="showLogo" |
| | | :collapse="isCollapse" |
| | | /> |
| | | <!-- <div class="logo" style="display:flex;background: #0f4567;"> |
| | | <img |
| | | style="width: 20px; height: 30px;margin: 8px 0 11px 18px" |
| | |
| | | |
| | | export default { |
| | | components: { SidebarItem, Logo }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | logo: require('@/assets/images/LOGO.png'), |
| | | logoDisplay: this.$store.state.logoDisplay |
| | |
| | | ...mapGetters([ |
| | | 'sidebar' |
| | | ]), |
| | | sidebar() { |
| | | sidebar () { |
| | | console.log('左边sidebar', this.$store.state.app.sidebar) |
| | | return this.$store.state.app.sidebar |
| | | }, |
| | | routes() { |
| | | // console.log(this.$router.options.routes) |
| | | routes () { |
| | | console.log('左边routes', this.$router.options.routes) |
| | | return this.$router.options.routes |
| | | }, |
| | | activeMenu() { |
| | | activeMenu () { |
| | | const route = this.$route |
| | | const { meta, path } = route |
| | | // if set path, the sidebar will highlight the path you set |
| | |
| | | } |
| | | return path |
| | | }, |
| | | showLogo() { |
| | | showLogo () { |
| | | return !this.$store.state.settings.sidebarLogo |
| | | }, |
| | | variables() { |
| | | variables () { |
| | | return variables |
| | | }, |
| | | isCollapse() { |
| | | isCollapse () { |
| | | return !this.sidebar.opened |
| | | } |
| | | } |