hlsRadioButton.md 1.17 KB
Newer Older
Jefferyne's avatar
Jefferyne committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
# HlsRadioGroup,HlsRadioButton\(单选按钮组合标签\)

##### 提示:这两个标签必须在一起用且HlsRadioButton标签需写在hlsRadioGroup标签内

### 一般属性:

### hlsRadioGroup:

| 属性名称 | 类型 | 描述 |
| :--- | :--- | :--- |
| bindModel | String | 绑定数据模型 |
| bind | String | 绑定值 |

### HlsRadioButton:

| 属性名称 | 类型 | 描述 |
| :--- | :--- | :--- |
| prompt | String | 展示的值 |
| value | String | 设置默认值 |
| width | String | 设置宽度 |
| icon | String | 图标 |

### 用法:

```html
<script>
     var model = kendo.observable({
        data: {}
     });
</script>
<h:hlsRadioGroup bindModel="model" bind="value: data.value">
    <h:hlsRadioButton prompt="aa" value="AA" width="12px" icon="fa fa-arrow"></h:hlsRadioButton>
    <h:hlsRadioButton prompt="bb" value="BB" width="12px" icon="fa fa-arrow"></h:hlsRadioButton>
    <h:hlsRadioButton prompt="cc" value="CC" width="12px" icon="fa fa-arrow"></h:hlsRadioButton>
</h:hlsRadioGroup>
```

选中后效果图:![](/assets/2172053.png)

获取选中的值:

```html
<script>
    var checkedValue = model.data.value//获取值为BB
</script>
```