Skip to content

Commit 638bf07

Browse files
committed
fix(deps): update pro-layout@0.3.12
1 parent 33fea5a commit 638bf07

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"analyz": "vue-cli-service build --mode analyz"
1111
},
1212
"dependencies": {
13-
"@ant-design-vue/pro-layout": "0.3.9",
13+
"@ant-design-vue/pro-layout": "^0.3.12",
1414
"ant-design-vue": "^1.6.4",
1515
"axios": "^0.19.2",
1616
"core-js": "^3.6.5",

src/layouts/BasicLayout.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import { SettingDrawer, updateTheme, updateColorWeak } from '@ant-design-vue/pro
5757
import { i18nRender } from '@/locales'
5858
import { baseMixin } from '@/store/app-mixin'
5959
import {
60+
CONTENT_WIDTH_TYPE,
6061
SIDEBAR_TYPE, TOGGLE_COLOR,
6162
TOGGLE_CONTENT_WIDTH, TOGGLE_FIXED_HEADER,
6263
TOGGLE_FIXED_SIDEBAR,
@@ -133,7 +134,7 @@ export default {
133134
if (!this.isMobile && val['screen-xs']) {
134135
this.$store.commit(TOGGLE_MOBILE_TYPE, true)
135136
this.collapsed = false
136-
this.$store.commit(TOGGLE_CONTENT_WIDTH, false)
137+
this.$store.commit(TOGGLE_CONTENT_WIDTH, CONTENT_WIDTH_TYPE.Fluid)
137138
}
138139
},
139140
/**
@@ -143,17 +144,17 @@ export default {
143144
console.log('type', type, value)
144145
switch (type) {
145146
case 'contentWidth':
146-
this.$store.commit(TOGGLE_CONTENT_WIDTH, value === 'Fixed')
147+
this.$store.commit(TOGGLE_CONTENT_WIDTH, value)
147148
break
148149
case 'primaryColor':
149150
this.$store.commit(TOGGLE_COLOR, value)
150151
break
151152
case 'layout':
152153
this.$store.commit(TOGGLE_LAYOUT, value)
153154
if (value === 'sidemenu') {
154-
this.$store.commit(TOGGLE_CONTENT_WIDTH, false)
155+
this.$store.commit(TOGGLE_CONTENT_WIDTH, CONTENT_WIDTH_TYPE.Fluid)
155156
} else {
156-
this.$store.commit(TOGGLE_CONTENT_WIDTH, true)
157+
this.$store.commit(TOGGLE_CONTENT_WIDTH, CONTENT_WIDTH_TYPE.Fixed)
157158
this.$store.commit(TOGGLE_FIXED_SIDEBAR, false)
158159
}
159160
break

0 commit comments

Comments
 (0)