修改左侧菜单样式

master
夜笙歌 5 days ago
parent 9a2046683a
commit 0f6755e862

@ -43,16 +43,28 @@ export default {
TagsView TagsView
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
mounted() {
console.log(this.sidebar)
},
watch: { watch: {
'sidebar.opened': { 'sidebar.opened': {
handler: function() { handler: function() {
console.log(this.sidebar.opened)
if (this.sidebar.opened) { if (this.sidebar.opened) {
this.sidebarWidth = 200 this.sidebarWidth = 200
} else { } else {
this.sidebarWidth = 54 this.sidebarWidth = 54
} }
} }
},
'sidebar.hide': {
handler: function() {
if (this.sidebar.hide) {
this.sidebarWidth = 54
} else {
this.sidebar.opened = true
this.sidebarWidth = 200
}
}
} }
}, },
computed: { computed: {
@ -81,7 +93,6 @@ export default {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}, },
setLineLeft(e) { setLineLeft(e) {
console.log(e)
let left = e.pageX let left = e.pageX
if (left < 54) { if (left < 54) {
left = 54 left = 54

Loading…
Cancel
Save