(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["tuniao-ui/components/tn-checkbox/tn-checkbox"],{"0550":function(t,e,i){"use strict";i.r(e);var a=i("ff79"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},"5ff1":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this.$createElement,e=(this._self._c,this.__get_style([this.checkboxStyle])),i=this.__get_style([this.iconStyle]);this.$mp.data=Object.assign({},{$root:{s0:e,s1:i}})},n=[]},"8d71":function(t,e,i){},"954d":function(t,e,i){"use strict";var a=i("8d71"),n=i.n(a);n.a},be3f:function(t,e,i){"use strict";i.r(e);var a=i("5ff1"),n=i("0550");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("954d");var l=i("f0c5"),h=Object(l["a"])(n["default"],a["b"],a["c"],!1,null,"00b3b5b5",null,!1,a["a"],void 0);e["default"]=h.exports},ff79:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={name:"tn-checkbox",props:{name:{type:[String,Number],default:""},value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledLabel:{type:Boolean,default:!1},shape:{type:String,default:""},activeColor:{type:String,default:""},size:{type:Number,default:0},iconName:{type:String,default:"success"},iconSize:{type:Number,default:0},labelSize:{type:Number,default:0}},computed:{isDisabled:function(){return this.disabled?this.disabled:!!this.parent&&this.parentData.disabled},isDisabledLabel:function(){return this.disabledLabel?this.disabledLabel:!!this.parent&&this.parentData.disabledLabel},checkboxSize:function(){return this.size?this.size:this.parent?this.parentData.size:34},elAvtiveColor:function(){return this.activeColor?this.activeColor:this.parent?this.parentData.activeColor:"#01BEFF"},elShape:function(){return this.shape?this.shape:this.parent?this.parentData.shape:"square"},iconClass:function(){var t="";return t+=" tn-checkbox__icon-wrap--"+this.elShape,this.checkValue&&(t+=" tn-checkbox__icon-wrap--checked"),this.isDisabled&&(t+=" tn-checkbox__icon-wrap--disabled"),this.value&&this.isDisabled&&(t+=" tn-checkbox__icon-wrap--disabled--checked"),t},iconStyle:function(){var t={};return this.elAvtiveColor&&this.checkValue&&!this.isDisabled&&(t.borderColor=this.elAvtiveColor,t.backgroundColor=this.elAvtiveColor),t.color=this.checkValue?"#FFFFFF":"transparent",t.width=this.checkboxSize+"rpx",t.height=t.width,t.fontSize=(this.iconSize?this.iconSize:this.parent?this.parentData.iconSize:20)+"rpx",t},checkboxStyle:function(){var t={};return this.parent&&this.parentData.width&&(t.float="left"),this.parent&&this.parentData.wrap&&(t.width="100%"),t},labelClass:function(){var t="";return this.isDisabled&&(t+=" tn-checkbox__label--disabled"),t}},data:function(){return{checkValue:!1,parentData:{value:null,max:null,disabled:null,disabledLabel:null,shape:null,activeColor:null,size:null,width:null,wrap:null,iconSize:null}}},watch:{value:function(t){this.checkValue=t}},created:function(){this.updateParentData(),this.parent&&this.parent.children.push(this)},methods:{updateCheckValue:function(){this.checkValue=this.parent&&this.parentData.value.includes(this.name)||!0===this.value,this.parent&&this.value&&!this.parentData.value.includes(this.name)&&(this.parentData.value.push(this.name),this.parent.initValue(this.parentData.value))},updateParentData:function(){this.getParentData("tn-checkbox-group"),this.updateCheckValue()},onClickLabel:function(){this.isDisabled||this.isDisabledLabel||this.setValue()},toggle:function(){this.isDisabled||this.setValue()},emitEvent:function(){var t=this;this.$emit("change",{name:this.name,value:!this.checkValue}),this.parent&&(this.checkValue=!this.checkValue,setTimeout((function(){t.parent.emitEvent&&t.parent.emitEvent()}),80))},setValue:function(){if(this.parent)if(!0===this.checkValue)this.emitEvent();else{if(this.parentData.value.length>=this.parentData.max)return this.$tn.message.toast("最多可选".concat(this.parent.max,"项"));this.emitEvent()}else this.emitEvent(),this.$emit("input",!this.checkValue)}}};e.default=a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'tuniao-ui/components/tn-checkbox/tn-checkbox-create-component',
    {
        'tuniao-ui/components/tn-checkbox/tn-checkbox-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("be3f"))
        })
    },
    [['tuniao-ui/components/tn-checkbox/tn-checkbox-create-component']]
]);
