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jrw8qrhWIO8ttCh+aNbktShMWL7ku5OaejBqcTU5Npj/RY0FdWMhUsCSeSDT0FTWwWKg5wXJd/aUgE5frVFSB+F5pgdZwE5yRdgqW7rUv9B2/kq9eaI/5BsIEdbCBjo1ZUGA8jNaq+X+SsiFTVeocELgNrukT/Ns/jofa5Gimloyp7krAmaQwbHB8WpH0jg4KjIkbjxwflo0tm19vsXH/TUVY88nREAAAAASUVORK5CYII=";const l=[],d={name:"images-waterfall-item",props:{data:Array},data(){return{selected:[]}},methods:{isSelected(a){return this.selected.findIndex(e=>e.id===a)!==-1},toggleSelect(a){const e=l.findIndex(t=>t.id===a.id);e===-1?l.push(a):l.splice(e,1),this.selected=l,this.$emit("selected",l)}},watch:{data(){l=[],this.selected=[]}}};var c=function(){var e=this,t=e._self._c;return e.data.length?t("div",{staticClass:"waterfall-column-item"},e._l(e.data,function(s){return t("div",{key:s.id,class:["waterfall-list-item",e.isSelected(s.id)?"selected":""],on:{click:function(n){return e.toggleSelect(s)}}},[t("img",{staticClass:"select",attrs:{src:o,alt:""}}),t("img",{staticClass:"bg",attrs:{src:s.image}}),t("div",{staticClass:"mask-bg"})])}),0):e._e()},A=[],g=i(d,c,A,!1,null,"a917a1fd",null,null);const f=g.exports;const _={name:"images-waterfall",props:{loading:{type:Boolean,default:!1},data:{type:Array,default:()=>[]},page:{type:Number,default:1},totalPage:{type:Number,default:1}},mounted(){r(this.$refs.container,this.loadData)},methods:{loadData(){this.page<this.totalPage&&this.$emit("loadData",this.page+1)},onSelected(a){this.$emit("selected",a)}},components:{WaterfallItem:f}};var m=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"container",staticClass:"waterfall-scrollbar"},[t("div",{staticClass:"waterfall"},e._l(e.data,function(s,n){return t("WaterfallItem",{key:n,attrs:{data:s},on:{selected:e.onSelected}})}),1)])},u=[],h=i(_,m,u,!1,null,"f95a02f1",null,null);const v=h.exports;export{v as W};
