UNPKG

bmui

Version:

Bluemoon Moon Components

78 lines (73 loc) 1.93 kB
import MixinInput from '../mixins/input'; var __render = function __render() { var _vm = this; var _h = _vm.$createElement; var _c = _vm._self._c || _h; return _c('div', { staticClass: "bmui-radio" }, [_c('p', { staticClass: "bmui-radio-title" }, [_vm._v(_vm._s(_vm.title || 'TITLE')), _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.isNeed, expression: "isNeed" }], staticClass: "bmui-radio-isNeed" }, [_vm._v("*")])]), _vm._v(" "), _c('p', { staticClass: "bmui-radio-ctrls" }, _vm._l(_vm.items, function (item, index) { return _c('label', { key: index, staticClass: "bmui-radio-ctrl", "class": { 'bmui-radio-disabled': item.disabled } }, [_c('input', _vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.valueInside, expression: "valueInside" }], staticClass: "bmui-radio-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: 'BmuiRadio', mixins: [MixinInput], props: { title: { type: String, "default": '' }, items: { type: Array, "default": function _default() { return []; } }, isNeed: { type: Boolean, "default": false } } };