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.

11 lines
3.9 KiB

3 years ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["node-modules/uview-ui/components/u-waterfall/u-waterfall"],{"0d21":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(i("a34a"));function r(t){return t&&t.__esModule?t:{default:t}}function u(t,e,i,n,r,u,s){try{var a=t[u](s),c=a.value}catch(f){return void i(f)}a.done?e(c):Promise.resolve(c).then(n,r)}function s(t){return function(){var e=this,i=arguments;return new Promise((function(n,r){var s=t.apply(e,i);function a(t){u(s,n,r,a,c,"next",t)}function c(t){u(s,n,r,a,c,"throw",t)}a(void 0)}))}}var a={name:"u-waterfall",props:{value:{type:Array,required:!0,default:function(){return[]}},addTime:{type:[Number,String],default:200},idKey:{type:String,default:"id"}},data:function(){return{leftList:[],rightList:[],tempList:[],children:[]}},watch:{copyFlowList:function(t,e){var i=Array.isArray(e)&&e.length>0?e.length:0;this.tempList=this.tempList.concat(this.cloneData(t.slice(i))),this.splitData()}},mounted:function(){this.tempList=this.cloneData(this.copyFlowList),this.splitData()},computed:{copyFlowList:function(){return this.cloneData(this.value)}},methods:{splitData:function(){var t=this;return s(n.default.mark((function e(){var i,r,u;return n.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.tempList.length){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.$uGetRect("#u-left-column");case 4:return i=e.sent,e.next=7,t.$uGetRect("#u-right-column");case 7:if(r=e.sent,u=t.tempList[0],u){e.next=11;break}return e.abrupt("return");case 11:i.height<r.height?t.leftList.push(u):i.height>r.height?t.rightList.push(u):t.leftList.length<=t.rightList.length?t.leftList.push(u):t.rightList.push(u),t.tempList.splice(0,1),t.tempList.length&&setTimeout((function(){t.splitData()}),t.addTime);case 14:case"end":return e.stop()}}),e)})))()},cloneData:function(t){return JSON.parse(JSON.stringify(t))},clear:function(){this.leftList=[],this.rightList=[],this.$emit("input",[]),this.tempList=[]},remove:function(t){var e=this,i=-1;i=this.leftList.findIndex((function(i){return i[e.idKey]==t})),-1!=i?this.leftList.splice(i,1):(i=this.rightList.findIndex((function(i){return i[e.idKey]==t})),-1!=i&&this.rightList.splice(i,1)),i=this.value.findIndex((function(i){return i[e.idKey]==t})),-1!=i&&this.$emit("input",this.value.splice(i,1))},modify:function(t,e,i){var n=this,r=-1;if(r=this.leftList.findIndex((function(e){return e[n.idKey]==t})),-1!=r?this.leftList[r][e]=i:(r=this.rightList.findIndex((function(e){return e[n.idKey]==t})),-1!=r&&(this.rightList[r][e]=i)),r=this.value.findIndex((function(e){return e[n.idKey]==t})),-1!=r){var u=this.cloneData(this.value);u[r][e]=i,this.$emit("input",u)}}}};e.default=a},"4e25":function(t,e,i){"use strict";i.r(e);var n=i("6d83"),r=i("b495");for(var u in r)"default"!==u&&function(t){i.d(e,t,(function(){return r[t]}))}(u);i("dcef");var s,a=i("f0c5"),c=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"1e0fc018",null,!1,n["a"],s);e["default"]=c.exports},"6d83":function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return u})),i.d(e,"a",(function(){return n}));var r=function(){var t=this,e=t.$createElement;t._self._c},u=[]},b495:function(t,e,i){"use strict";i.r(e);var n=i("0d21"),r=i.n(n);for(var u in n)"default"!==u&&function(t){i.d(e,t,(function(){return n[t]}))}(u);e["default"]=r.a},bdf1:function(t,e,i){},dcef:function(t,e,i){"use strict";var n=i("bdf1"),r=i.n(n);r.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'node-modules/uview-ui/components/u-waterfall/u-waterfall-create-component',
{
'node-modules/uview-ui/components/u-waterfall/u-waterfall-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("4e25"))
})
},
[['node-modules/uview-ui/components/u-waterfall/u-waterfall-create-component']]
]);