2025-03-21 16:50:18 +08:00

12 lines
4.6 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["tuniao-ui/components/tn-radio/tn-radio"],{559:function(t,e,a){"use strict";a.r(e);var i=a(560),n=a(562);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);a(564);var s,o=a(42),l=Object(o["default"])(n["default"],i["render"],i["staticRenderFns"],!1,null,"6107447c",null,!1,i["components"],s);l.options.__file="tuniao-ui/components/tn-radio/tn-radio.vue",e["default"]=l.exports},560:function(t,e,a){"use strict";a.r(e);var i=a(561);a.d(e,"render",(function(){return i["render"]})),a.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),a.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),a.d(e,"components",(function(){return i["components"]}))},561:function(t,e,a){"use strict";var i;a.r(e),a.d(e,"render",(function(){return n})),a.d(e,"staticRenderFns",(function(){return s})),a.d(e,"recyclableRender",(function(){return r})),a.d(e,"components",(function(){return i}));var n=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__get_style([t.radioStyle])),i=t.__get_style([t.iconStyle]);t.$mp.data=Object.assign({},{$root:{s0:a,s1:i}})},r=!1,s=[];n._withStripped=!0},562:function(t,e,a){"use strict";a.r(e);var i=a(563),n=a.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);e["default"]=n.a},563: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},564:function(t,e,a){"use strict";a.r(e);var i=a(565),n=a.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);e["default"]=n.a},565:function(t,e,a){}}]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/tuniao-ui/components/tn-radio/tn-radio.js.map
;(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__('2')['createComponent'](__webpack_require__(559))
})
},
[['tuniao-ui/components/tn-radio/tn-radio-create-component']]
]);