You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.6 KiB
54 lines
1.6 KiB
7 years ago
|
<cn>
|
||
|
#### 按钮尺寸
|
||
|
按钮有大、中、小三种尺寸。
|
||
|
通过设置 `size` 为 `large` `small` 分别把按钮设为大、小尺寸。若不设置 `size`,则尺寸为中。
|
||
|
</cn>
|
||
|
|
||
|
<us>
|
||
|
#### Size
|
||
|
Ant Design supports a default button size as well as a large and small size.
|
||
|
If a large or small button is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a button with the default size.
|
||
|
</us>
|
||
|
|
||
|
```html
|
||
7 years ago
|
<template>
|
||
|
<div>
|
||
7 years ago
|
<a-radio-group :value="size" @change="handleSizeChange">
|
||
|
<a-radio-button value="large">Large</a-radio-button>
|
||
|
<a-radio-button value="default">Default</a-radio-button>
|
||
|
<a-radio-button value="small">Small</a-radio-button>
|
||
|
</a-radio-group>
|
||
7 years ago
|
<br /><br />
|
||
7 years ago
|
<a-button type="primary" :size="size">Primary</a-button>
|
||
|
<a-button :size="size">Normal</a-button>
|
||
|
<a-button type="dashed" :size="size">Dashed</a-button>
|
||
|
<a-button type="danger" :size="size">Danger</a-button>
|
||
7 years ago
|
<br />
|
||
7 years ago
|
<a-button type="primary" shape="circle" icon="download" :size="size" />
|
||
|
<a-button type="primary" icon="download" :size="size">Download</a-button>
|
||
7 years ago
|
<br />
|
||
7 years ago
|
<a-button-group :size="size">
|
||
|
<a-button type="primary">
|
||
|
<a-icon type="left" />Backward
|
||
|
</a-button>
|
||
|
<a-button type="primary">
|
||
|
Forward<a-icon type="right" />
|
||
|
</a-button>
|
||
|
</a-button-group>
|
||
7 years ago
|
</div>
|
||
|
</template>
|
||
|
<script>
|
||
|
export default {
|
||
|
data () {
|
||
|
return {
|
||
|
size: 'large',
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
handleSizeChange (e) {
|
||
|
this.size = e.target.value
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
</script>
|
||
7 years ago
|
```
|