radio components

This commit is contained in:
cookfront 2017-02-15 09:58:19 +08:00
parent cf87bd3603
commit 8f474da314
3 changed files with 56 additions and 4 deletions

View File

@ -1 +1,25 @@
<script>
export default {
data() {
return {
radio: '1'
};
}
};
</script>
## Radio组件
### 基础用法
:::demo
```html
<o2-radio v-model="radio"></o2-radio>
```
:::
### API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| disabled | 是否禁用单选框 | Boolean | false | |

View File

@ -0,0 +1,11 @@
<template>
<div class="o2-radio-group">
<slot></slot>
</div>
</template>
<script>
export default {
};
</script>

View File

@ -1,11 +1,28 @@
<template>
<div>
</div>
<o2-cell
class="o2-radio"
:class="{
'is-disabled': disabled
}">
</o2-cell>
</template>
<script>
import O2Cell from 'packages/cell';
export default {
name: 'o2-radio'
name: 'o2-radio',
components: {
O2Cell
},
props: {
disabled: Boolean,
value: {}
},
created() {
}
};
</script>