@soei/flyweight 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/dist/Flyweight.cjs +1 -1
- package/dist/Flyweight.js +78 -70
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/Flyweight.vue +19 -4
package/README.md
CHANGED
|
@@ -9,6 +9,59 @@
|
|
|
9
9
|
|
|
10
10
|
### 更新日志
|
|
11
11
|
|
|
12
|
+
### `0.0.8`
|
|
13
|
+
|
|
14
|
+
- #### 新增 `v-model:space`, 计算空间显示 `行` 与 `列`
|
|
15
|
+
|
|
16
|
+
被通知对象 `notice`: {`row`, `column`}
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<!-- eg.
|
|
20
|
+
当有5个元素,
|
|
21
|
+
当: :width="100% / 3", column = 3列, row = 2,
|
|
22
|
+
当: :width="100% / 5", column = 5列, row = 1,
|
|
23
|
+
当: :width="100% / 7", column = 7列, row = 1
|
|
24
|
+
...
|
|
25
|
+
-->
|
|
26
|
+
<!-- VUE3 -->
|
|
27
|
+
<template>
|
|
28
|
+
<s-flyweight v-model:space="notice"></s-flyweight>
|
|
29
|
+
</template>
|
|
30
|
+
<script setup>
|
|
31
|
+
let notice = ref({ row: 0, column: 0 });
|
|
32
|
+
watch(
|
|
33
|
+
() => notice.value,
|
|
34
|
+
(val) => {
|
|
35
|
+
console.log(val);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<!-- VUE2 -->
|
|
41
|
+
<template>
|
|
42
|
+
<s-flyweight :space.sync="notice"></s-flyweight>
|
|
43
|
+
</template>
|
|
44
|
+
<script>
|
|
45
|
+
export default {
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
notice: { row: 0, column: 0 },
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
</script>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### `0.0.7`
|
|
56
|
+
|
|
57
|
+
- #### 新增 `:auto`, 默认值: `false`
|
|
58
|
+
|
|
59
|
+
当 `auto` 为 `true` 时, `:width` 赋值会被视为 `最小值`, 剩余空间自动填充
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<s-flyweight :auto="true" :width="100"></s-flyweight>
|
|
63
|
+
```
|
|
64
|
+
|
|
12
65
|
### `0.0.6`
|
|
13
66
|
|
|
14
67
|
- #### 优化 `flys` 初始化赋值,不改变时,获取 length 问题
|
package/dist/Flyweight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@soei/util"),o=require("vue");const z=(e,t)=>{const l=e.__vccOpts||e;for(const[n,i]of t)l[n]=i;return l};let x=e=>e==null||e==null,T=/(\d+|[+\-\*/]|%)/g,_={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,l)=>parseFloat(e)/100*l},v=(e,t)=>{let l;if(l=c.runer("match",e,T)){let n=l.length,i,s=0,h,r=[];for(;n--;)s=l.shift(),s in _?(i&&r.push(i),s==="%"&&(r.length=2),h=s):+s&&r.push(+s),r.length==2&&(r.push(t),i=_[h].apply(null,r),r.length=0);+i||(i=+r.pop()),e=i>>0}return e},H=(...e)=>{console.info("::::FLYWEIGHT",...e)};const N={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:Number,default:0},height:{type:Number,default:100},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>null},index:{type:Number,default:0},top:{type:Number,default:!1},left:{type:Number,default:!1},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null}},computed:{flyweight(){return this.$refs.flyweight}},data(){return{flyweights:[],actice:!1,Height:null,column:1,row:1,fwheight:10,count:0,task:[],realW:0,realH:0}},watch:{flys(e){this.count=e.length,this.re();let t=this.task.shift();t&&this.$nextTick(()=>{this.setview(t)})},view:{handler(e){this.setview(e)},immediate:!0},index(e){this.setindex(e)},top(e){this.flyweight.scrollTop=e},left(e){this.flyweight.scrollLeft=e}},mounted(){this.flyweights=[],this.$set||(this.$set=(e,t,l)=>{e[t]=l}),this.setindex(this.index);try{new ResizeObserver(()=>{this.re(),this.$emit("resize")}).observe(this.flyweight)}catch(e){H(e)}},methods:{trigger(e,t){this.lazyrun(()=>this.$emit(e,x(t)?!0:t))},cheackflys(e){if(!this.flys.length)return e&&this.task.push(e),!0},setview(e){c.runer([this.cheackflys,t=>{t=t||{};let l=t.index||c.each(this.flys,(n,i,s,h)=>{if(i[s]==h)return n},t.picker,t.id);x(l)||this.setindex(l)}],this,e)},setindex(e){c.runer([this.cheackflys,({index:t})=>{this.$nextTick(()=>{let l=t/this.column>>0,n=this.fwheight;(this.flyweight.scrollTop/n>>0)+this.row-l-1>0||(this.flyweight.scrollTop=l*n,this.scroll())})}],this,{index:e})},lazyrun(e,t){clearTimeout(this.time),this.time=setTimeout(()=>{c.runer(e)},t||this.lazy)},run(e){let t=c.picker(e.target,"scrollTop=>top");c.each(this.flyweights,(l,n,i,s,h,r,a,f)=>{if(i=l/h>>0,a=i+s*(+(i<r%s)+(r/s>>0)),f=a*h+l%h,f>=this.count){this.trigger("onend");return}n.index=a,n.top=a*this.fwheight,n.data=this.flys[f]},null,this.row,this.column,t.top/this.fwheight>>0)},scroll(e){this.run(e||{target:this.flyweight})},re(){let e=this.count||this.flys.length,t=this.flyweights;if(!e)return t.length=e;this.count=e;let l=this.flyweight,n=c.picker(l,"clientHeight=>height,clientWidth=>width");this.$nextTick(()=>{let i=this.auto===!0,[s,h]=this.offset,r=n.width,a=n.height,f=(v(this.width,r)||r)+s,g=v(this.height,a)+h;this.realW=f-s,this.realH=g-h;let u=r/f>>0||1,d=a/g>>0;this.row=d+2,this.column=u,this.fwheight=g;let m=r%f/(u-1*+!i)>>0;i&&(f=this.realW=(r/u>>0)-s,m=s),this.Height=Math.ceil(e/u)*g;let w=Math.min(e,u*this.row),p=w-1,y,k;for(;w-- >0;)y=p-w,k=this.flys[y],l=t[y],d=y/u>>0,this.$set(t,y,{data:k,top:d*g,left:y%u*(f+m),index:d});t.length=p+1,a/g>p&&this.trigger("onend"),this.scroll(),this.trigger("update:space",{row:(p/u>>0)+1,column:u})})}}},S=["data"];function B(e,t,l,n,i,s){return o.openBlock(),o.createElementBlock("div",{ref:"flyweight",class:o.normalizeClass(["flyweight",{"flyweight-active":i.actice}]),style:o.normalizeStyle({"--width":i.realW+"px","--height":i.realH+"px"}),onScroll:t[0]||(t[0]=(...h)=>s.scroll&&s.scroll(...h))},[o.createElementVNode("div",{class:"flyweight-all",style:o.normalizeStyle({"--flyweight-height":i.Height+"px"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.flyweights,(h,r)=>(o.openBlock(),o.createElementBlock("div",{key:r,data:h.top,style:o.normalizeStyle({top:h.top+"px",left:h.left+"px"})},[o.renderSlot(e.$slots,"default",{data:h.data,index:h.index},void 0,!0)],12,S))),128))],4),i.flyweights.length?o.renderSlot(e.$slots,"end",{key:0},void 0,!0):o.createCommentVNode("",!0)],38)}const b=z(N,[["render",B],["__scopeId","data-v-84a26ea4"]]),F=[b],O={install(e){F.forEach(t=>{e.component("s-"+t.name.toLowerCase(),t)})}};exports.Flyweight=b;exports.default=O;
|
package/dist/Flyweight.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { runer as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
import { runer as p, each as v, picker as b } from "@soei/util";
|
|
2
|
+
import { openBlock as w, createElementBlock as m, normalizeClass as $, normalizeStyle as x, createElementVNode as F, Fragment as O, renderList as L, renderSlot as z, createCommentVNode as W } from "vue";
|
|
3
|
+
const E = (t, e) => {
|
|
4
|
+
const l = t.__vccOpts || t;
|
|
5
5
|
for (const [n, i] of e)
|
|
6
|
-
|
|
7
|
-
return
|
|
6
|
+
l[n] = i;
|
|
7
|
+
return l;
|
|
8
8
|
};
|
|
9
|
-
let
|
|
9
|
+
let T = (t) => t == null || t == null, S = /(\d+|[+\-\*/]|%)/g, H = {
|
|
10
10
|
"+": (t, e) => t + e,
|
|
11
11
|
"-": (t, e) => t - e,
|
|
12
12
|
"*": (t, e) => t * e,
|
|
13
13
|
"/": (t, e) => t / e,
|
|
14
|
-
"%": (t, e,
|
|
15
|
-
},
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
18
|
-
let n =
|
|
14
|
+
"%": (t, e, l) => parseFloat(t) / 100 * l
|
|
15
|
+
}, N = (t, e) => {
|
|
16
|
+
let l;
|
|
17
|
+
if (l = p("match", t, S)) {
|
|
18
|
+
let n = l.length, i, s = 0, h, r = [];
|
|
19
19
|
for (; n--; )
|
|
20
|
-
|
|
20
|
+
s = l.shift(), s in H ? (i && r.push(i), s === "%" && (r.length = 2), h = s) : +s && r.push(+s), r.length == 2 && (r.push(e), i = H[h].apply(null, r), r.length = 0);
|
|
21
21
|
+i || (i = +r.pop()), t = i >> 0;
|
|
22
22
|
}
|
|
23
23
|
return t;
|
|
24
|
-
},
|
|
24
|
+
}, B = (...t) => {
|
|
25
25
|
console.info("::::FLYWEIGHT", ...t);
|
|
26
26
|
};
|
|
27
|
-
const
|
|
27
|
+
const C = {
|
|
28
28
|
name: "Flyweight",
|
|
29
29
|
props: {
|
|
30
30
|
flys: {
|
|
@@ -62,6 +62,14 @@ const I = {
|
|
|
62
62
|
left: {
|
|
63
63
|
type: Number,
|
|
64
64
|
default: !1
|
|
65
|
+
},
|
|
66
|
+
auto: {
|
|
67
|
+
type: [Boolean, String],
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
space: {
|
|
71
|
+
type: Object,
|
|
72
|
+
default: () => null
|
|
65
73
|
}
|
|
66
74
|
},
|
|
67
75
|
computed: {
|
|
@@ -108,59 +116,59 @@ const I = {
|
|
|
108
116
|
}
|
|
109
117
|
},
|
|
110
118
|
mounted() {
|
|
111
|
-
this.flyweights = [], this.$set || (this.$set = (t, e,
|
|
112
|
-
t[e] =
|
|
119
|
+
this.flyweights = [], this.$set || (this.$set = (t, e, l) => {
|
|
120
|
+
t[e] = l;
|
|
113
121
|
}), this.setindex(this.index);
|
|
114
122
|
try {
|
|
115
123
|
new ResizeObserver(() => {
|
|
116
124
|
this.re(), this.$emit("resize");
|
|
117
125
|
}).observe(this.flyweight);
|
|
118
126
|
} catch (t) {
|
|
119
|
-
|
|
127
|
+
B(t);
|
|
120
128
|
}
|
|
121
129
|
},
|
|
122
130
|
methods: {
|
|
123
|
-
trigger(t) {
|
|
124
|
-
this.lazyrun(() => this.$emit(t, !0));
|
|
131
|
+
trigger(t, e) {
|
|
132
|
+
this.lazyrun(() => this.$emit(t, T(e) ? !0 : e));
|
|
125
133
|
},
|
|
126
134
|
cheackflys(t) {
|
|
127
135
|
if (!this.flys.length)
|
|
128
136
|
return t && this.task.push(t), !0;
|
|
129
137
|
},
|
|
130
138
|
setview(t) {
|
|
131
|
-
|
|
139
|
+
p([this.cheackflys, (e) => {
|
|
132
140
|
e = e || {};
|
|
133
|
-
let
|
|
134
|
-
if (i[
|
|
141
|
+
let l = e.index || v(this.flys, (n, i, s, h) => {
|
|
142
|
+
if (i[s] == h)
|
|
135
143
|
return n;
|
|
136
144
|
}, e.picker, e.id);
|
|
137
|
-
|
|
145
|
+
T(l) || this.setindex(l);
|
|
138
146
|
}], this, t);
|
|
139
147
|
},
|
|
140
148
|
setindex(t) {
|
|
141
|
-
|
|
149
|
+
p([this.cheackflys, ({ index: e }) => {
|
|
142
150
|
this.$nextTick(() => {
|
|
143
|
-
let
|
|
144
|
-
(this.flyweight.scrollTop / n >> 0) + this.row -
|
|
151
|
+
let l = e / this.column >> 0, n = this.fwheight;
|
|
152
|
+
(this.flyweight.scrollTop / n >> 0) + this.row - l - 1 > 0 || (this.flyweight.scrollTop = l * n, this.scroll());
|
|
145
153
|
});
|
|
146
154
|
}], this, { index: t });
|
|
147
155
|
},
|
|
148
156
|
lazyrun(t, e) {
|
|
149
157
|
clearTimeout(this.time), this.time = setTimeout(() => {
|
|
150
|
-
|
|
158
|
+
p(t);
|
|
151
159
|
}, e || this.lazy);
|
|
152
160
|
},
|
|
153
161
|
run(t) {
|
|
154
|
-
let e =
|
|
155
|
-
|
|
162
|
+
let e = b(t.target, "scrollTop=>top");
|
|
163
|
+
v(
|
|
156
164
|
this.flyweights,
|
|
157
|
-
(
|
|
158
|
-
if (i =
|
|
159
|
-
(+(i < r %
|
|
165
|
+
(l, n, i, s, h, r, a, o) => {
|
|
166
|
+
if (i = l / h >> 0, a = i + s * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
|
|
167
|
+
(+(i < r % s) + (r / s >> 0)), o = a * h + l % h, o >= this.count) {
|
|
160
168
|
this.trigger("onend");
|
|
161
169
|
return;
|
|
162
170
|
}
|
|
163
|
-
n.index =
|
|
171
|
+
n.index = a, n.top = a * this.fwheight, n.data = this.flys[o];
|
|
164
172
|
},
|
|
165
173
|
null,
|
|
166
174
|
this.row,
|
|
@@ -177,63 +185,63 @@ const I = {
|
|
|
177
185
|
if (!t)
|
|
178
186
|
return e.length = t;
|
|
179
187
|
this.count = t;
|
|
180
|
-
let
|
|
188
|
+
let l = this.flyweight, n = b(l, "clientHeight=>height,clientWidth=>width");
|
|
181
189
|
this.$nextTick(() => {
|
|
182
|
-
let
|
|
183
|
-
this.realW =
|
|
184
|
-
let
|
|
185
|
-
this.row =
|
|
186
|
-
let
|
|
187
|
-
this.Height = Math.ceil(t /
|
|
188
|
-
let
|
|
189
|
-
for (;
|
|
190
|
-
|
|
191
|
-
data:
|
|
192
|
-
top:
|
|
193
|
-
left:
|
|
194
|
-
index:
|
|
190
|
+
let i = this.auto === !0, [s, h] = this.offset, r = n.width, a = n.height, o = (N(this.width, r) || r) + s, u = N(this.height, a) + h;
|
|
191
|
+
this.realW = o - s, this.realH = u - h;
|
|
192
|
+
let f = r / o >> 0 || 1, g = a / u >> 0;
|
|
193
|
+
this.row = g + 2, this.column = f, this.fwheight = u;
|
|
194
|
+
let _ = r % o / (f - 1 * +!i) >> 0;
|
|
195
|
+
i && (o = this.realW = (r / f >> 0) - s, _ = s), this.Height = Math.ceil(t / f) * u;
|
|
196
|
+
let d = Math.min(t, f * this.row), y = d - 1, c, k;
|
|
197
|
+
for (; d-- > 0; )
|
|
198
|
+
c = y - d, k = this.flys[c], l = e[c], g = c / f >> 0, this.$set(e, c, {
|
|
199
|
+
data: k,
|
|
200
|
+
top: g * u,
|
|
201
|
+
left: c % f * (o + _),
|
|
202
|
+
index: g
|
|
195
203
|
});
|
|
196
|
-
e.length =
|
|
204
|
+
e.length = y + 1, a / u > y && this.trigger("onend"), this.scroll(), this.trigger("update:space", { row: (y / f >> 0) + 1, column: f });
|
|
197
205
|
});
|
|
198
206
|
}
|
|
199
207
|
}
|
|
200
|
-
},
|
|
201
|
-
function
|
|
202
|
-
return
|
|
208
|
+
}, I = ["data"];
|
|
209
|
+
function j(t, e, l, n, i, s) {
|
|
210
|
+
return w(), m("div", {
|
|
203
211
|
ref: "flyweight",
|
|
204
|
-
class:
|
|
212
|
+
class: $(["flyweight", {
|
|
205
213
|
"flyweight-active": i.actice
|
|
206
214
|
}]),
|
|
207
|
-
style:
|
|
215
|
+
style: x({
|
|
208
216
|
"--width": i.realW + "px",
|
|
209
217
|
"--height": i.realH + "px"
|
|
210
218
|
}),
|
|
211
|
-
onScroll: e[0] || (e[0] = (...
|
|
219
|
+
onScroll: e[0] || (e[0] = (...h) => s.scroll && s.scroll(...h))
|
|
212
220
|
}, [
|
|
213
|
-
|
|
221
|
+
F("div", {
|
|
214
222
|
class: "flyweight-all",
|
|
215
|
-
style:
|
|
223
|
+
style: x({
|
|
216
224
|
"--flyweight-height": i.Height + "px"
|
|
217
225
|
})
|
|
218
226
|
}, [
|
|
219
|
-
(
|
|
227
|
+
(w(!0), m(O, null, L(i.flyweights, (h, r) => (w(), m("div", {
|
|
220
228
|
key: r,
|
|
221
|
-
data:
|
|
222
|
-
style:
|
|
223
|
-
top:
|
|
224
|
-
left:
|
|
229
|
+
data: h.top,
|
|
230
|
+
style: x({
|
|
231
|
+
top: h.top + "px",
|
|
232
|
+
left: h.left + "px"
|
|
225
233
|
})
|
|
226
234
|
}, [
|
|
227
|
-
|
|
228
|
-
data:
|
|
229
|
-
index:
|
|
235
|
+
z(t.$slots, "default", {
|
|
236
|
+
data: h.data,
|
|
237
|
+
index: h.index
|
|
230
238
|
}, void 0, !0)
|
|
231
|
-
], 12,
|
|
239
|
+
], 12, I))), 128))
|
|
232
240
|
], 4),
|
|
233
|
-
i.flyweights.length ?
|
|
241
|
+
i.flyweights.length ? z(t.$slots, "end", { key: 0 }, void 0, !0) : W("", !0)
|
|
234
242
|
], 38);
|
|
235
243
|
}
|
|
236
|
-
const
|
|
244
|
+
const A = /* @__PURE__ */ E(C, [["render", j], ["__scopeId", "data-v-84a26ea4"]]), M = [A], U = {
|
|
237
245
|
install(t) {
|
|
238
246
|
M.forEach((e) => {
|
|
239
247
|
t.component("s-" + e.name.toLowerCase(), e);
|
|
@@ -241,6 +249,6 @@ const B = /* @__PURE__ */ O(I, [["render", A], ["__scopeId", "data-v-3957d7cd"]]
|
|
|
241
249
|
}
|
|
242
250
|
};
|
|
243
251
|
export {
|
|
244
|
-
|
|
245
|
-
|
|
252
|
+
A as Flyweight,
|
|
253
|
+
U as default
|
|
246
254
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flyweight[data-v-
|
|
1
|
+
.flyweight[data-v-84a26ea4]{height:100%;width:100%;overflow:auto;position:relative}.flyweight .flyweight-all[data-v-84a26ea4]{height:var(--flyweight-height)}.flyweight .flyweight-all[data-v-84a26ea4]>*{width:calc(var(--width));height:var(--height);position:absolute}
|
package/package.json
CHANGED
package/src/Flyweight.vue
CHANGED
|
@@ -100,6 +100,14 @@ export default {
|
|
|
100
100
|
left: {
|
|
101
101
|
type: Number,
|
|
102
102
|
default: false
|
|
103
|
+
},
|
|
104
|
+
auto: {
|
|
105
|
+
type: [Boolean, String],
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
108
|
+
space: {
|
|
109
|
+
type: Object,
|
|
110
|
+
default: () => (null)
|
|
103
111
|
}
|
|
104
112
|
},
|
|
105
113
|
computed: {
|
|
@@ -167,8 +175,8 @@ export default {
|
|
|
167
175
|
}
|
|
168
176
|
},
|
|
169
177
|
methods: {
|
|
170
|
-
trigger(key) {
|
|
171
|
-
this.lazyrun(() => this.$emit(key, true));
|
|
178
|
+
trigger(key, data) {
|
|
179
|
+
this.lazyrun(() => this.$emit(key, isNil(data) ? true : data));
|
|
172
180
|
},
|
|
173
181
|
cheackflys(data) {
|
|
174
182
|
let length = this.flys.length;
|
|
@@ -245,6 +253,7 @@ export default {
|
|
|
245
253
|
let flyweight = this.flyweight;
|
|
246
254
|
let wh = picker(flyweight, 'clientHeight=>height,clientWidth=>width');
|
|
247
255
|
this.$nextTick(() => {
|
|
256
|
+
let auto = this.auto === true;
|
|
248
257
|
let [x, y] = this.offset, W = wh.width, H = wh.height;
|
|
249
258
|
let width = (computer(this.width, W) || W) + x;
|
|
250
259
|
let height = computer(this.height, H) + y/* 偏移量填充宽度 */;
|
|
@@ -257,7 +266,11 @@ export default {
|
|
|
257
266
|
this.fwheight = height;
|
|
258
267
|
let offset = W % width;
|
|
259
268
|
/* 偏移量 */
|
|
260
|
-
let margin = offset / (column - 1) >> 0;
|
|
269
|
+
let margin = offset / (column - 1 * +!auto) >> 0;
|
|
270
|
+
if (auto) {
|
|
271
|
+
width = this.realW = (W / column >> 0) - x;
|
|
272
|
+
margin = x;
|
|
273
|
+
}
|
|
261
274
|
/* 总高度 */
|
|
262
275
|
this.Height = Math.ceil(size / column) * height;
|
|
263
276
|
/* 计算数量 */
|
|
@@ -279,7 +292,9 @@ export default {
|
|
|
279
292
|
}
|
|
280
293
|
fws.length = length + 1;
|
|
281
294
|
if (H / height > length) this.trigger('onend');
|
|
282
|
-
this.scroll()
|
|
295
|
+
this.scroll();
|
|
296
|
+
/* 计算占用空间 */
|
|
297
|
+
this.trigger('update:space', { row: (length / column >> 0) + 1, column: column });
|
|
283
298
|
});
|
|
284
299
|
}
|
|
285
300
|
}
|