Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FairyEver committed Nov 8, 2018
1 parent 2ea7447 commit bf59905
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d2-admin",
"version": "1.5.8",
"version": "1.5.9",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --open",
Expand Down
14 changes: 9 additions & 5 deletions src/layout/header-aside/components/header-size/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ export default {
// 注意 这里是关键
// 因为需要访问 this.$ELEMENT 所以只能在这里使用这种方式
value: {
handler (val) {
if (this.$ELEMENT.size !== val) {
// 设置 element 全局尺寸
handler (val, oldVal) {
// https://github.com/d2-projects/d2-admin/pull/129
if (oldVal) {
// 这个情况在已经加载完页面 用户改变了尺寸时触发
this.$ELEMENT.size = val
// 清空缓存设置
// 由于已经加载过设置 需要清空缓存设置
this.pageKeepAliveClean()
// 刷新此页面
// 由于已经加载过设置 需要刷新此页面
this.$router.replace('/refresh')
} else {
// 这个情况在刷新页面时触发
this.$ELEMENT.size = val
}
},
immediate: true
Expand Down

0 comments on commit bf59905

Please sign in to comment.