You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
9.3 KiB
10 lines
9.3 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-data-checkbox/uni-data-checkbox"],{"1e7b":function(t,e,s){},"3c9b":function(t,e,s){"use strict";s.d(e,"b",(function(){return i})),s.d(e,"c",(function(){return a})),s.d(e,"a",(function(){return l}));var l={uniEasyinput:function(){return Promise.all([s.e("common/vendor"),s.e("components/uni-easyinput/uni-easyinput")]).then(s.bind(null,"1fd1"))}},i=function(){var t=this,e=t.$createElement,s=(t._self._c,!t.loading&&t.multiple?t.__map(t.dataList,(function(e,s){var l=t.__get_orig(e),i=t.__get_style([e.styleBackgroud]),a="tag"!==t.mode&&"list"!==t.mode||"list"===t.mode&&"left"===t.icon?t.__get_style([e.styleIcon]):null,n=t.__get_style([e.styleIconText]),o="list"===t.mode&&"right"===t.icon?t.__get_style([e.styleBackgroud]):null;return{$orig:l,s0:i,s1:a,s2:n,s3:o}})):null),l=t.loading||t.multiple?null:t.__map(t.dataList,(function(e,s){var l=t.__get_orig(e),i=t.__get_style([e.styleBackgroud]),a="tag"!==t.mode&&"list"!==t.mode||"list"===t.mode&&"left"===t.icon?t.__get_style([e.styleBackgroud]):null,n="tag"!==t.mode&&"list"!==t.mode||"list"===t.mode&&"left"===t.icon?t.__get_style([e.styleIcon]):null,o=t.__get_style([e.styleIconText]),r="list"===t.mode&&"right"===t.icon?t.__get_style([e.styleRightIcon]):null;return{$orig:l,s4:i,s5:a,s6:n,s7:o,s8:r}}));t.$mp.data=Object.assign({},{$root:{l0:s,l1:l}})},a=[]},"8e8c":function(t,e,s){"use strict";s.r(e);var l=s("cf4a"),i=s.n(l);for(var a in l)"default"!==a&&function(t){s.d(e,t,(function(){return l[t]}))}(a);e["default"]=i.a},b8b4:function(t,e,s){"use strict";var l=s("1e7b"),i=s.n(l);i.a},cf4a:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=i(s("046c"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t){return u(t)||r(t)||o(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"===typeof t)return c(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?c(t,e):void 0}}function r(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function u(t){if(Array.isArray(t))return c(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,l=new Array(e);s<e;s++)l[s]=t[s];return l}var d={name:"uniDataChecklist",mixins:[l.default],props:{mode:{type:String,default:"default"},multiple:{type:Boolean,default:!1},value:{type:[Array,String,Number],default:function(){return""}},localdata:{type:Array,default:function(){return[]}},min:{type:[Number,String],default:""},max:{type:[Number,String],default:""},wrap:{type:Boolean,default:!1},icon:{type:String,default:"left"},selectedColor:{type:String,default:""},selectedTextColor:{type:String,default:""},options:{type:[Object,Array],default:function(){return{}}},collection:{type:String,default:""},action:{type:String,default:""},field:{type:String,default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},orderby:{type:String,default:""},where:{type:[String,Object],default:""},getone:{type:[Boolean,String],default:!1},manual:{type:Boolean,default:!1},inputVisble:{type:Boolean,default:!1}},watch:{localdata:{handler:function(t){this.range=t,this.dataList=this.getDataList(this.getSelectedValue(t)),this.$forceUpdate()},deep:!0},listData:function(t){this.range=t,this.dataList=this.getDataList(this.getSelectedValue(t))},value:function(t){this.dataList=this.getDataList(t),this.formItem&&this.formItem.setValue(t)}},data:function(){return{dataList:[],range:[],contentText:{contentdown:"查看更多",contentrefresh:"加载中",contentnomore:"没有更多"},styles:{selectedColor:"#007aff",selectedTextColor:"#333"},changeData:"888"}},created:function(){this.form=this.getForm("uniForms"),this.formItem=this.getForm("uniFormsItem"),this.formItem&&this.formItem.setValue(this.value),this.styles={selectedColor:this.selectedColor,selectedTextColor:this.selectedTextColor},this.formItem&&this.formItem.name&&(this.rename=this.formItem.name,this.form.inputChildrens.push(this)),this.localdata&&0!==this.localdata.length?(this.range=this.localdata,this.dataList=this.getDataList(this.getSelectedValue(this.range))):this.collection&&this.loadData()},methods:{init:function(t){},getForm:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uniForms",e=this.$parent,s=e.$options.name;while(s!==t){if(e=e.$parent,!e)return!1;s=e.$options.name}return e},chagne:function(t){var e=t.detail.value,s={value:[],data:[]};if(this.multiple)this.range.forEach((function(t){e.includes(t.value+"")&&(s.value.push(t.value),s.data.push(t))}));else{var l=this.range.find((function(t){return t.value+""===e}));l&&(s={value:l.value,data:l})}this.formItem&&this.formItem.setValue(s.value),this.$emit("input",s.value),this.$emit("change",{detail:s}),this.multiple?this.dataList=this.getDataList(s.value,!0):this.dataList=this.getDataList(s.value)},getLabelClass:function(t,e){var s,l,i=[];switch(this.mode){case"default":t.disabled&&i.push("disabled-cursor");break;case"button":(s=i).push.apply(s,["is-button"].concat(a(this.getClasses(t,"button"))));break;case"list":this.multiple?i.push("is-list-multiple-box"):i.push("is-list-box"),t.disabled&&i.push("is-list-disabled"),0!==e&&i.push("is-list-border");break;case"tag":(l=i).push.apply(l,["is-tag"].concat(a(this.getClasses(t,"tag"))));break}return i=i.join(" "),i},getCheckboxClass:function(t){var e,s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=[];this.multiple?(e=i).push.apply(e,a(this.getClasses(t,"default-multiple",l))):(s=i).push.apply(s,a(this.getClasses(t,"default",l)));return i=i.join(" "),i},getTextClass:function(t){var e,s,l,i,n=[];switch(this.mode){case"default":(e=n).push.apply(e,a(this.getClasses(t,"list")));break;case"button":(s=n).push.apply(s,a(this.getClasses(t,"list")));break;case"list":(l=n).push.apply(l,a(this.getClasses(t,"list")));break;case"tag":(i=n).push.apply(i,["is-tag-text"].concat(a(this.getClasses(t,"tag-text"))));break}return n=n.join(" "),n},getDataList:function(t){var e=this,s=JSON.parse(JSON.stringify(this.range)),l=[];return this.multiple&&(Array.isArray(t)||(t=[])),s.forEach((function(s,i){if(s.disabled=s.disable||s.disabled||!1,e.multiple)if(t.length>0){var a=t.find((function(t){return t===s.value}));s.selected=void 0!==a}else s.selected=!1;else s.selected=t===s.value;l.push(s)})),this.setRange(l)},setRange:function(t){var e=this,s=t.filter((function(t){return t.selected})),l=Number(this.min)||0,i=Number(this.max)||"";return t.forEach((function(a,n){if(e.multiple){if(s.length<=l){var o=s.find((function(t){return t.value===a.value}));void 0!==o&&(a.disabled=!0)}if(s.length>=i&&""!==i){var r=s.find((function(t){return t.value===a.value}));void 0===r&&(a.disabled=!0)}}e.setClass(a,n),t[n]=a})),t},setClass:function(t,e){t.labelClass=this.getLabelClass(t,e),t.checkboxBgClass=this.getCheckboxClass(t,"-bg"),t.checkboxClass=this.getCheckboxClass(t),t.textClass=this.getTextClass(t),t.listClass=this.getCheckboxClass(t,"-list"),t.styleBackgroud=this.setStyleBackgroud(t),t.styleIcon=this.setStyleIcon(t),t.styleIconText=this.setStyleIconText(t),t.styleRightIcon=this.setStyleRightIcon(t)},getClasses:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=[];return t.disabled&&l.push("is-"+e+"-disabled"+s),t.selected&&l.push("is-"+e+"-checked"+s),"button"===this.mode&&"button"!==e||t.selected&&t.disabled&&l.push("is-"+e+"-disabled-checked"+s),l},getSelectedValue:function(t){if(!this.multiple)return this.value;var e=[];return t.forEach((function(t){t.selected&&e.push(t.value)})),this.value.length>0?this.value:e},setStyleBackgroud:function(t){var e={};return t.selected&&("list"!==this.mode&&(e.borderColor=this.styles.selectedColor),"tag"===this.mode&&(e.backgroundColor=this.styles.selectedColor)),e},setStyleIcon:function(t){var e={};return t.selected&&(e.backgroundColor=this.styles.selectedColor,e.borderColor=this.styles.selectedColor),e},setStyleIconText:function(t){var e={};return t.selected&&(this.styles.selectedTextColor?e.color=this.styles.selectedTextColor:"tag"===this.mode?e.color="#fff":e.color=this.styles.selectedColor),e},setStyleRightIcon:function(t){var e={};return t.selected&&"list"===this.mode&&(e.borderColor=this.styles.selectedColor),e},upToFa:function(t,e){console.log(t,"输入的值","item",e),this.$emit("getInput",t,e),setTimeout((function(){console.log(t)}),0)}}};e.default=d},dc86:function(t,e,s){"use strict";s.r(e);var l=s("3c9b"),i=s("8e8c");for(var a in i)"default"!==a&&function(t){s.d(e,t,(function(){return i[t]}))}(a);s("b8b4");var n,o=s("f0c5"),r=Object(o["a"])(i["default"],l["b"],l["c"],!1,null,null,null,!1,l["a"],n);e["default"]=r.exports}}]); |
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ |
|
'components/uni-data-checkbox/uni-data-checkbox-create-component', |
|
{ |
|
'components/uni-data-checkbox/uni-data-checkbox-create-component':(function(module, exports, __webpack_require__){ |
|
__webpack_require__('543d')['createComponent'](__webpack_require__("dc86")) |
|
}) |
|
}, |
|
[['components/uni-data-checkbox/uni-data-checkbox-create-component']] |
|
]);
|
|
|