vc-radio

Install

npm install vc-radio --save
// build version
import vcRadio from 'vc-radio'
// recommend for *.vue project for small bundle size
import vcRadio from 'vc-radio/src/Radio.vue'
// commonjs
require('./dist/build.min.js')
// script tag
<script src='./dist/build.min.js'></script>

Usage

props

name

label

type

value

checked

button

disabled

readonly

example

import Vue from 'vue'
import vcRadio from '../src'
new Vue({
el: '#app',
data () {
return {
bools: {
'true': true,
'false': false
},
label: '选择2',
value: true,
button: true,
type: 'success',
checked: true,
disabled: false,
readonly: false
}
},
components: {
vcRadio
}
})
<vc-radio
:label="label"
:checked.sync="checked"
:value="value"
:button="button"
:type="type"
:disabled="disabled"
:readonly="readonly"
>
选择1
</vc-radio>(slot)