Closed xiaoliugege closed 5 years ago
你好,这个菜单栏在折叠和展开时,有明显的卡顿现象,初步断定是发出一个 collapse 的自定义事件,有两个地方接受,home 和 sidebar 都有接受该事件, 建议改为分开两个事件,或者链式传递,就会很流畅 我是这样改的 header bus.$emit('collapse-menu', this.collapse);
sidebar bus.$on('collapse-menu', msg => { this.collapse = msg; bus.$emit('collapse-content', this.collapse); }) home bus.$on('collapse-content', msg => { this.collapse = msg; })
确实好些了,弄个pull request?
我自己改了好多东西,原来的已经面目全非了,让作者自己看见了改吧
收到
https://github.com/lin-xin/vue-manage-system/pull/208 已修复
你好,这个菜单栏在折叠和展开时,有明显的卡顿现象,初步断定是发出一个 collapse 的自定义事件,有两个地方接受,home 和 sidebar 都有接受该事件, 建议改为分开两个事件,或者链式传递,就会很流畅 我是这样改的 header bus.$emit('collapse-menu', this.collapse);
sidebar bus.$on('collapse-menu', msg => { this.collapse = msg; bus.$emit('collapse-content', this.collapse); }) home bus.$on('collapse-content', msg => { this.collapse = msg; })