优化控件尺寸选择组件

Former-commit-id: 74b1364c402fd0e76d9e54f09cfd9d9ae0bd0223 [formerly 74b1364c402fd0e76d9e54f09cfd9d9ae0bd0223 [formerly 74b1364c402fd0e76d9e54f09cfd9d9ae0bd0223 [formerly 74b1364c402fd0e76d9e54f09cfd9d9ae0bd0223 [formerly 6302dbbbe2f175b55e955b9e815a5ced2d46da9c [formerly 31d4052b8c935ce386a8a226f8fcefaf4c77bad4]]]]]
Former-commit-id: b3876f25425359511969e127335edeacdd9e905e
Former-commit-id: 352ad1e7929a2a803634a58d52070c0039cd3ebd
Former-commit-id: 67e132f39beda06a02e8d4b5c32e1aad1bdb3818 [formerly 8647d557e4dabc4dd8a7b7c98b0901030705262b]
Former-commit-id: 01b817461fcff23fcbfb68fc24f543feddc536d1
Former-commit-id: 7c8edc8a45ce2c37fa018fdc88092a6b7927b709
Former-commit-id: 6e54374302f81b64bb07792620b934a917cafa88
Former-commit-id: 3d26d56b738f678cadfe0178ddda1c9d09a4148b
Former-commit-id: cab873c1efeceaeba735b06bd3c36fd1841cc8e8
This commit is contained in:
liyang
2019-01-24 17:34:46 +08:00
parent 98965b3cfb
commit 0ddbb3299a

View File

@@ -1,20 +1,16 @@
<template>
<el-dropdown placement="bottom" size="small" @command="handleChange">
<el-button class="d2-mr btn-text can-hover" type="text">
<d2-icon name="font" style="font-size: 16px;"/>
</el-button>
<el-tooltip
effect="dark"
content="控件尺寸"
placement="right">
<el-button class="d2-mr btn-text can-hover" type="text">
<d2-icon name="font" style="font-size: 16px;"/>
</el-button>
</el-tooltip>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="default">
<d2-icon :name="iconName('default')" class="d2-mr-5"/>默认
</el-dropdown-item>
<el-dropdown-item command="medium">
<d2-icon :name="iconName('medium')" class="d2-mr-5"/>
</el-dropdown-item>
<el-dropdown-item command="small">
<d2-icon :name="iconName('small')" class="d2-mr-5"/>
</el-dropdown-item>
<el-dropdown-item command="mini">
<d2-icon :name="iconName('mini')" class="d2-mr-5"/>最小
<el-dropdown-item v-for="item in options" :key="item.value" :command="item.value">
<d2-icon :name="iconName(item.value)" class="d2-mr-5"/>{{item.label}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -24,6 +20,16 @@
import { mapState, mapMutations, mapActions } from 'vuex'
export default {
name: 'd2-header-size',
data () {
return {
options: [
{ label: '默认', value: 'default' },
{ label: '中', value: 'medium' },
{ label: '小', value: 'small' },
{ label: '最小', value: 'mini' }
]
}
},
computed: {
...mapState('d2admin/size', [
'value'