(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-checkbox/u-checkbox"],{386:function(e,t,i){"use strict";i.r(t);var n=i(387),a=i(389);for(var r in a)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(r);i(392);var o,c=i(33),s=Object(c["default"])(a["default"],n["render"],n["staticRenderFns"],!1,null,"54acf820",null,!1,n["components"],o);s.options.__file="uview-ui/components/u-checkbox/u-checkbox.vue",t["default"]=s.exports},387:function(e,t,i){"use strict";i.r(t);var n=i(388);i.d(t,"render",(function(){return n["render"]})),i.d(t,"staticRenderFns",(function(){return n["staticRenderFns"]})),i.d(t,"recyclableRender",(function(){return n["recyclableRender"]})),i.d(t,"components",(function(){return n["components"]}))},388:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"render",(function(){return a})),i.d(t,"staticRenderFns",(function(){return o})),i.d(t,"recyclableRender",(function(){return r})),i.d(t,"components",(function(){return n}));try{n={uIcon:function(){return Promise.all([i.e("common/vendor"),i.e("uview-ui/components/u-icon/u-icon")]).then(i.bind(null,359))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var a=function(){var e=this,t=e.$createElement,i=(e._self._c,e.__get_style([e.checkboxStyle])),n=e.__get_style([e.iconWrapStyle]);e.$mp.data=Object.assign({},{$root:{s0:i,s1:n}})},r=!1,o=[];a._withStripped=!0},389:function(e,t,i){"use strict";i.r(t);var n=i(390),a=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);t["default"]=a.a},390:function(e,t,i){"use strict";(function(e){var n=i(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(i(391)),r={name:"u-checkbox",mixins:[e.$u.mpMixin,e.$u.mixin,a.default],data:function(){return{isChecked:!1,parentData:{iconSize:12,labelDisabled:null,disabled:null,shape:"square",activeColor:null,inactiveColor:null,size:18,value:null,iconColor:null,placement:"row",borderBottom:!1,iconPlacement:"left"}}},computed:{elDisabled:function(){return""!==this.disabled?this.disabled:null!==this.parentData.disabled&&this.parentData.disabled},elLabelDisabled:function(){return""!==this.labelDisabled?this.labelDisabled:null!==this.parentData.labelDisabled&&this.parentData.labelDisabled},elSize:function(){return this.size?this.size:this.parentData.size?this.parentData.size:21},elIconSize:function(){return this.iconSize?this.iconSize:this.parentData.iconSize?this.parentData.iconSize:12},elActiveColor:function(){return this.activeColor?this.activeColor:this.parentData.activeColor?this.parentData.activeColor:"#2979ff"},elInactiveColor:function(){return this.inactiveColor?this.inactiveColor:this.parentData.inactiveColor?this.parentData.inactiveColor:"#c8c9cc"},elLabelColor:function(){return this.labelColor?this.labelColor:this.parentData.labelColor?this.parentData.labelColor:"#606266"},elShape:function(){return this.shape?this.shape:this.parentData.shape?this.parentData.shape:"circle"},elLabelSize:function(){return e.$u.addUnit(this.labelSize?this.labelSize:this.parentData.labelSize?this.parentData.labelSize:"15")},elIconColor:function(){var e=this.iconColor?this.iconColor:this.parentData.iconColor?this.parentData.iconColor:"#ffffff";return this.elDisabled?this.isChecked?this.elInactiveColor:"transparent":this.isChecked?e:"transparent"},iconClasses:function(){var e=[];return e.push("u-checkbox__icon-wrap--"+this.elShape),this.elDisabled&&e.push("u-checkbox__icon-wrap--disabled"),this.isChecked&&this.elDisabled&&e.push("u-checkbox__icon-wrap--disabled--checked"),e},iconWrapStyle:function(){var t={};return t.backgroundColor=this.isChecked&&!this.elDisabled?this.elActiveColor:"#ffffff",t.borderColor=this.isChecked&&!this.elDisabled?this.elActiveColor:this.elInactiveColor,t.width=e.$u.addUnit(this.elSize),t.height=e.$u.addUnit(this.elSize),"right"===this.parentData.iconPlacement&&(t.marginRight=0),t},checkboxStyle:function(){var t={};return this.parentData.borderBottom&&"row"===this.parentData.placement&&e.$u.error("检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效"),this.parentData.borderBottom&&"column"===this.parentData.placement&&(t.paddingBottom="8px"),e.$u.deepMerge(t,e.$u.addStyle(this.customStyle))}},mounted:function(){this.init()},methods:{init:function(){var t=this;this.updateParentData(),this.parent||e.$u.error("u-checkbox必须搭配u-checkbox-group组件使用"),this.checked?this.isChecked=!0:e.$u.test.array(this.parentData.value)&&(this.isChecked=this.parentData.value.some((function(e){return e===t.name})))},updateParentData:function(){this.getParentData("u-checkbox-group")},wrapperClickHandler:function(e){"right"===this.parentData.iconPlacement&&this.iconClickHandler(e)},iconClickHandler:function(e){this.preventEvent(e),this.elDisabled||this.setRadioCheckedStatus()},labelClickHandler:function(e){this.preventEvent(e),this.elLabelDisabled||this.elDisabled||this.setRadioCheckedStatus()},emitEvent:function(){var t=this;this.$emit("change",this.isChecked),this.$nextTick((function(){e.$u.formValidate(t,"change")}))},setRadioCheckedStatus:function(){this.isChecked=!this.isChecked,this.emitEvent(),"function"===typeof this.parent.unCheckedOther&&this.parent.unCheckedOther(this)}},watch:{checked:function(){this.isChecked=this.checked}}};t.default=r}).call(this,i(2)["default"])},392:function(e,t,i){"use strict";i.r(t);var n=i(393),a=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);t["default"]=a.a},393:function(e,t,i){}}]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-checkbox/u-checkbox.js.map ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'uview-ui/components/u-checkbox/u-checkbox-create-component', { 'uview-ui/components/u-checkbox/u-checkbox-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('2')['createComponent'](__webpack_require__(386)) }) }, [['uview-ui/components/u-checkbox/u-checkbox-create-component']] ]);