eeeeeeuuuu-ui
Version:
uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
12 lines (11 loc) • 3.07 kB
JavaScript
require('../../../app.js');
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-radio/u-radio"],{"2e21":function(e,t,i){"use strict";i.r(t);var a,s={uIcon:function(){return i.e("uview-ui/components/u-icon/u-icon").then(i.bind(null,"ece6"))}},l=function(){var e=this,t=e.$createElement,i=(e._self._c,e.__get_style([e.radioStyle])),a=e.__get_style([e.iconStyle]),s=e.$u.addUnit(e.labelSize);e.$mp.data=Object.assign({},{$root:{s0:i,s1:a,g0:s}})},n=[],r={name:"u-radio",props:{name:{type:[String,Number],default:""},shape:{type:String,default:""},disabled:{type:[String,Boolean],default:""},labelDisabled:{type:[String,Boolean],default:""},activeColor:{type:String,default:""},iconSize:{type:[String,Number],default:""},labelSize:{type:[String,Number],default:""}},data(){return{parentDisabled:!1}},created(){this.parent=this.$u.$parent.call(this,"u-radio-group")},computed:{elDisabled(){return""!==this.disabled?this.disabled:!!this.parent&&this.parent.disabled},elLabelDisabled(){return""!==this.labelDisabled?this.labelDisabled:!!this.parent&&this.parent.labelDisabled},elSize(){return this.size?this.size:this.parent?this.parent.size:34},elIconSize(){return this.iconSize?this.iconSize:this.parent?this.parent.iconSize:20},elActiveColor(){return this.activeColor?this.activeColor:this.parent?this.parent.activeColor:"primary"},elShape(){return this.shape?this.shape:this.parent?this.parent.shape:"circle"},iconStyle(){let e={};return this.elActiveColor&&this.name==this.parent.value&&!this.elDisabled&&(e.borderColor=this.elActiveColor,e.backgroundColor=this.elActiveColor),e.width=this.$u.addUnit(this.elSize),e.height=this.$u.addUnit(this.elSize),e},iconColor(){return this.name==this.parent.value?"#ffffff":"transparent"},iconClass(){let e=[];return e.push("u-radio__icon-wrap--"+this.elShape),this.name==this.parent.value&&e.push("u-radio__icon-wrap--checked"),this.elDisabled&&e.push("u-radio__icon-wrap--disabled"),this.name==this.parent.value&&this.elDisabled&&e.push("u-radio__icon-wrap--disabled--checked"),e.join(" ")},radioStyle(){let e={};return this.parent.width&&(e.width=this.parent.width,e.float="left"),this.parent.wrap&&(e.width="100%"),e}},methods:{onClickLabel(){this.elLabelDisabled||this.elDisabled||(this.parent.setValue(this.name),this.emitEvent())},toggle(){this.elDisabled||(this.parent.setValue(this.name),this.emitEvent())},emitEvent(){this.parent.value!=this.name&&this.$emit("change",this.name)}}},h=r,o=(i("89a4"),i("f0c5")),u=Object(o["a"])(h,l,n,!1,null,"682d5492",null,!1,s,a);t["default"]=u.exports},5489:function(e,t,i){},"89a4":function(e,t,i){"use strict";var a=i("5489"),s=i.n(a);s.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'uview-ui/components/u-radio/u-radio-create-component',
{
'uview-ui/components/u-radio/u-radio-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("2e21"))
})
},
[['uview-ui/components/u-radio/u-radio-create-component']]
]);