Skip to content

Commit 46e9b77

Browse files
committed
Merge branch 'feature/global_size_demo' into develop
Former-commit-id: f21f4c82664500bfee2f5c489bfcdd9aa5ea526e [formerly 943c194] Former-commit-id: a684147
2 parents 54fcce1 + 86c5771 commit 46e9b77

File tree

5 files changed

+41
-175
lines changed

5 files changed

+41
-175
lines changed

src/menu/modules/demo-playground.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export default {
6060
title: '全局状态管理',
6161
icon: 'bolt',
6262
children: [
63-
{ path: `${pre}store/sys`, title: '系统状态', icon: 'microchip' },
6463
{ path: `${pre}store/menu`, title: '菜单控制', icon: 'bars' },
64+
{ path: `${pre}store/size`, title: '全局尺寸', icon: 'font' },
6565
{ path: `${pre}store/ua`, title: '浏览器信息', icon: 'info-circle' },
6666
{ path: `${pre}store/gray`, title: '灰度模式', icon: 'eye' },
6767
{ path: `${pre}store/fullscreen`, title: '全屏', icon: 'arrows-alt' },
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<d2-container type="card">
3+
<el-radio-group v-model="currentValue" @change="sizeSet">
4+
<el-radio-button label="default"></el-radio-button>
5+
<el-radio-button label="medium"></el-radio-button>
6+
<el-radio-button label="small"></el-radio-button>
7+
<el-radio-button label="mini"></el-radio-button>
8+
</el-radio-group>
9+
</d2-container>
10+
</template>
11+
12+
<script>
13+
import { mapState, mapMutations } from 'vuex'
14+
export default {
15+
data () {
16+
return {
17+
currentValue: ''
18+
}
19+
},
20+
computed: {
21+
...mapState('d2admin/size', [
22+
'value'
23+
])
24+
},
25+
watch: {
26+
value: {
27+
handler (val) {
28+
this.currentValue = val
29+
},
30+
immediate: true
31+
}
32+
},
33+
methods: {
34+
...mapMutations({
35+
sizeSet: 'd2admin/size/set'
36+
})
37+
}
38+
}
39+
</script>

src/pages/demo/playground/store/sys/index.vue

Lines changed: 0 additions & 172 deletions
This file was deleted.

src/plugin/d2admin/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default {
2525
defaultValue: '',
2626
user: true
2727
})
28-
console.log('size: ', size)
2928
// Element
3029
Vue.use(ElementUI, {
3130
size

src/router/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const frameIn = [
3232
{ path: 'page-cache/off', name: `${pre}page-cache-off`, component: () => import('@/pages/demo/playground/page-cache/off.vue'), meta: { ...meta, notCache: true, title: '关闭缓存' } },
3333
{ path: 'page-argu/send', name: `${pre}page-argu-send`, component: () => import('@/pages/demo/playground/page-argu/send.vue'), meta: { ...meta, title: '参数传递 发送' } },
3434
{ path: 'page-argu/get/:username', name: `${pre}page-argu-get`, component: () => import('@/pages/demo/playground/page-argu/get.vue'), meta: { ...meta, title: '参数传递 接收' } },
35-
{ path: 'store/sys', name: `${pre}store-sys`, component: () => import('@/pages/demo/playground/store/sys'), meta: { ...meta, title: '系统状态' } },
3635
{ path: 'store/menu', name: `${pre}store-menu`, component: () => import('@/pages/demo/playground/store/menu'), meta: { ...meta, title: '菜单控制' } },
36+
{ path: 'store/size', name: `${pre}store-size`, component: () => import('@/pages/demo/playground/store/size'), meta: { ...meta, title: '全局尺寸' } },
3737
{ path: 'store/ua', name: `${pre}store-ua`, component: () => import('@/pages/demo/playground/store/ua'), meta: { ...meta, title: '浏览器信息' } },
3838
{ path: 'store/gray', name: `${pre}store-gray`, component: () => import('@/pages/demo/playground/store/gray'), meta: { ...meta, title: '灰度模式' } },
3939
{ path: 'store/fullscreen', name: `${pre}store-fullscreen`, component: () => import('@/pages/demo/playground/store/fullscreen'), meta: { ...meta, title: '全屏' } },

0 commit comments

Comments
 (0)