@soei/flyweight 0.4.0 → 0.4.1

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/vue2/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { runer as b, merge as H, isArray as it, each as R, picker as M, isEmpty as st, isSimplyType as D, isString as ut } from "@soei/util";
2
- import { runer as _, isNil as ft, each as G } from "@soei/tools";
3
- import dt from "@soei/picker";
4
- let pt = /(\d+|[+\-\*/]|%)/g, q = {
1
+ import { runer as w, each as O, isEmpty as it, picker as k, isSimplyType as D, merge as R, isString as dt, isArray as st } from "@soei/util";
2
+ import { runer as _, isNil as pt, each as G } from "@soei/tools";
3
+ import _t from "@soei/picker";
4
+ let gt = /(\d+|[+\-\*/]|%)/g, q = {
5
5
  "+": (t, e) => t + e,
6
6
  "-": (t, e) => t - e,
7
7
  "*": (t, e) => t * e,
@@ -9,29 +9,29 @@ let pt = /(\d+|[+\-\*/]|%)/g, q = {
9
9
  "%": (t, e, i) => parseFloat(t) / 100 * i
10
10
  }, V = (t, e) => {
11
11
  let i;
12
- if (i = b("match", t, pt)) {
13
- let s = i.length, l, a = 0, n, h = [];
12
+ if (i = w("match", t, gt)) {
13
+ let s = i.length, l, h = 0, n, a = [];
14
14
  for (; s--; )
15
- a = i.shift(), a in q ? (l && h.push(l), a === "%" && (h.length = 2), n = a) : +a && h.push(+a), h.length == 2 && (h.push(e), l = q[n].apply(null, h), h.length = 0);
16
- +l || (l = +h.pop()), t = l >> 0;
15
+ h = i.shift(), h in q ? (l && a.push(l), h === "%" && (a.length = 2), n = h) : +h && a.push(+h), a.length == 2 && (a.push(e), l = q[n].apply(null, a), a.length = 0);
16
+ +l || (l = +a.pop()), t = l >> 0;
17
17
  }
18
18
  return t;
19
- }, Y = {}, v = (t, e) => (t + "").replace(
19
+ }, Y = {}, b = (t, e) => (t + "").replace(
20
20
  /\w+\((.*)\)/g,
21
21
  "$1"
22
22
  ).replace(
23
23
  Y[e] || (Y[e] = new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)", "g")),
24
24
  "$1px"
25
25
  );
26
- function L(t, e, i, s, l, a, n, h) {
26
+ function j(t, e, i, s, l, h, n, a) {
27
27
  var r = typeof t == "function" ? t.options : t;
28
- e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), s && (r.functional = !0), a && (r._scopeId = "data-v-" + a);
28
+ e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), s && (r.functional = !0), h && (r._scopeId = "data-v-" + h);
29
29
  var o;
30
- if (n ? (o = function(c) {
31
- c = c || // cached call
30
+ if (n ? (o = function(u) {
31
+ u = u || // cached call
32
32
  this.$vnode && this.$vnode.ssrContext || // stateful
33
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !c && typeof __VUE_SSR_CONTEXT__ < "u" && (c = __VUE_SSR_CONTEXT__), l && l.call(this, c), c && c._registeredComponents && c._registeredComponents.add(n);
34
- }, r._ssrRegister = o) : l && (o = h ? function() {
33
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !u && typeof __VUE_SSR_CONTEXT__ < "u" && (u = __VUE_SSR_CONTEXT__), l && l.call(this, u), u && u._registeredComponents && u._registeredComponents.add(n);
34
+ }, r._ssrRegister = o) : l && (o = a ? function() {
35
35
  l.call(
36
36
  this,
37
37
  (r.functional ? this.parent : this).$root.$options.shadowRoot
@@ -40,8 +40,8 @@ function L(t, e, i, s, l, a, n, h) {
40
40
  if (r.functional) {
41
41
  r._injectStyles = o;
42
42
  var f = r.render;
43
- r.render = function(u, p) {
44
- return o.call(p), f(u, p);
43
+ r.render = function(c, p) {
44
+ return o.call(p), f(c, p);
45
45
  };
46
46
  } else {
47
47
  var d = r.beforeCreate;
@@ -52,10 +52,177 @@ function L(t, e, i, s, l, a, n, h) {
52
52
  options: r
53
53
  };
54
54
  }
55
- let J = (t) => t == null || t == null, _t = (...t) => {
55
+ function A(t, e) {
56
+ return e && (t = t.replace(/[a-z]/g, "")), t.toLowerCase();
57
+ }
58
+ let rt = {
59
+ close: {
60
+ handler(t) {
61
+ this.change(t);
62
+ },
63
+ deep: !0
64
+ },
65
+ offset: {
66
+ handler(t) {
67
+ this.margin(t);
68
+ },
69
+ deep: !0
70
+ }
71
+ }, mt = [
72
+ "BackGround",
73
+ "BordeR",
74
+ "Height",
75
+ "Width",
76
+ "Top",
77
+ "Right",
78
+ "Bottom",
79
+ "Left"
80
+ ], nt = {};
81
+ O(
82
+ mt,
83
+ (t, e, i) => {
84
+ t = A(e), nt["--" + A(e, !0)] = t, i[t] = function() {
85
+ this.trigger++;
86
+ };
87
+ },
88
+ rt
89
+ );
90
+ const yt = {
91
+ name: "Card",
92
+ // inheritAttrs: false,
93
+ props: {
94
+ offset: {
95
+ type: [String, Array],
96
+ default: () => [0, 0, 0, 0]
97
+ },
98
+ background: {
99
+ type: String,
100
+ default: ""
101
+ },
102
+ border: {
103
+ type: String,
104
+ default: "1px"
105
+ },
106
+ height: {
107
+ type: String,
108
+ default: "100%"
109
+ },
110
+ width: {
111
+ type: String,
112
+ default: "100%"
113
+ },
114
+ show: {
115
+ type: String,
116
+ default: ""
117
+ },
118
+ close: {
119
+ type: Object,
120
+ default: null
121
+ },
122
+ title: {
123
+ type: String,
124
+ default: ""
125
+ }
126
+ },
127
+ data() {
128
+ return {
129
+ closecss: {},
130
+ // style: {},
131
+ trigger: 0,
132
+ default: {
133
+ top: "0px",
134
+ right: "0px",
135
+ bottom: "0px",
136
+ left: "0px",
137
+ height: "100%",
138
+ width: "100%",
139
+ background: "",
140
+ border: "1px"
141
+ }
142
+ };
143
+ },
144
+ computed: {
145
+ style() {
146
+ return this.tr();
147
+ },
148
+ sub() {
149
+ return this.show || this.title;
150
+ },
151
+ tips() {
152
+ return w("tips", this.close || {}) || "关闭[" + this.sub + "]";
153
+ }
154
+ },
155
+ watch: rt,
156
+ methods: {
157
+ exec: b,
158
+ isEmpty: it,
159
+ picker: k,
160
+ runer: w,
161
+ isSimplyType: D,
162
+ tr() {
163
+ let t = {};
164
+ return this.margin(this.offset), O(nt, (e, i) => {
165
+ this.css(t, e, i);
166
+ }), t;
167
+ },
168
+ tolower: A,
169
+ css(t, e, i) {
170
+ let s = this[i] || this.default[i];
171
+ !s || this.default[i] == s || (t[e] = b(s));
172
+ },
173
+ change(t) {
174
+ D(t) || (this.closecss = k(
175
+ t,
176
+ "color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"
177
+ ));
178
+ },
179
+ margin(t) {
180
+ R(
181
+ this,
182
+ k(
183
+ dt(t) ? t.split(/\s*(?:,|\s+)\s*/) : t,
184
+ "0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",
185
+ !0
186
+ ),
187
+ !0
188
+ );
189
+ }
190
+ },
191
+ mounted() {
192
+ this.change(this.close);
193
+ }
194
+ };
195
+ var vt = function() {
196
+ var e = this, i = e._self._c;
197
+ return i("div", { key: e.trigger, staticClass: "card", style: e.isEmpty(e.style) ? e.tr() : e.style }, [e._t("default", function() {
198
+ return [e._t("title", function() {
199
+ return [i("div", { staticClass: "card-title", attrs: { space: "" } }, [e._v(" " + e._s(e.sub) + " "), e._t("icons", function() {
200
+ return [i("div", { staticClass: "card-ico-items", attrs: { flex: "", vcenter: "" } }, [e._t("icon", null, null, { el: e.$el, picker: e.picker, runer: e.runer }), i("div", { staticClass: "card-close", class: { hide: e.isSimplyType(e.close) ? !e.close : !1 }, style: e.closecss, attrs: { title: e.tips }, on: { click: function(s) {
201
+ return e.$emit("close");
202
+ } } })], 2)];
203
+ })], 2)];
204
+ }), e._t("content", function() {
205
+ return [i("div", { staticClass: "card-content" }, [e._t("inner")], 2)];
206
+ })];
207
+ })], 2);
208
+ }, bt = [], wt = /* @__PURE__ */ j(
209
+ yt,
210
+ vt,
211
+ bt,
212
+ !1,
213
+ null,
214
+ "b1e09a6c",
215
+ null,
216
+ null
217
+ );
218
+ const xt = wt.exports, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
219
+ __proto__: null,
220
+ default: xt
221
+ }, Symbol.toStringTag, { value: "Module" }));
222
+ let J = (t) => t == null || t == null, $t = (...t) => {
56
223
  console.info("::::FLYWEIGHT", ...t);
57
224
  };
58
- const gt = {
225
+ const Tt = {
59
226
  name: "Flyweight",
60
227
  props: {
61
228
  flys: {
@@ -119,14 +286,14 @@ const gt = {
119
286
  },
120
287
  style() {
121
288
  var t = this.w, e = this.h, i = this.Size, s = {};
122
- return H(s, {
123
- "--width": v(this.realW),
124
- "--height": v(this.realH),
125
- "--flyweight-content": v(i)
289
+ return R(s, {
290
+ "--width": b(this.realW),
291
+ "--height": b(this.realH),
292
+ "--flyweight-content": b(i)
126
293
  }, e && {
127
- "--flyweight-h": v(e)
294
+ "--flyweight-h": b(e)
128
295
  }, t && s, {
129
- "--flyweight-w": v(t)
296
+ "--flyweight-w": b(t)
130
297
  }, "mix"), s;
131
298
  }
132
299
  },
@@ -178,16 +345,16 @@ const gt = {
178
345
  this.rebuild(), this.$emit("resize");
179
346
  }).observe(this.flyweight);
180
347
  } catch (t) {
181
- _t(t);
348
+ $t(t);
182
349
  }
183
- this.scrollx = b("hasAttribute", this.flyweight, "scroll-x"), this.BoxRule = /* this.scrollx ? 'clientHeight=>width,clientWidth=>height' : */
350
+ this.scrollx = w("hasAttribute", this.flyweight, "scroll-x"), this.BoxRule = /* this.scrollx ? 'clientHeight=>width,clientWidth=>height' : */
184
351
  "clientHeight=>height,clientWidth=>width", this.direction = this.scrollx ? "scrollLeft" : "scrollTop";
185
352
  },
186
353
  methods: {
187
- exec: v,
354
+ exec: b,
188
355
  trigger(t, e) {
189
- it(t) || (t = t && e ? [[t, e]] : []), t.length && this.lazyrun(() => {
190
- R(t, (i, s) => {
356
+ st(t) || (t = t && e ? [[t, e]] : []), t.length && this.lazyrun(() => {
357
+ O(t, (i, s) => {
191
358
  this.$emit(s[0], J(s[1]) ? !0 : s[1]);
192
359
  });
193
360
  });
@@ -197,17 +364,17 @@ const gt = {
197
364
  return t && this.task.push(t), !0;
198
365
  },
199
366
  setview(t) {
200
- b([this.cheackflys, (e) => {
367
+ w([this.cheackflys, (e) => {
201
368
  e = e || {};
202
- let i = e.index || R(this.flys, (s, l, a, n) => {
203
- if (l[a] == n)
369
+ let i = e.index || O(this.flys, (s, l, h, n) => {
370
+ if (l[h] == n)
204
371
  return s;
205
372
  }, e.picker, e.id);
206
373
  J(i) || this.setindex(i);
207
374
  }], this, t);
208
375
  },
209
376
  setindex(t) {
210
- b([this.cheackflys, ({ index: e }) => {
377
+ w([this.cheackflys, ({ index: e }) => {
211
378
  this.selectIndex = e, this.$nextTick(() => {
212
379
  let i = e / this.column >> 0, s = this.expand;
213
380
  (this.flyweight[this.direction] / s >> 0) + this.row - i - 1 > 0 || (this.flyweight[this.direction] = i * s, this.scroll());
@@ -216,11 +383,11 @@ const gt = {
216
383
  },
217
384
  lazyrun(t, e) {
218
385
  clearTimeout(this.time), this.time = setTimeout(() => {
219
- b(t);
386
+ w(t);
220
387
  }, e || this.lazy);
221
388
  },
222
389
  run(t) {
223
- let e = [], i = b(this.direction, t.target), s = {
390
+ let e = [], i = w(this.direction, t.target), s = {
224
391
  // ...this
225
392
  offset: i,
226
393
  top: i,
@@ -229,20 +396,20 @@ const gt = {
229
396
  /* 显示区域第一行的索引 */
230
397
  index: i / this.expand >> 0
231
398
  };
232
- H(s, this.space), t.from || e.push(["onscroll", s]);
399
+ R(s, this.space), t.from || e.push(["onscroll", s]);
233
400
  let l = !1;
234
- R(
401
+ O(
235
402
  this.flyweights,
236
- (a, n, h, r, o, f, d, c, u) => {
237
- if (h = a / o >> 0, c = h + r * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
238
- (+(h < f % r) + (f / r >> 0)), u = c * o + a % o, u >= this.count) {
403
+ (h, n, a, r, o, f, d, u, c) => {
404
+ if (a = h / o >> 0, u = a + r * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
405
+ (+(a < f % r) + (f / r >> 0)), c = u * o + h % o, c >= this.count) {
239
406
  l || (e.push(["onend"]), l = !0);
240
407
  return;
241
408
  }
242
- n.index = c, n.i = u, n.data = this.flys[u];
409
+ n.index = u, n.i = c, n.data = this.flys[c];
243
410
  let p = [
244
411
  /* top */
245
- c * this.expand + n.x,
412
+ u * this.expand + n.x,
246
413
  /* left */
247
414
  n.space
248
415
  ];
@@ -264,40 +431,40 @@ const gt = {
264
431
  if (!t)
265
432
  return e.length = t;
266
433
  this.count = t;
267
- let i = this.scrollx, s = this.flyweight, l = M(s, this.BoxRule);
434
+ let i = this.scrollx, s = this.flyweight, l = k(s, this.BoxRule);
268
435
  this.$nextTick(() => {
269
- let a = /true/.test(this.auto), [n, h] = this.offset, r = l.width, o = l.height, f = (V(this.width, r) || r) + n, d = V(this.height, o) + h, c = [r / f >> 0 || 1, o / d >> 0 || 1];
270
- i && c.reverse();
271
- let [u, p] = c, x = this.padding, z, S = 0, g, y;
436
+ let h = /true/.test(this.auto), [n, a] = this.offset, r = l.width, o = l.height, f = (V(this.width, r) || r) + n, d = V(this.height, o) + a, u = [r / f >> 0 || 1, o / d >> 0 || 1];
437
+ i && u.reverse();
438
+ let [c, p] = u, x = this.padding, C, S = 0, g, y;
272
439
  i ? (g = f, f -= n, y = ($) => (
273
440
  /* 计算top偏移量 */
274
- $ * (d - h) + ($ + 1) * h
275
- )) : (a ? (f = (r - n * (u + 2 * x - 1)) / u, z = !x * n, S = x * n) : (z = 0, S = (r % f + n * u) / (u + 1) >> 0, f -= n), y = ($) => $ * (f + z) + ($ + 1) * S, g = d), this.row = p + 2, this.column = u, this.realH = d - h, this.realW = f, this.expand = g, this.Size = Math.ceil(t / u) * g;
276
- let w = Math.min(t, u * this.row), m = w - 1, N;
277
- for (; w-- > 0; )
278
- N = m - w, this.$set(e, N, {
441
+ $ * (d - a) + ($ + 1) * a
442
+ )) : (h ? (f = (r - n * (c + 2 * x - 1)) / c, C = !x * n, S = x * n) : (C = 0, S = (r % f + n * c) / (c + 1) >> 0, f -= n), y = ($) => $ * (f + C) + ($ + 1) * S, g = d), this.row = p + 2, this.column = c, this.realH = d - a, this.realW = f, this.expand = g, this.Size = Math.ceil(t / c) * g;
443
+ let v = Math.min(t, c * this.row), m = v - 1, T;
444
+ for (; v-- > 0; )
445
+ T = m - v, this.$set(e, T, {
279
446
  x: n,
280
- y: h,
447
+ y: a,
281
448
  width: f,
282
- height: d - h,
283
- space: y(N % u),
449
+ height: d - a,
450
+ space: y(T % c),
284
451
  data: {}
285
452
  });
286
453
  e.length = m + 1;
287
- let T = [];
288
- o / g > m / u && T.push(["onend"]), this.flyweight && (this.flyweight[this.direction] = 0), this.$nextTick(() => {
454
+ let z = [];
455
+ o / g > m / c && z.push(["onend"]), this.flyweight && (this.flyweight[this.direction] = 0), this.$nextTick(() => {
289
456
  this.setindex(this.selectIndex || 0), this.scroll();
290
- }), T.push(["update:space", {
291
- row: (m / u >> 0) + 1,
292
- column: u,
457
+ }), z.push(["update:space", {
458
+ row: (m / c >> 0) + 1,
459
+ column: c,
293
460
  showrow: this.row,
294
461
  showcolumn: this.column
295
- }]), this.trigger(T);
462
+ }]), this.trigger(z);
296
463
  });
297
464
  }
298
465
  }
299
466
  };
300
- var mt = function() {
467
+ var zt = function() {
301
468
  var e = this, i = e._self._c;
302
469
  return i("div", { ref: "flyweight", staticClass: "flyweight", class: {
303
470
  "flyweight-active": e.actice
@@ -307,181 +474,20 @@ var mt = function() {
307
474
  left: s.left + "px"
308
475
  } }, [e._t("default", null, null, s)], 2);
309
476
  }), 0), e.flyweights.length ? e._t("end") : e._e()], 2);
310
- }, yt = [], wt = /* @__PURE__ */ L(
311
- gt,
312
- mt,
313
- yt,
477
+ }, Ct = [], Nt = /* @__PURE__ */ j(
478
+ Tt,
479
+ zt,
480
+ Ct,
314
481
  !1,
315
482
  null,
316
483
  "d5f1cd63",
317
484
  null,
318
485
  null
319
486
  );
320
- const vt = wt.exports;
321
- function F(t, e) {
322
- return e && (t = t.replace(/[a-z]/g, "")), t.toLowerCase();
323
- }
324
- let rt = {
325
- close: {
326
- handler(t) {
327
- this.change(t);
328
- },
329
- deep: !0
330
- },
331
- offset: {
332
- handler(t) {
333
- this.margin(t);
334
- },
335
- deep: !0
336
- }
337
- }, bt = [
338
- "BackGround",
339
- "BordeR",
340
- "Height",
341
- "Width",
342
- "Top",
343
- "Right",
344
- "Bottom",
345
- "Left"
346
- ], nt = {};
347
- R(
348
- bt,
349
- (t, e, i) => {
350
- t = F(e), nt["--" + F(e, !0)] = t, i[t] = function() {
351
- this.trigger++;
352
- };
353
- },
354
- rt
355
- );
356
- const xt = {
357
- name: "Card",
358
- // inheritAttrs: false,
359
- props: {
360
- offset: {
361
- type: [String, Array],
362
- default: () => [0, 0, 0, 0]
363
- },
364
- background: {
365
- type: String,
366
- default: ""
367
- },
368
- border: {
369
- type: String,
370
- default: "1px"
371
- },
372
- height: {
373
- type: String,
374
- default: "100%"
375
- },
376
- width: {
377
- type: String,
378
- default: "100%"
379
- },
380
- show: {
381
- type: String,
382
- default: ""
383
- },
384
- close: {
385
- type: Object,
386
- default: null
387
- },
388
- title: {
389
- type: String,
390
- default: ""
391
- }
392
- },
393
- data() {
394
- return {
395
- closecss: {},
396
- // style: {},
397
- trigger: 0,
398
- default: {
399
- top: "0px",
400
- right: "0px",
401
- bottom: "0px",
402
- left: "0px",
403
- height: "100%",
404
- width: "100%",
405
- background: "",
406
- border: "1px"
407
- }
408
- };
409
- },
410
- computed: {
411
- style() {
412
- return this.tr();
413
- },
414
- sub() {
415
- return this.show || this.title;
416
- },
417
- tips() {
418
- return b("tips", this.close || {}) || "关闭[" + this.sub + "]";
419
- }
420
- },
421
- watch: rt,
422
- methods: {
423
- exec: v,
424
- isEmpty: st,
425
- picker: M,
426
- runer: b,
427
- isSimplyType: D,
428
- tr() {
429
- let t = {};
430
- return this.margin(this.offset), R(nt, (e, i) => {
431
- this.css(t, e, i);
432
- }), t;
433
- },
434
- tolower: F,
435
- css(t, e, i) {
436
- let s = this[i] || this.default[i];
437
- !s || this.default[i] == s || (t[e] = v(s));
438
- },
439
- change(t) {
440
- D(t) || (this.closecss = M(
441
- t,
442
- "color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"
443
- ));
444
- },
445
- margin(t) {
446
- H(
447
- this,
448
- M(
449
- ut(t) ? t.split(/\s*(?:,|\s+)\s*/) : t,
450
- "0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",
451
- !0
452
- ),
453
- !0
454
- );
455
- }
456
- },
457
- mounted() {
458
- this.change(this.close);
459
- }
460
- };
461
- var St = function() {
462
- var e = this, i = e._self._c;
463
- return i("div", { key: e.trigger, staticClass: "card", style: e.isEmpty(e.style) ? e.tr() : e.style }, [e._t("default", function() {
464
- return [e._t("title", function() {
465
- return [i("div", { staticClass: "card-title", attrs: { space: "" } }, [e._v(" " + e._s(e.sub) + " "), e._t("icons", function() {
466
- return [i("div", { staticClass: "card-ico-items", attrs: { flex: "", vcenter: "" } }, [e._t("icon", null, null, { el: e.$el, picker: e.picker, runer: e.runer }), i("div", { staticClass: "card-close", class: { hide: e.isSimplyType(e.close) ? !e.close : !1 }, style: e.closecss, attrs: { title: e.tips }, on: { click: function(s) {
467
- return e.$emit("close");
468
- } } })], 2)];
469
- })], 2)];
470
- }), e._t("content", function() {
471
- return [i("div", { staticClass: "card-content" }, [e._t("inner")], 2)];
472
- })];
473
- })], 2);
474
- }, $t = [], Nt = /* @__PURE__ */ L(
475
- xt,
476
- St,
477
- $t,
478
- !1,
479
- null,
480
- "b1e09a6c",
481
- null,
482
- null
483
- );
484
- const Tt = Nt.exports, zt = {
487
+ const Mt = Nt.exports, Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
+ __proto__: null,
489
+ default: Mt
490
+ }, Symbol.toStringTag, { value: "Module" })), kt = {
485
491
  name: "Stream",
486
492
  computed: {
487
493
  component() {
@@ -489,7 +495,7 @@ const Tt = Nt.exports, zt = {
489
495
  },
490
496
  column() {
491
497
  let { columns: t, T: e } = this, i = t || e;
492
- return st(i) ? [] : it(i) ? i : [i];
498
+ return it(i) ? [] : st(i) ? i : [i];
493
499
  }
494
500
  },
495
501
  props: {
@@ -512,7 +518,7 @@ const Tt = Nt.exports, zt = {
512
518
  }
513
519
  },
514
520
  mounted() {
515
- this.$.vnode.ref && H(this, { ...this.component });
521
+ this.$.vnode.ref && R(this, { ...this.component });
516
522
  },
517
523
  methods: {
518
524
  __trigger(t) {
@@ -521,30 +527,33 @@ const Tt = Nt.exports, zt = {
521
527
  }
522
528
  }
523
529
  };
524
- var Ct = function() {
530
+ var Rt = function() {
525
531
  var e = this, i = e._self._c;
526
532
  return i(e.type, e._b({ ref: "component", tag: "component" }, "component", e.$attrs, !1), [e._l(e.column, function(s) {
527
533
  return e._t(e.__trigger(s), null, null, s);
528
534
  })], 2);
529
- }, kt = [], Rt = /* @__PURE__ */ L(
530
- zt,
531
- Ct,
535
+ }, Ht = [], Et = /* @__PURE__ */ j(
532
536
  kt,
537
+ Rt,
538
+ Ht,
533
539
  !1,
534
540
  null,
535
541
  null,
536
542
  null,
537
543
  null
538
544
  );
539
- const Mt = Rt.exports, K = /(?:\,|\|{2})/, Q = "px", Z = "";
540
- let lt = document.documentElement, tt, et = ["s-left", "s-top", "s-right", "s-bottom"], Ht = { left: 0, top: 1, right: 2, bottom: 3 };
541
- const P = [];
542
- var Et = dt(
545
+ const jt = Et.exports, Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
546
+ __proto__: null,
547
+ default: jt
548
+ }, Symbol.toStringTag, { value: "Module" })), K = /(?:\,|\|{2})/, Q = "px", Z = "";
549
+ let lt = document.documentElement, tt, et = ["s-left", "s-top", "s-right", "s-bottom"], Wt = { left: 0, top: 1, right: 2, bottom: 3 };
550
+ const L = [];
551
+ var At = _t(
543
552
  window,
544
553
  "Reflect.defineProperty|Object.defineProperty=>Proxy"
545
554
  ).Proxy;
546
- let B = {}, ot = null;
547
- Et(B, "delay", {
555
+ let F = {}, ot = null;
556
+ At(F, "delay", {
548
557
  /**
549
558
  * 获取延迟时间值
550
559
  * @returns {number} 返回当前实例的延迟时间属性值
@@ -553,30 +562,30 @@ Et(B, "delay", {
553
562
  return this._delay;
554
563
  },
555
564
  set(t) {
556
- ot = Wt(() => {
557
- _(P);
565
+ ot = Lt(() => {
566
+ _(L);
558
567
  }, t), this._delay = t;
559
568
  }
560
569
  });
561
- B.delay = 60;
562
- function Wt(t, e) {
570
+ F.delay = 60;
571
+ function Lt(t, e) {
563
572
  let i = 0;
564
573
  return function() {
565
574
  const s = Date.now();
566
575
  s - i >= e && (i = s, _(t, this, arguments));
567
576
  };
568
577
  }
569
- const W = () => {
578
+ const E = () => {
570
579
  ot();
571
580
  };
572
- function Lt(t) {
573
- P.push(t);
581
+ function Ft(t) {
582
+ L.push(t);
574
583
  }
575
- const k = new ResizeObserver(W);
576
- k.observe(lt);
577
- function ht(t) {
578
- t.onresize || (P.push([ht, null, t]), t.onresize = !0);
579
- var e = lt, i = e.clientHeight, s = ft(t.offset) ? 15 : t.offset, l = t.target, a = t.room, n = t.index, h = t.position, r = l.getBoundingClientRect(), o = a.offsetHeight + s, f = a.offsetWidth + s, d = "3,0,2,1".split(K), c, u = (r.height == tt ? r.bottom - r.top : r.height) >> 0, p = (r.width == tt ? r.right - r.left : r.width) >> 0, x = e.clientWidth - f, z = i - o, S = [
584
+ const M = new ResizeObserver(E);
585
+ M.observe(lt);
586
+ function at(t) {
587
+ t.onresize || (L.push([at, null, t]), t.onresize = !0);
588
+ var e = lt, i = e.clientHeight, s = pt(t.offset) ? 15 : t.offset, l = t.target, h = t.room, n = t.index, a = t.position, r = l.getBoundingClientRect(), o = h.offsetHeight + s, f = h.offsetWidth + s, d = "3,0,2,1".split(K), u, c = (r.height == tt ? r.bottom - r.top : r.height) >> 0, p = (r.width == tt ? r.right - r.left : r.width) >> 0, x = e.clientWidth - f, C = i - o, S = [
580
589
  /* left: 0 */
581
590
  r.left - f,
582
591
  /* top: 1 */
@@ -584,46 +593,46 @@ function ht(t) {
584
593
  /* right: 2 */
585
594
  x - r.right,
586
595
  /* bottom: 3 */
587
- z - r.bottom
596
+ C - r.bottom
588
597
  ];
589
- h && (G(
590
- h.split(K),
591
- function(at, E, O, ct) {
592
- ct.push(O[E]);
593
- },
594
- Ht,
595
- c = []
596
- ), d.unshift.apply(d, c)), n = G(
598
+ a && (G(
599
+ a.split(K),
600
+ function(ct, H, P, ft) {
601
+ ft.push(P[H]);
602
+ },
603
+ Wt,
604
+ u = []
605
+ ), d.unshift.apply(d, u)), n = G(
597
606
  d,
598
- function(at, E, O) {
599
- if (O[E] > 0)
600
- return E;
607
+ function(ct, H, P) {
608
+ if (P[H] > 0)
609
+ return H;
601
610
  },
602
611
  S
603
612
  );
604
- var g = 0, y = 0, w = 0;
613
+ var g = 0, y = 0, v = 0;
605
614
  if (n != null) {
606
- var m = n == 0 || n == 2, N = n == 3 || n == 1;
607
- g = N ? Math.min(r.left, x) : n == 2 ? r.right + s : S[0], o -= s * +m;
608
- var T = Math.max(r.top, 0), $ = Math.min(
615
+ var m = n == 0 || n == 2, T = n == 3 || n == 1;
616
+ g = T ? Math.min(r.left, x) : n == 2 ? r.right + s : S[0], o -= s * +m;
617
+ var z = Math.max(r.top, 0), $ = Math.min(
609
618
  r.bottom,
610
619
  i
611
- ), I = ($ - o + Math.min(i - o, T)) / 2;
620
+ ), B = ($ - o + Math.min(i - o, z)) / 2;
612
621
  y = Math.max(
613
- m ? I : n == 3 ? r.top + u + s : Math.min(I, S[1]),
622
+ m ? B : n == 3 ? r.top + c + s : Math.min(B, S[1]),
614
623
  0
615
- ), N && r.left > x && (w = r.left - g - s + p / 2);
624
+ ), T && r.left > x && (v = r.left - g - s + p / 2);
616
625
  }
617
- let j = a.classList, C = t.css;
618
- j.remove(...et), j.add(et[n]), t.index = n, C.left = g + Q, C.top = y + Q;
619
- let U = C["--tips-arrow-top"] = m ? Math.min(
626
+ let I = h.classList, N = t.css;
627
+ I.remove(...et), I.add(et[n]), t.index = n, N.left = g + Q, N.top = y + Q;
628
+ let U = N["--tips-arrow-top"] = m ? Math.min(
620
629
  /* 底边距 */
621
- Math.max(y, T) - y,
630
+ Math.max(y, z) - y,
622
631
  o - s
623
632
  ) : Z, X = f - 3 * s;
624
- C["--tips-arrow"] = w > X - 10 || m && (U + (o > 50 ? 15 : 0) > o || !U) ? "hidden" : "visible", C["--tips-arrow-left"] = w ? Math.min(w, X) : Z;
633
+ N["--tips-arrow"] = v > X - 10 || m && (U + (o > 50 ? 15 : 0) > o || !U) ? "hidden" : "visible", N["--tips-arrow-left"] = v ? Math.min(v, X) : Z;
625
634
  }
626
- const A = "data-tips-scroll", Ot = {
635
+ const W = "data-tips-scroll", Bt = {
627
636
  name: "Tips",
628
637
  props: {
629
638
  /* 目标对象 */
@@ -719,7 +728,7 @@ const A = "data-tips-scroll", Ot = {
719
728
  /* 初始化 */
720
729
  init() {
721
730
  let t = this.$el;
722
- t.nodeName != "#comment" && ht({
731
+ t.nodeName != "#comment" && at({
723
732
  onresize: !1,
724
733
  /* 监控的目标 */
725
734
  target: t.parentNode,
@@ -735,20 +744,20 @@ const A = "data-tips-scroll", Ot = {
735
744
  },
736
745
  __2listener() {
737
746
  this.static || this.__parent((t, e, i) => {
738
- e ? _(t.addEventListener, t, "scroll", W) : (_(k.observe, k, t), (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && (i = this.__attr(t, A), i || (_(t.addEventListener, t, "scroll", W), this.__attr(t, A, "true"))));
747
+ e ? _(t.addEventListener, t, "scroll", E) : (_(M.observe, M, t), (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && (i = this.__attr(t, W), i || (_(t.addEventListener, t, "scroll", E), this.__attr(t, W, "true"))));
739
748
  });
740
749
  },
741
750
  __css() {
742
751
  let t = {}, e;
743
752
  return this.target ? e = {
744
753
  [this.position]: this.offset + "px"
745
- } : (e = M(
754
+ } : (e = k(
746
755
  this.$props,
747
756
  "color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size,borderRadius=>--tips-border-radius"
748
- ), t["--arrow-size"] = Math.sqrt(2 * Math.pow((this.border || 3) * 2 + 2, 2)) / 2 >> 0), H(t, e), t;
757
+ ), t["--arrow-size"] = Math.sqrt(2 * Math.pow((this.border || 3) * 2 + 2, 2)) / 2 >> 0), R(t, e), t;
749
758
  },
750
759
  __2next() {
751
- this.target || (this.init(), B.delay = +this.delay, Lt((t) => {
760
+ this.target || (this.init(), F.delay = +this.delay, Ft((t) => {
752
761
  this.__2listener();
753
762
  }), this.__2listener());
754
763
  }
@@ -758,11 +767,11 @@ const A = "data-tips-scroll", Ot = {
758
767
  },
759
768
  unmounted() {
760
769
  this.__parent(function(t, e) {
761
- _(t.removeEventListener, t, "scroll", W), _(t.removeAttribute, t, A, void 0), e || _(k.unobserve, k, t);
770
+ _(t.removeEventListener, t, "scroll", E), _(t.removeAttribute, t, W, void 0), e || _(M.unobserve, M, t);
762
771
  });
763
772
  }
764
773
  };
765
- var At = function() {
774
+ var It = function() {
766
775
  var e = this, i = e._self._c;
767
776
  return e.visible ? i("div", e._b({ staticClass: "tips", class: e.target ? "tips-" + e.position : "", style: e.static ? null : e.css, attrs: { static: e.static ? "" : null } }, "div", e.$attrs, !1), [e._t("default", function() {
768
777
  return [e._t("title", function() {
@@ -771,27 +780,30 @@ var At = function() {
771
780
  return [e._v(e._s(e.content))];
772
781
  })];
773
782
  })], 2) : e._e();
774
- }, Ft = [], Pt = /* @__PURE__ */ L(
775
- Ot,
776
- At,
777
- Ft,
783
+ }, Ut = [], Xt = /* @__PURE__ */ j(
784
+ Bt,
785
+ It,
786
+ Ut,
778
787
  !1,
779
788
  null,
780
- "f2043d4b",
789
+ "b7f54162",
781
790
  null,
782
791
  null
783
792
  );
784
- const Bt = Pt.exports, It = [vt, Tt, Mt, Bt], Dt = {
785
- install(t) {
786
- It.forEach((e) => {
787
- t.component("S" + e.name, e), t.component(e.name + "S", e);
788
- });
789
- }
793
+ const Dt = Xt.exports, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
794
+ __proto__: null,
795
+ default: Dt
796
+ }, Symbol.toStringTag, { value: "Module" })), qt = /* @__PURE__ */ Object.assign({ "./components/Card.vue": St, "./components/Flyweight.vue": Ot, "./components/Stream.vue": Pt, "./components/Tips.vue": Gt }), ht = [], ut = {};
797
+ for (const [t, e] of Object.entries(qt)) {
798
+ const i = t.split("/").pop().replace(/\.vue$/, "");
799
+ ut[i] = e.default, ht.push(e.default);
800
+ }
801
+ ut.install = function(t, e = {}) {
802
+ ht.forEach((i) => {
803
+ t.component(i.name, i), t.component("S" + i.name, i), t.component(i.name + "S", i);
804
+ });
790
805
  };
791
806
  export {
792
- Tt as Card,
793
- vt as Flyweight,
794
- Mt as Stream,
795
- Bt as Tips,
796
- Dt as default
807
+ ut as components,
808
+ ut as default
797
809
  };