bmui
Version:
Bluemoon Moon Components
59 lines (54 loc) • 1.49 kB
JavaScript
import MixinInput from '../mixins/input';
var __render = function __render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('ul', {
staticClass: "bmui-radio_list"
}, _vm._l(_vm.items, function (item, index) {
return _c('li', {
key: index
}, [_c('label', {
staticClass: "bmui-radio_list-item",
"class": {
'bmui-radio_list-disabled': item.disabled
}
}, [_c('input', _vm._b({
directives: [{
name: "model",
rawName: "v-model",
value: _vm.valueInside,
expression: "valueInside"
}],
staticClass: "bmui-radio_list-input",
attrs: {
"type": "radio",
"disabled": item.disabled
},
domProps: {
"value": typeof item === 'string' ? item : item.value,
"checked": _vm._q(_vm.valueInside, typeof item === 'string' ? item : item.value)
},
on: {
"change": function change($event) {
_vm.valueInside = typeof item === 'string' ? item : item.value;
}
}
}, 'input', _vm.mixinInputProps, false)), _vm._v(_vm._s((typeof item === 'string' ? item : item.name) || 'ITEM') + "\n ")])]);
}), 0);
};
var __staticRender = [];
export default {
render: __render,
staticRenderFns: __staticRender,
name: 'BmuiRadioList',
mixins: [MixinInput],
props: {
items: {
type: Array,
"default": function _default() {
return [];
}
}
}
};