11 lines
4.3 KiB
JavaScript
11 lines
4.3 KiB
JavaScript
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["node-modules/uview-ui/components/u-checkbox/u-checkbox"],{"0d49":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-checkbox",props:{name:{type:[String,Number],default:""},shape:{type:String,default:""},value:{type:Boolean,default:!1},disabled:{type:[String,Boolean],default:""},labelDisabled:{type:[String,Boolean],default:""},activeColor:{type:String,default:""},iconSize:{type:[String,Number],default:""},labelSize:{type:[String,Number],default:""},size:{type:[String,Number],default:""}},data:function(){return{parentDisabled:!1,newParams:{}}},created:function(){this.parent=this.$u.$parent.call(this,"u-checkbox-group"),this.parent&&this.parent.children.push(this)},computed:{isDisabled:function(){return""!==this.disabled?this.disabled:!!this.parent&&this.parent.disabled},isLabelDisabled:function(){return""!==this.labelDisabled?this.labelDisabled:!!this.parent&&this.parent.labelDisabled},checkboxSize:function(){return this.size?this.size:this.parent?this.parent.size:34},checkboxIconSize:function(){return this.iconSize?this.iconSize:this.parent?this.parent.iconSize:20},elActiveColor:function(){return this.activeColor?this.activeColor:this.parent?this.parent.activeColor:"primary"},elShape:function(){return this.shape?this.shape:this.parent?this.parent.shape:"square"},iconStyle:function(){var t={};return this.elActiveColor&&this.value&&!this.isDisabled&&(t.borderColor=this.elActiveColor,t.backgroundColor=this.elActiveColor),t.width=this.$u.addUnit(this.checkboxSize),t.height=this.$u.addUnit(this.checkboxSize),t},iconColor:function(){return this.value?"#ffffff":"transparent"},iconClass:function(){var t=[];return t.push("u-checkbox__icon-wrap--"+this.elShape),1==this.value&&t.push("u-checkbox__icon-wrap--checked"),this.isDisabled&&t.push("u-checkbox__icon-wrap--disabled"),this.value&&this.isDisabled&&t.push("u-checkbox__icon-wrap--disabled--checked"),t.join(" ")},checkboxStyle:function(){var t={};return this.parent&&this.parent.width&&(t.width=this.parent.width,t.float="left"),this.parent&&this.parent.wrap&&(t.width="100%"),t}},methods:{onClickLabel:function(){this.isLabelDisabled||this.isDisabled||this.setValue()},toggle:function(){this.isDisabled||this.setValue()},emitEvent:function(){var t=this;this.$emit("change",{value:!this.value,name:this.name}),setTimeout((function(){t.parent&&t.parent.emitEvent&&t.parent.emitEvent()}),80)},setValue:function(){var t=0;if(this.parent&&this.parent.children&&this.parent.children.map((function(e){e.value&&t++})),1==this.value)this.emitEvent(),this.$emit("input",!this.value);else{if(this.parent&&t>=this.parent.max)return this.$u.toast("最多可选".concat(this.parent.max,"项"));this.emitEvent(),this.$emit("input",!this.value)}}}};e.default=n},9492:function(t,e,i){"use strict";i.r(e);var n=i("0d49"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},b00f:function(t,e,i){"use strict";var n=i("c6bd"),a=i.n(n);a.a},c6bd:function(t,e,i){},c6ff:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return n}));var n={uIcon:function(){return i.e("node-modules/uview-ui/components/u-icon/u-icon").then(i.bind(null,"584e"))}},a=function(){var t=this.$createElement,e=(this._self._c,this.__get_style([this.checkboxStyle])),i=this.__get_style([this.iconStyle]),n=this.$u.addUnit(this.labelSize);this.$mp.data=Object.assign({},{$root:{s0:e,s1:i,g0:n}})},s=[]},f637:function(t,e,i){"use strict";i.r(e);var n=i("c6ff"),a=i("9492");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("b00f");var r=i("f0c5"),u=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"64fe7600",null,!1,n["a"],void 0);e["default"]=u.exports}}]);
|
||
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||
|
'node-modules/uview-ui/components/u-checkbox/u-checkbox-create-component',
|
||
|
{
|
||
|
'node-modules/uview-ui/components/u-checkbox/u-checkbox-create-component':(function(module, exports, __webpack_require__){
|
||
|
__webpack_require__('543d')['createComponent'](__webpack_require__("f637"))
|
||
|
})
|
||
|
},
|
||
|
[['node-modules/uview-ui/components/u-checkbox/u-checkbox-create-component']]
|
||
|
]);
|