yunshangxie/unpackage/dist/build/mp-weixin/tuniao-ui/components/tn-radio/tn-radio.js

11 lines
4.0 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["tuniao-ui/components/tn-radio/tn-radio"],{1379:function(t,e,a){},"5bd8":function(t,e,a){"use strict";var i=a("1379"),n=a.n(i);n.a},9055:function(t,e,a){"use strict";a.r(e);var i=a("9b9a"),n=a.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(s);e["default"]=n.a},"92a1":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return n})),a.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.__get_style([this.radioStyle])),a=this.__get_style([this.iconStyle]);this.$mp.data=Object.assign({},{$root:{s0:e,s1:a}})},n=[]},"9b9a":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"tn-radio",props:{name:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},disabledLabel:{type:Boolean,default:!1},shape:{type:String,default:""},activeColor:{type:String,default:""},size:{type:Number,default:0},iconSize:{type:Number,default:0},labelSize:{type:Number,default:0},labelColor:{type:String,default:"#080808"},borderColor:{type:String,default:"#080808"}},computed:{isDisabled:function(){return this.disabled?this.disabled:!!this.parentData.disabled&&this.parentData.disabled},isDisabledLabel:function(){return this.disabledLabel?this.disabledLabel:!!this.parentData.disabledLabel&&this.parentData.disabledLabel},elSize:function(){return this.size?this.size:this.parentData.size?this.parentData.size:34},elActiveColor:function(){return this.activeColor?this.activeColor:this.parentData.activeColor?this.parentData.activeColor:"#01BEFF"},elShape:function(){return this.shape?this.shape:this.parentData.shape?this.parentData.shape:"circle"},iconClass:function(){var t="";return t+=" tn-radio__icon-wrap--"+this.elShape,this.parentData.value===this.name&&(t+=" tn-radio__icon-wrap--checked"),this.isDisabled&&(t+=" tn-radio__icon-wrap--disabled"),this.parentData.value===this.name&&this.isDisabled&&(t+=" tn-radio__icon-wrap--disabled--checked"),t},iconStyle:function(){var t={};return this.elActiveColor&&this.parentData.value===this.name&&!this.isDisabled&&(t.borderColor=this.elActiveColor,t.backgroundColor=this.elActiveColor),t.color=this.parentData.value===this.name?"#FFFFFF":"transparent",t.width=this.elSize+"rpx",t.height=t.width,t.fontSize=(this.iconSize?this.iconSize:this.parentData.iconSize?this.parentData.iconSize:20)+"rpx",t.borderColor=this.borderColor,t},radioStyle:function(){var t={};return this.parent&&this.parentData.width&&(t.float="left"),this.parent&&this.parentData.wrap&&(t.width="100%"),t}},data:function(){return{parentData:{value:null,disabled:null,disabledLabel:null,shape:null,activeColor:null,size:null,width:null,wrap:null,iconSize:null}}},created:function(){this.updateParentData(),this.parent.children.push(this)},methods:{updateParentData:function(){this.getParentData("tn-radio-group")},onClickLabel:function(){this.isDisabledLabel||this.isDisabled||this.setRadioCheckedStatus()},toggle:function(){this.isDisabled||this.setRadioCheckedStatus()},emitEvent:function(){this.parentData.value!==this.name&&this.$emit("change",this.name)},setRadioCheckedStatus:function(){this.emitEvent(),this.parent&&(this.parent.setValue(this.name),this.parentData.value=this.name)}}};e.default=i},cf40:function(t,e,a){"use strict";a.r(e);var i=a("92a1"),n=a("9055");for(var s in n)["default"].indexOf(s)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(s);a("5bd8");var r=a("f0c5"),l=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"42b96b2d",null,!1,i["a"],void 0);e["default"]=l.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'tuniao-ui/components/tn-radio/tn-radio-create-component',
{
'tuniao-ui/components/tn-radio/tn-radio-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("cf40"))
})
},
[['tuniao-ui/components/tn-radio/tn-radio-create-component']]
]);