[new feature] Radio: add icon-size prop

This commit is contained in:
陈嘉涵 2019-05-08 17:41:11 +08:00
parent d46b6e4fde
commit 21589c9b9f
4 changed files with 19 additions and 10 deletions

View File

@ -76,11 +76,6 @@
- 支持`Number`类型的`size`属性
### Popup
- 新增`click`事件
- 新增`duration`属性
### Loading
- 新增`default`插槽
@ -97,6 +92,15 @@
- 新增`left-icon`插槽
- 新增`right-icon`插槽
### Popup
- 新增`click`事件
- 新增`duration`属性
### Radio
- 新增`icon-size`属性
### SubmitBar
- 新增`tip-icon`属性

View File

@ -95,6 +95,7 @@ export default {
| name | Radio name | `any` | - |
| shape | Can be set to `square` | `String` | `round` |
| disabled | Whether to disable radio | `Boolean` | `false` |
| icon-size | Icon size | `String | Number` | `20px` |
| label-disabled | Whether to disable label click | `Boolean` | `false` |
| label-position | Can be set to `left` | `String` | `right` |
| checked-color | Checked color | `String` | `#1989fa` | - |

View File

@ -8,19 +8,21 @@
&__label {
display: inline-block;
vertical-align: middle;
line-height: @radio-size;
}
&__icon {
height: @radio-size;
height: 1em;
line-height: 1em;
font-size: @radio-size;
.van-icon {
font-size: 14px;
display: block;
width: 1.25em;
height: 1.25em;
font-size: .8em;
color: transparent;
text-align: center;
line-height: inherit;
width: @radio-size;
height: @radio-size;
box-sizing: border-box;
border: 1px solid @radio-border-color;
transition: @radio-transition-duration;
@ -56,6 +58,7 @@
&__label {
color: @radio-label-color;
line-height: @radio-size;
margin-left: @radio-label-margin;
&--left {

View File

@ -99,6 +99,7 @@ export default {
| name | 标识符 | 任意类型 | - | - |
| shape | 形状,可选值为 `square` | `String` | `round` | 1.6.0 |
| disabled | 是否为禁用状态 | `Boolean` | `false` | - |
| icon-size | 图标大小,默认单位为`px` | `String | Number` | `20px` | 2.0.0 |
| label-disabled | 是否禁用文本内容点击 | `Boolean` | `false` | 1.1.13 |
| label-position | 文本位置,可选值为 `left` | `String` | `right` | 1.1.13 |
| checked-color | 选中状态颜色 | `String` | `#1989fa` | 1.4.5 |