mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-05 07:27:06 +08:00
优化:切换布局时触发 resize 事件,以解决部分页面响应时布局问题;
optimize: resize event is triggered when switching layout to solve the layout problem when part of the page responds;
This commit is contained in:
parent
a5c34a8514
commit
0c41878174
@ -43,10 +43,13 @@ export default {
|
||||
'theme.color': function(val) {
|
||||
let closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
|
||||
themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
|
||||
},
|
||||
'layout': function() {
|
||||
window.dispatchEvent(new Event('resize'))
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState('setting', ['theme', 'weekMode', 'lang'])
|
||||
...mapState('setting', ['layout', 'theme', 'weekMode', 'lang'])
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('setting', ['setDevice']),
|
||||
|
Loading…
x
Reference in New Issue
Block a user