perf[SizeSelect]: add default size option (#1566)
This commit is contained in:
parent
bea356ac70
commit
87f1bbdb7b
|
@ -4,15 +4,24 @@
|
||||||
<svg-icon class-name="size-icon" icon-class="size" />
|
<svg-icon class-name="size-icon" icon-class="size" />
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :disabled="size==='medium'" command="medium">Medium</el-dropdown-item>
|
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">{{
|
||||||
<el-dropdown-item :disabled="size==='small'" command="small">Small</el-dropdown-item>
|
item.label }}</el-dropdown-item>
|
||||||
<el-dropdown-item :disabled="size==='mini'" command="mini">Mini</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
sizeOptions: [
|
||||||
|
{ label: 'Default', value: 'default' },
|
||||||
|
{ label: 'Medium', value: 'medium' },
|
||||||
|
{ label: 'Small', value: 'small' },
|
||||||
|
{ label: 'Mini', value: 'mini' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
size() {
|
size() {
|
||||||
return this.$store.getters.size
|
return this.$store.getters.size
|
||||||
|
|
Loading…
Reference in New Issue