@soei/flyweight 0.3.11 → 0.3.13
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/Flyweight.cjs +1 -1
- package/Flyweight.js +150 -148
- package/README.md +8 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/vue2/index.cjs +1 -1
- package/vue2/index.js +132 -130
- package/vue2/style.css +1 -1
package/vue2/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { runer as z, merge as
|
|
2
|
-
import { runer as g, isNil as
|
|
3
|
-
import
|
|
4
|
-
let
|
|
1
|
+
import { runer as z, merge as M, isArray as it, each as k, picker as L, isEmpty as st, isSimplyType as D, isString as ct } from "@soei/util";
|
|
2
|
+
import { runer as g, isNil as ut, each as G } from "@soei/tools";
|
|
3
|
+
import dt from "@soei/picker";
|
|
4
|
+
let pt = /(\d+|[+\-\*/]|%)/g, q = {
|
|
5
5
|
"+": (t, e) => t + e,
|
|
6
6
|
"-": (t, e) => t - e,
|
|
7
7
|
"*": (t, e) => t * e,
|
|
8
8
|
"/": (t, e) => t / e,
|
|
9
9
|
"%": (t, e, i) => parseFloat(t) / 100 * i
|
|
10
|
-
},
|
|
10
|
+
}, V = (t, e) => {
|
|
11
11
|
let i;
|
|
12
|
-
if (i = z("match", t,
|
|
12
|
+
if (i = z("match", t, pt)) {
|
|
13
13
|
let s = i.length, l, a = 0, n, h = [];
|
|
14
14
|
for (; s--; )
|
|
15
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
16
|
+l || (l = +h.pop()), t = l >> 0;
|
|
17
17
|
}
|
|
18
18
|
return t;
|
|
19
|
-
},
|
|
19
|
+
}, Y = {}, w = (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
26
|
function W(t, e, i, s, l, a, n, h) {
|
|
27
27
|
var r = typeof t == "function" ? t.options : t;
|
|
28
28
|
e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), s && (r.functional = !0), a && (r._scopeId = "data-v-" + a);
|
|
29
29
|
var o;
|
|
30
|
-
if (n ? (o = function(
|
|
31
|
-
|
|
30
|
+
if (n ? (o = function(f) {
|
|
31
|
+
f = f || // cached call
|
|
32
32
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
33
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !
|
|
33
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ < "u" && (f = __VUE_SSR_CONTEXT__), l && l.call(this, f), f && f._registeredComponents && f._registeredComponents.add(n);
|
|
34
34
|
}, r._ssrRegister = o) : l && (o = h ? function() {
|
|
35
35
|
l.call(
|
|
36
36
|
this,
|
|
@@ -40,8 +40,8 @@ function W(t, e, i, s, l, a, n, h) {
|
|
|
40
40
|
if (r.functional) {
|
|
41
41
|
r._injectStyles = o;
|
|
42
42
|
var u = r.render;
|
|
43
|
-
r.render = function(
|
|
44
|
-
return o.call(p), u(
|
|
43
|
+
r.render = function(c, p) {
|
|
44
|
+
return o.call(p), u(c, p);
|
|
45
45
|
};
|
|
46
46
|
} else {
|
|
47
47
|
var d = r.beforeCreate;
|
|
@@ -52,10 +52,10 @@ function W(t, e, i, s, l, a, n, h) {
|
|
|
52
52
|
options: r
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
let
|
|
55
|
+
let J = (t) => t == null || t == null, gt = (...t) => {
|
|
56
56
|
console.info("::::FLYWEIGHT", ...t);
|
|
57
57
|
};
|
|
58
|
-
const
|
|
58
|
+
const _t = {
|
|
59
59
|
name: "Flyweight",
|
|
60
60
|
props: {
|
|
61
61
|
flys: {
|
|
@@ -119,7 +119,7 @@ const gt = {
|
|
|
119
119
|
},
|
|
120
120
|
style() {
|
|
121
121
|
var t = this.w, e = this.h, i = this.Size, s = {};
|
|
122
|
-
return
|
|
122
|
+
return M(s, {
|
|
123
123
|
"--width": w(this.realW),
|
|
124
124
|
"--height": w(this.realH),
|
|
125
125
|
"--flyweight-content": w(i)
|
|
@@ -178,7 +178,7 @@ const gt = {
|
|
|
178
178
|
this.rebuild(), this.$emit("resize");
|
|
179
179
|
}).observe(this.flyweight);
|
|
180
180
|
} catch (t) {
|
|
181
|
-
|
|
181
|
+
gt(t);
|
|
182
182
|
}
|
|
183
183
|
this.scrollx = z("hasAttribute", this.flyweight, "scroll-x"), this.BoxRule = /* this.scrollx ? 'clientHeight=>width,clientWidth=>height' : */
|
|
184
184
|
"clientHeight=>height,clientWidth=>width", this.direction = this.scrollx ? "scrollLeft" : "scrollTop";
|
|
@@ -186,9 +186,9 @@ const gt = {
|
|
|
186
186
|
methods: {
|
|
187
187
|
exec: w,
|
|
188
188
|
trigger(t, e) {
|
|
189
|
-
|
|
189
|
+
it(t) || (t = t && e ? [[t, e]] : []), t.length && this.lazyrun(() => {
|
|
190
190
|
k(t, (i, s) => {
|
|
191
|
-
this.$emit(s[0],
|
|
191
|
+
this.$emit(s[0], J(s[1]) ? !0 : s[1]);
|
|
192
192
|
});
|
|
193
193
|
});
|
|
194
194
|
},
|
|
@@ -203,7 +203,7 @@ const gt = {
|
|
|
203
203
|
if (l[a] == n)
|
|
204
204
|
return s;
|
|
205
205
|
}, e.picker, e.id);
|
|
206
|
-
|
|
206
|
+
J(i) || this.setindex(i);
|
|
207
207
|
}], this, t);
|
|
208
208
|
},
|
|
209
209
|
setindex(t) {
|
|
@@ -229,20 +229,20 @@ const gt = {
|
|
|
229
229
|
/* 显示区域第一行的索引 */
|
|
230
230
|
index: i / this.expand >> 0
|
|
231
231
|
};
|
|
232
|
-
|
|
232
|
+
M(s, this.space), t.from || e.push(["onscroll", s]);
|
|
233
233
|
let l = !1;
|
|
234
234
|
k(
|
|
235
235
|
this.flyweights,
|
|
236
|
-
(a, n, h, r, o, u, d,
|
|
237
|
-
if (h = a / o >> 0,
|
|
238
|
-
(+(h < u % r) + (u / r >> 0)),
|
|
236
|
+
(a, n, h, r, o, u, d, f, c) => {
|
|
237
|
+
if (h = a / o >> 0, f = h + r * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
|
|
238
|
+
(+(h < u % r) + (u / r >> 0)), c = f * o + a % o, c >= this.count) {
|
|
239
239
|
l || (e.push(["onend"]), l = !0);
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
|
-
n.index =
|
|
242
|
+
n.index = f, n.i = c, n.data = this.flys[c];
|
|
243
243
|
let p = [
|
|
244
244
|
/* top */
|
|
245
|
-
|
|
245
|
+
f * this.expand + n.x,
|
|
246
246
|
/* left */
|
|
247
247
|
n.space
|
|
248
248
|
];
|
|
@@ -266,30 +266,30 @@ const gt = {
|
|
|
266
266
|
this.count = t;
|
|
267
267
|
let i = this.scrollx, s = this.flyweight, l = L(s, this.BoxRule);
|
|
268
268
|
this.$nextTick(() => {
|
|
269
|
-
let a = /true/.test(this.auto), [n, h] = this.offset, r = l.width, o = l.height, u = (
|
|
270
|
-
i &&
|
|
271
|
-
let [
|
|
272
|
-
i ? (_ = u, u -= n,
|
|
269
|
+
let a = /true/.test(this.auto), [n, h] = this.offset, r = l.width, o = l.height, u = (V(this.width, r) || r) + n, d = V(this.height, o) + h, f = [r / u >> 0 || 1, o / d >> 0 || 1];
|
|
270
|
+
i && f.reverse();
|
|
271
|
+
let [c, p] = f, b = this.padding, T, x = 0, _, y;
|
|
272
|
+
i ? (_ = u, u -= n, y = (S) => (
|
|
273
273
|
/* 计算top偏移量 */
|
|
274
274
|
S * (d - h) + (S + 1) * h
|
|
275
|
-
)) : (a ? (u = (r - n * (
|
|
276
|
-
let v = Math.min(t,
|
|
275
|
+
)) : (a ? (u = (r - n * (c + 2 * b - 1)) / c, T = !b * n, x = b * n) : (T = 0, x = (r % u + n * c) / (c + 1) >> 0, u -= n), y = (S) => S * (u + T) + (S + 1) * x, _ = d), this.row = p + 2, this.column = c, this.realH = d - h, this.realW = u, this.expand = _, this.Size = Math.ceil(t / c) * _;
|
|
276
|
+
let v = Math.min(t, c * this.row), m = v - 1, $;
|
|
277
277
|
for (; v-- > 0; )
|
|
278
|
-
$ =
|
|
278
|
+
$ = m - v, this.$set(e, $, {
|
|
279
279
|
x: n,
|
|
280
280
|
y: h,
|
|
281
281
|
width: u,
|
|
282
282
|
height: d - h,
|
|
283
|
-
space:
|
|
283
|
+
space: y($ % c),
|
|
284
284
|
data: {}
|
|
285
285
|
});
|
|
286
|
-
e.length =
|
|
286
|
+
e.length = m + 1;
|
|
287
287
|
let N = [];
|
|
288
|
-
o / _ >
|
|
288
|
+
o / _ > m / c && N.push(["onend"]), this.flyweight && (this.flyweight[this.direction] = 0), this.$nextTick(() => {
|
|
289
289
|
this.setindex(this.selectIndex || 0), this.scroll();
|
|
290
290
|
}), N.push(["update:space", {
|
|
291
|
-
row: (
|
|
292
|
-
column:
|
|
291
|
+
row: (m / c >> 0) + 1,
|
|
292
|
+
column: c,
|
|
293
293
|
showrow: this.row,
|
|
294
294
|
showcolumn: this.column
|
|
295
295
|
}]), this.trigger(N);
|
|
@@ -297,7 +297,7 @@ const gt = {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
|
-
var
|
|
300
|
+
var mt = function() {
|
|
301
301
|
var e = this, i = e._self._c;
|
|
302
302
|
return i("div", { ref: "flyweight", staticClass: "flyweight", class: {
|
|
303
303
|
"flyweight-active": e.actice
|
|
@@ -307,9 +307,9 @@ var _t = function() {
|
|
|
307
307
|
left: s.left + "px"
|
|
308
308
|
} }, [e._t("default", null, null, s)], 2);
|
|
309
309
|
}), 0), e.flyweights.length ? e._t("end") : e._e()], 2);
|
|
310
|
-
}, yt = [],
|
|
311
|
-
gt,
|
|
310
|
+
}, yt = [], vt = /* @__PURE__ */ W(
|
|
312
311
|
_t,
|
|
312
|
+
mt,
|
|
313
313
|
yt,
|
|
314
314
|
!1,
|
|
315
315
|
null,
|
|
@@ -317,11 +317,11 @@ var _t = function() {
|
|
|
317
317
|
null,
|
|
318
318
|
null
|
|
319
319
|
);
|
|
320
|
-
const
|
|
321
|
-
function
|
|
320
|
+
const wt = vt.exports;
|
|
321
|
+
function F(t, e) {
|
|
322
322
|
return e && (t = t.replace(/[a-z]/g, "")), t.toLowerCase();
|
|
323
323
|
}
|
|
324
|
-
let
|
|
324
|
+
let rt = {
|
|
325
325
|
close: {
|
|
326
326
|
handler(t) {
|
|
327
327
|
this.change(t);
|
|
@@ -334,7 +334,7 @@ let st = {
|
|
|
334
334
|
},
|
|
335
335
|
deep: !0
|
|
336
336
|
}
|
|
337
|
-
},
|
|
337
|
+
}, bt = [
|
|
338
338
|
"BackGround",
|
|
339
339
|
"BordeR",
|
|
340
340
|
"Height",
|
|
@@ -343,17 +343,17 @@ let st = {
|
|
|
343
343
|
"Right",
|
|
344
344
|
"Bottom",
|
|
345
345
|
"Left"
|
|
346
|
-
],
|
|
346
|
+
], nt = {};
|
|
347
347
|
k(
|
|
348
|
-
|
|
348
|
+
bt,
|
|
349
349
|
(t, e, i) => {
|
|
350
|
-
t =
|
|
350
|
+
t = F(e), nt["--" + F(e, !0)] = t, i[t] = function() {
|
|
351
351
|
this.trigger++;
|
|
352
352
|
};
|
|
353
353
|
},
|
|
354
|
-
|
|
354
|
+
rt
|
|
355
355
|
);
|
|
356
|
-
const
|
|
356
|
+
const xt = {
|
|
357
357
|
name: "Card",
|
|
358
358
|
// inheritAttrs: false,
|
|
359
359
|
props: {
|
|
@@ -412,30 +412,30 @@ const bt = {
|
|
|
412
412
|
return this.tr();
|
|
413
413
|
}
|
|
414
414
|
},
|
|
415
|
-
watch:
|
|
415
|
+
watch: rt,
|
|
416
416
|
methods: {
|
|
417
417
|
exec: w,
|
|
418
|
-
isEmpty:
|
|
419
|
-
isSimplyType:
|
|
418
|
+
isEmpty: st,
|
|
419
|
+
isSimplyType: D,
|
|
420
420
|
tr() {
|
|
421
421
|
let t = {};
|
|
422
|
-
return this.margin(this.offset), k(
|
|
422
|
+
return this.margin(this.offset), k(nt, (e, i) => {
|
|
423
423
|
this.css(t, e, i);
|
|
424
424
|
}), t;
|
|
425
425
|
},
|
|
426
|
-
tolower:
|
|
426
|
+
tolower: F,
|
|
427
427
|
css(t, e, i) {
|
|
428
428
|
let s = this[i] || this.default[i];
|
|
429
429
|
!s || this.default[i] == s || (t[e] = w(s));
|
|
430
430
|
},
|
|
431
431
|
change(t) {
|
|
432
|
-
|
|
432
|
+
D(t) || (this.closecss = L(
|
|
433
433
|
t,
|
|
434
434
|
"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"
|
|
435
435
|
));
|
|
436
436
|
},
|
|
437
437
|
margin(t) {
|
|
438
|
-
|
|
438
|
+
M(
|
|
439
439
|
this,
|
|
440
440
|
L(
|
|
441
441
|
ct(t) ? t.split(/\s*(?:,|\s+)\s*/) : t,
|
|
@@ -450,7 +450,7 @@ const bt = {
|
|
|
450
450
|
this.change(this.close);
|
|
451
451
|
}
|
|
452
452
|
};
|
|
453
|
-
var
|
|
453
|
+
var St = function() {
|
|
454
454
|
var e = this, i = e._self._c;
|
|
455
455
|
return i("div", { key: e.trigger, staticClass: "card", style: e.isEmpty(e.style) ? e.tr() : e.style }, [e._t("default", function() {
|
|
456
456
|
return [e._t("title", function() {
|
|
@@ -462,22 +462,25 @@ var xt = function() {
|
|
|
462
462
|
return [i("div", { staticClass: "card-content" }, [e._t("inner")], 2)];
|
|
463
463
|
})];
|
|
464
464
|
})], 2);
|
|
465
|
-
},
|
|
466
|
-
bt,
|
|
465
|
+
}, $t = [], Nt = /* @__PURE__ */ W(
|
|
467
466
|
xt,
|
|
468
467
|
St,
|
|
468
|
+
$t,
|
|
469
469
|
!1,
|
|
470
470
|
null,
|
|
471
|
-
"
|
|
471
|
+
"17093fb8",
|
|
472
472
|
null,
|
|
473
473
|
null
|
|
474
474
|
);
|
|
475
|
-
const
|
|
475
|
+
const zt = Nt.exports, Tt = {
|
|
476
476
|
name: "Stream",
|
|
477
477
|
computed: {
|
|
478
|
+
component() {
|
|
479
|
+
return this.$refs.component;
|
|
480
|
+
},
|
|
478
481
|
column() {
|
|
479
482
|
let { columns: t, T: e } = this, i = t || e;
|
|
480
|
-
return
|
|
483
|
+
return st(i) ? [] : it(i) ? i : [i];
|
|
481
484
|
}
|
|
482
485
|
},
|
|
483
486
|
props: {
|
|
@@ -490,10 +493,6 @@ const Nt = $t.exports, zt = {
|
|
|
490
493
|
type: String,
|
|
491
494
|
default: "div"
|
|
492
495
|
},
|
|
493
|
-
data: {
|
|
494
|
-
type: Array,
|
|
495
|
-
default: () => []
|
|
496
|
-
},
|
|
497
496
|
columns: {
|
|
498
497
|
type: [Object, Array],
|
|
499
498
|
default: () => null
|
|
@@ -503,37 +502,40 @@ const Nt = $t.exports, zt = {
|
|
|
503
502
|
default: () => null
|
|
504
503
|
}
|
|
505
504
|
},
|
|
505
|
+
mounted() {
|
|
506
|
+
this.$.vnode.ref && M(this, { ...this.component });
|
|
507
|
+
},
|
|
506
508
|
methods: {
|
|
507
|
-
|
|
509
|
+
__trigger(t) {
|
|
508
510
|
let e = t[this.bridge] || t.type;
|
|
509
511
|
return (this.$slots || this.$scopedSlots)[e] ? e : "default";
|
|
510
512
|
}
|
|
511
513
|
}
|
|
512
514
|
};
|
|
513
|
-
var
|
|
515
|
+
var Ct = function() {
|
|
514
516
|
var e = this, i = e._self._c;
|
|
515
|
-
return i(e.type, e._b({ tag: "component" }, "component", e.$attrs, !1), [e._l(e.column, function(s) {
|
|
516
|
-
return e._t(e.
|
|
517
|
+
return i(e.type, e._b({ ref: "component", tag: "component" }, "component", e.$attrs, !1), [e._l(e.column, function(s) {
|
|
518
|
+
return e._t(e.__trigger(s), null, null, s);
|
|
517
519
|
})], 2);
|
|
518
|
-
},
|
|
519
|
-
zt,
|
|
520
|
+
}, Rt = [], kt = /* @__PURE__ */ W(
|
|
520
521
|
Tt,
|
|
521
522
|
Ct,
|
|
523
|
+
Rt,
|
|
522
524
|
!1,
|
|
523
525
|
null,
|
|
524
526
|
null,
|
|
525
527
|
null,
|
|
526
528
|
null
|
|
527
529
|
);
|
|
528
|
-
const
|
|
529
|
-
let
|
|
530
|
-
const
|
|
531
|
-
var
|
|
530
|
+
const Mt = kt.exports, K = /(?:\,|\|{2})/, Q = "px", Z = "";
|
|
531
|
+
let lt = document.documentElement, tt, et = ["s-left", "s-top", "s-right", "s-bottom"], Ht = { left: 0, top: 1, right: 2, bottom: 3 };
|
|
532
|
+
const P = [];
|
|
533
|
+
var Et = dt(
|
|
532
534
|
window,
|
|
533
535
|
"Reflect.defineProperty|Object.defineProperty=>Proxy"
|
|
534
536
|
).Proxy;
|
|
535
|
-
let
|
|
536
|
-
|
|
537
|
+
let B = {}, ot = null;
|
|
538
|
+
Et(B, "delay", {
|
|
537
539
|
/**
|
|
538
540
|
* 获取延迟时间值
|
|
539
541
|
* @returns {number} 返回当前实例的延迟时间属性值
|
|
@@ -542,30 +544,30 @@ Ht(P, "delay", {
|
|
|
542
544
|
return this._delay;
|
|
543
545
|
},
|
|
544
546
|
set(t) {
|
|
545
|
-
|
|
546
|
-
g(
|
|
547
|
+
ot = Lt(() => {
|
|
548
|
+
g(P);
|
|
547
549
|
}, t), this._delay = t;
|
|
548
550
|
}
|
|
549
551
|
});
|
|
550
|
-
|
|
551
|
-
function
|
|
552
|
+
B.delay = 60;
|
|
553
|
+
function Lt(t, e) {
|
|
552
554
|
let i = 0;
|
|
553
555
|
return function() {
|
|
554
556
|
const s = Date.now();
|
|
555
557
|
s - i >= e && (i = s, g(t, this, arguments));
|
|
556
558
|
};
|
|
557
559
|
}
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
+
const E = () => {
|
|
561
|
+
ot();
|
|
560
562
|
};
|
|
561
|
-
function
|
|
562
|
-
|
|
563
|
+
function Wt(t) {
|
|
564
|
+
P.push(t);
|
|
563
565
|
}
|
|
564
|
-
const R = new ResizeObserver(
|
|
565
|
-
R.observe(
|
|
566
|
-
function
|
|
567
|
-
t.onresize || (
|
|
568
|
-
var e =
|
|
566
|
+
const R = new ResizeObserver(E);
|
|
567
|
+
R.observe(lt);
|
|
568
|
+
function ht(t) {
|
|
569
|
+
t.onresize || (P.push([ht, null, t]), t.onresize = !0);
|
|
570
|
+
var e = lt, i = e.clientHeight, s = ut(t.offset) ? 15 : t.offset, l = t.target, a = t.room, n = t.index, h = t.position, r = l.getBoundingClientRect(), o = a.offsetHeight + s, u = a.offsetWidth + s, d = "3,0,2,1".split(K), f, c = (r.height == tt ? r.bottom - r.top : r.height) >> 0, p = (r.width == tt ? r.right - r.left : r.width) >> 0, b = e.clientWidth - u, T = i - o, x = [
|
|
569
571
|
/* left: 0 */
|
|
570
572
|
r.left - u,
|
|
571
573
|
/* top: 1 */
|
|
@@ -576,43 +578,43 @@ function ot(t) {
|
|
|
576
578
|
T - r.bottom
|
|
577
579
|
];
|
|
578
580
|
h && (G(
|
|
579
|
-
h.split(
|
|
580
|
-
function(
|
|
581
|
-
|
|
581
|
+
h.split(K),
|
|
582
|
+
function(at, H, O, ft) {
|
|
583
|
+
ft.push(O[H]);
|
|
582
584
|
},
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
), d.unshift.apply(d,
|
|
585
|
+
Ht,
|
|
586
|
+
f = []
|
|
587
|
+
), d.unshift.apply(d, f)), n = G(
|
|
586
588
|
d,
|
|
587
|
-
function(
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
589
|
+
function(at, H, O) {
|
|
590
|
+
if (O[H] > 0)
|
|
591
|
+
return H;
|
|
590
592
|
},
|
|
591
593
|
x
|
|
592
594
|
);
|
|
593
|
-
var _ = 0,
|
|
595
|
+
var _ = 0, y = 0, v = 0;
|
|
594
596
|
if (n != null) {
|
|
595
|
-
var
|
|
596
|
-
_ = $ ? Math.min(r.left, b) : n == 2 ? r.right + s : x[0], o -= s * +
|
|
597
|
+
var m = n == 0 || n == 2, $ = n == 3 || n == 1;
|
|
598
|
+
_ = $ ? Math.min(r.left, b) : n == 2 ? r.right + s : x[0], o -= s * +m;
|
|
597
599
|
var N = Math.max(r.top, 0), S = Math.min(
|
|
598
600
|
r.bottom,
|
|
599
601
|
i
|
|
600
|
-
),
|
|
601
|
-
|
|
602
|
-
|
|
602
|
+
), I = (S - o + Math.min(i - o, N)) / 2;
|
|
603
|
+
y = Math.max(
|
|
604
|
+
m ? I : n == 3 ? r.top + c + s : Math.min(I, x[1]),
|
|
603
605
|
0
|
|
604
606
|
), $ && r.left > b && (v = r.left - _ - s + p / 2);
|
|
605
607
|
}
|
|
606
|
-
let
|
|
607
|
-
|
|
608
|
-
let
|
|
608
|
+
let j = a.classList, C = t.css;
|
|
609
|
+
j.remove(...et), j.add(et[n]), t.index = n, C.left = _ + Q, C.top = y + Q;
|
|
610
|
+
let U = C["--tips-arrow-top"] = m ? Math.min(
|
|
609
611
|
/* 底边距 */
|
|
610
|
-
Math.max(
|
|
612
|
+
Math.max(y, N) - y,
|
|
611
613
|
o - s
|
|
612
|
-
) :
|
|
613
|
-
C["--tips-arrow"] = v >
|
|
614
|
+
) : Z, X = u - 3 * s;
|
|
615
|
+
C["--tips-arrow"] = v > X - 10 || m && (U + (o > 50 ? 15 : 0) > o || !U) ? "hidden" : "visible", C["--tips-arrow-left"] = v ? Math.min(v, X) : Z;
|
|
614
616
|
}
|
|
615
|
-
const
|
|
617
|
+
const A = "data-tips-scroll", Ot = {
|
|
616
618
|
name: "Tips",
|
|
617
619
|
props: {
|
|
618
620
|
/* 是否显示 */
|
|
@@ -703,7 +705,7 @@ const Wt = {
|
|
|
703
705
|
},
|
|
704
706
|
/* 初始化 */
|
|
705
707
|
init() {
|
|
706
|
-
this.$el.nodeName != "#comment" &&
|
|
708
|
+
this.$el.nodeName != "#comment" && ht({
|
|
707
709
|
onresize: !1,
|
|
708
710
|
/* 监控的目标 */
|
|
709
711
|
target: this.$el.parentNode,
|
|
@@ -719,24 +721,24 @@ const Wt = {
|
|
|
719
721
|
},
|
|
720
722
|
scrollListener() {
|
|
721
723
|
this.static || this.parent((t, e, i) => {
|
|
722
|
-
e ? g(t.addEventListener, t, "scroll",
|
|
724
|
+
e ? g(t.addEventListener, t, "scroll", E) : (g(R.observe, R, t), (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && (i = this.attr(t, A), i || (g(t.addEventListener, t, "scroll", E), this.attr(t, A, "true"))));
|
|
723
725
|
});
|
|
724
726
|
}
|
|
725
727
|
},
|
|
726
728
|
mounted() {
|
|
727
|
-
|
|
729
|
+
M(
|
|
728
730
|
this.css,
|
|
729
731
|
L(
|
|
730
732
|
this.$props,
|
|
731
733
|
"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size,borderRadius=>--tips-border-radius"
|
|
732
734
|
)
|
|
733
|
-
), this.css["--arrow-size"] = Math.sqrt(2 * Math.pow((this.border || 3) * 2 + 2, 2)) / 2 >> 0, this.init(),
|
|
735
|
+
), this.css["--arrow-size"] = Math.sqrt(2 * Math.pow((this.border || 3) * 2 + 2, 2)) / 2 >> 0, this.init(), B.delay = +this.delay, Wt((t) => {
|
|
734
736
|
this.scrollListener();
|
|
735
737
|
}), this.scrollListener();
|
|
736
738
|
},
|
|
737
739
|
unmounted() {
|
|
738
740
|
this.parent(function(t, e) {
|
|
739
|
-
g(t.removeEventListener, t, "scroll",
|
|
741
|
+
g(t.removeEventListener, t, "scroll", E), g(t.removeAttribute, t, A, void 0), e || g(R.unobserve, R, t);
|
|
740
742
|
});
|
|
741
743
|
}
|
|
742
744
|
};
|
|
@@ -749,27 +751,27 @@ var At = function() {
|
|
|
749
751
|
return [e._v(e._s(e.content))];
|
|
750
752
|
})];
|
|
751
753
|
})], 2) : e._e();
|
|
752
|
-
},
|
|
753
|
-
Wt,
|
|
754
|
-
At,
|
|
754
|
+
}, Ft = [], Pt = /* @__PURE__ */ W(
|
|
755
755
|
Ot,
|
|
756
|
+
At,
|
|
757
|
+
Ft,
|
|
756
758
|
!1,
|
|
757
759
|
null,
|
|
758
|
-
"
|
|
760
|
+
"d4e2f8f1",
|
|
759
761
|
null,
|
|
760
762
|
null
|
|
761
763
|
);
|
|
762
|
-
const
|
|
764
|
+
const Bt = Pt.exports, It = [wt, zt, Mt, Bt], Dt = {
|
|
763
765
|
install(t) {
|
|
764
|
-
|
|
766
|
+
It.forEach((e) => {
|
|
765
767
|
t.component("S" + e.name, e), t.component(e.name + "S", e);
|
|
766
768
|
});
|
|
767
769
|
}
|
|
768
770
|
};
|
|
769
771
|
export {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
772
|
+
zt as Card,
|
|
773
|
+
wt as Flyweight,
|
|
774
|
+
Mt as Stream,
|
|
775
|
+
Bt as Tips,
|
|
776
|
+
Dt as default
|
|
775
777
|
};
|
package/vue2/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.flyweight[data-v-d5f1cd63]{height:var(--flyweight-h, 100%);width:var(--flyweight-w, 100%);overflow:auto;position:relative}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb:hover,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-d5f1cd63]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all+*[data-v-d5f1cd63]{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-d5f1cd63]{height:var(--flyweight-content)}.flyweight .flyweight-all>*[data-v-d5f1cd63]{width:calc(var(--width));height:var(--height);position:absolute}@media screen and (-apple-system: Macintosh){.flyweight .flyweight-all[data-v-d5f1cd63]{background-color:red!important}}.card[data-v-
|
|
1
|
+
@charset "UTF-8";.flyweight[data-v-d5f1cd63]{height:var(--flyweight-h, 100%);width:var(--flyweight-w, 100%);overflow:auto;position:relative}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb:hover,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-d5f1cd63]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all+*[data-v-d5f1cd63]{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-d5f1cd63]{height:var(--flyweight-content)}.flyweight .flyweight-all>*[data-v-d5f1cd63]{width:calc(var(--width));height:var(--height);position:absolute}@media screen and (-apple-system: Macintosh){.flyweight .flyweight-all[data-v-d5f1cd63]{background-color:red!important}}html [simply]{background-color:inherit;border:0!important}html [nothing]{margin:0!important;padding:0!important;border:0!important}html [flex],html [space],html [row],html [column]{display:flex}html [column]{flex-direction:column}html [row]{flex-direction:row}html [space]{justify-content:space-between}html [space=around]{justify-content:space-around}html [space=evenly]{justify-content:space-evenly}html [center]{justify-content:center}html [vcenter]{align-items:center}html [hand]{cursor:pointer}html [overflow]{overflow:auto!important}html [overflow=scroll]{overflow:scroll!important}.card[data-v-17093fb8]{--t: 0px;--r: 0px;--b: 0px;--l: 0px;--h: 100%;--w: 100%;--br: 1px;position:relative;background-color:var(--bg, var(--card-background-color, #fff));padding:var(--card-padding, 10px);border-radius:var(--card-border-radius, 10px);box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);border-width:var(--br);justify-content:flex-start;margin:var(--t) var(--r) var(--b) var(--l);height:calc(var(--h) - var(--t) - var(--b));width:calc(var(--w) - var(--l) - var(--r));overflow:auto}.card[hover-scroll][data-v-17093fb8]::-webkit-scrollbar-track,.card[auto-scroll][data-v-17093fb8]::-webkit-scrollbar-track{border-radius:10px}.card[hover-scroll][data-v-17093fb8]::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-17093fb8]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.card[hover-scroll][data-v-17093fb8]::-webkit-scrollbar,.card[auto-scroll][data-v-17093fb8]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.card[hover-scroll][data-v-17093fb8]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-17093fb8]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.card[hover-scroll][data-v-17093fb8]:hover::-webkit-scrollbar-thumb:hover,.card[auto-scroll][data-v-17093fb8]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.card[hover-scroll][data-v-17093fb8]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-17093fb8]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.card .card[simply][data-v-17093fb8]{background-color:inherit;border:0!important}.card .card[nothing][data-v-17093fb8]{margin:0!important;padding:0!important;border:0!important}.card .card[flex][data-v-17093fb8],.card .card[space][data-v-17093fb8],.card .card[row][data-v-17093fb8],.card .card[column][data-v-17093fb8]{display:flex}.card .card[column][data-v-17093fb8]{flex-direction:column}.card .card[row][data-v-17093fb8]{flex-direction:row}.card .card[space][data-v-17093fb8]{justify-content:space-between}.card .card[space=around][data-v-17093fb8]{justify-content:space-around}.card .card[space=evenly][data-v-17093fb8]{justify-content:space-evenly}.card .card[center][data-v-17093fb8]{justify-content:center}.card .card[vcenter][data-v-17093fb8]{align-items:center}.card .card[hand][data-v-17093fb8]{cursor:pointer}.card .card[overflow][data-v-17093fb8]{overflow:auto!important}.card .card[overflow=scroll][data-v-17093fb8]{overflow:scroll!important}.card .card-title[data-v-17093fb8]{max-height:40px}.card .card-close[data-v-17093fb8]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent);transition:all .3s ease}.card .card-close.hide[data-v-17093fb8]{display:none}.card .card-close[data-v-17093fb8]:before,.card .card-close[data-v-17093fb8]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-17093fb8]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-17093fb8]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-17093fb8]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-17093fb8]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-17093fb8]{overflow:auto;height:100%}.card .card-content[data-v-17093fb8]:before{background:linear-gradient(90deg,transparent,var(--card-line-color, transparent),var(--card-line-color, transparent),transparent);content:"";display:block;position:sticky;top:0;width:100%;height:1px;z-index:10;transition:opacity .5s ease-in-out}:root{--tips-background-color: #4caf50;--tips-color: #ffffff;--tips-font-size: 8px;--tips-border-radius: 10;--tips-border-width: 3;--tips-offset: 4}.tips[data-v-d4e2f8f1]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:calc(var(--tips-border-radius) * 1px);padding:2px 6px;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);font-weight:700;box-shadow:#0000001f -2px 2px 6px;font-size:var(--tips-font-size)}.tips.warning[data-v-d4e2f8f1],.tips.warn[data-v-d4e2f8f1]{--tips-background-color: #f44336}.tips.notice[data-v-d4e2f8f1]{--tips-background-color: #ff9800}.tips.simply[data-v-d4e2f8f1]{--tips-background-color: #00BCD4}.tips.animate[data-v-d4e2f8f1]{transition:all .3s}.tips-title[data-v-d4e2f8f1]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips-title[data-v-d4e2f8f1]:empty{display:none}.tips[static][data-v-d4e2f8f1]{position:static!important}.tips.arrow[data-v-d4e2f8f1]{--deg: 45deg}.tips.arrow[data-v-d4e2f8f1]:before{transition:all .3s;content:"";visibility:var(--tips-arrow);position:absolute;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);background-color:var(--tips-background-color);height:calc(var(--tips-border-width) * 2px + 2px);width:calc(var(--tips-border-width) * 2px + 2px);transform:rotate(var(--deg));transform-origin:50% 50%;border-left:0;border-top:0;z-index:-1;border-radius:3px}.tips.s-left[data-v-d4e2f8f1]:before{--deg: -45deg;right:calc(var(--arrow-size) * -1px - 1px)}.tips.s-right[data-v-d4e2f8f1]:before{--deg: 135deg;left:calc(var(--arrow-size) * -1px - 1px)}.tips.s-left[data-v-d4e2f8f1]:before,.tips.s-right[data-v-d4e2f8f1]:before{top:calc(var(--tips-arrow-top) * 1px)}.tips.s-top[data-v-d4e2f8f1]:before{bottom:calc(var(--arrow-size) * -1px - 1px)}.tips.s-bottom[data-v-d4e2f8f1]:before{--deg: -135deg;top:calc(var(--arrow-size) * -1px - 1px)}.tips.s-top[data-v-d4e2f8f1]:before,.tips.s-bottom[data-v-d4e2f8f1]:before{left:calc(var(--tips-arrow-left) * 1px)}
|