zf-dbs 0.1.10 → 0.1.12
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/dist/chunks/OYzm_MFq.mjs +96 -0
- package/dist/chunks/{B52ac7eU.mjs → slXKdM5n.mjs} +22 -22
- package/dist/components/zf-app.mjs +1 -1
- package/dist/components/zf-tween-number.mjs +1 -1
- package/dist/index.d.ts +236 -105
- package/dist/index.mjs +3057 -1407
- package/package.json +11 -12
- package/dist/chunks/CaRNyYcg.mjs +0 -152
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ref as v, defineComponent as z, reactive as S, computed as q, provide as C, unref as i, openBlock as c, createElementBlock as u, createVNode as y, withCtx as b, createElementVNode as l, renderSlot as f, normalizeStyle as k } from "vue";
|
|
2
|
+
import { Z as H } from "./zkyql-F5.mjs";
|
|
3
|
+
import { _ as W } from "./CHgC5LLL.mjs";
|
|
4
|
+
const a = v(null);
|
|
5
|
+
function j(o) {
|
|
6
|
+
return a.value = Object.assign({
|
|
7
|
+
appTitle: "zf-dbs template",
|
|
8
|
+
appHeight: 1080,
|
|
9
|
+
appWidth: o.appWidths?.[0] || 1920,
|
|
10
|
+
appWidths: [o.appWidth || 1920],
|
|
11
|
+
useScale: !0,
|
|
12
|
+
useStretch: !1,
|
|
13
|
+
useUE: !1,
|
|
14
|
+
pollingInterval: 1e3 * 60 * 5,
|
|
15
|
+
requestBaseURL: "",
|
|
16
|
+
requestUseMock: !1,
|
|
17
|
+
requestFormatCodeKey: "code",
|
|
18
|
+
requestFormatMessageKey: "message",
|
|
19
|
+
requestFormatDataKey: "data",
|
|
20
|
+
requestSuccessCode: [200, "200"],
|
|
21
|
+
requestErrorAuthCode: [],
|
|
22
|
+
requestErrorAuthHandle: void 0,
|
|
23
|
+
requestErrorIgnoreMessageCode: [],
|
|
24
|
+
requestTokenCacheKey: "token",
|
|
25
|
+
requestTokenHeaderKey: "Authorization",
|
|
26
|
+
requestAutoGetTokenHandle: () => !1,
|
|
27
|
+
sign: void 0
|
|
28
|
+
}, o), a;
|
|
29
|
+
}
|
|
30
|
+
function E() {
|
|
31
|
+
if (!a.value)
|
|
32
|
+
throw new Error("请先调用 defineConfig 进行配置");
|
|
33
|
+
return a;
|
|
34
|
+
}
|
|
35
|
+
const A = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "app"
|
|
38
|
+
}, M = { class: "app__view" }, T = { class: "app__view" }, F = /* @__PURE__ */ z({
|
|
39
|
+
__name: "zf-app",
|
|
40
|
+
setup(o) {
|
|
41
|
+
const e = E(), n = S({
|
|
42
|
+
width: window.innerWidth,
|
|
43
|
+
height: window.innerHeight
|
|
44
|
+
});
|
|
45
|
+
window.addEventListener("resize", () => {
|
|
46
|
+
n.width = window.innerWidth, n.height = window.innerHeight;
|
|
47
|
+
});
|
|
48
|
+
function _(t, s) {
|
|
49
|
+
const p = t.width / t.height;
|
|
50
|
+
return s.reduce((d, h) => {
|
|
51
|
+
const w = d.width / d.height, m = h.width / h.height;
|
|
52
|
+
return Math.abs(m - p) < Math.abs(w - p) ? h : d;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const r = q(() => {
|
|
56
|
+
const t = [
|
|
57
|
+
...e.value.appWidths?.map((s) => ({ width: s, height: e.value.appHeight })) ?? [],
|
|
58
|
+
{ width: e.value.appWidth, height: e.value.appHeight }
|
|
59
|
+
];
|
|
60
|
+
return _(n, t);
|
|
61
|
+
});
|
|
62
|
+
return C("pageSize", r), (t, s) => i(e).useScale ? (c(), u("div", A, [
|
|
63
|
+
y(i(H), {
|
|
64
|
+
width: i(r).width,
|
|
65
|
+
height: i(r).height,
|
|
66
|
+
mode: i(e).useStretch ? "scaleToFill" : "aspectFit"
|
|
67
|
+
}, {
|
|
68
|
+
default: b(() => [
|
|
69
|
+
l("div", M, [
|
|
70
|
+
f(t.$slots, "default", {}, void 0, !0)
|
|
71
|
+
])
|
|
72
|
+
]),
|
|
73
|
+
_: 3
|
|
74
|
+
}, 8, ["width", "height", "mode"])
|
|
75
|
+
])) : (c(), u("div", {
|
|
76
|
+
key: 1,
|
|
77
|
+
class: "app",
|
|
78
|
+
style: k({ width: `${i(e).appWidth}px`, height: `${i(e).appHeight}px` })
|
|
79
|
+
}, [
|
|
80
|
+
l("div", T, [
|
|
81
|
+
f(t.$slots, "default", {}, void 0, !0)
|
|
82
|
+
])
|
|
83
|
+
], 4));
|
|
84
|
+
}
|
|
85
|
+
}), g = /* @__PURE__ */ W(F, [["__scopeId", "data-v-29b93127"]]), B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
86
|
+
__proto__: null,
|
|
87
|
+
ZfApp: g,
|
|
88
|
+
default: g
|
|
89
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
90
|
+
export {
|
|
91
|
+
B as _,
|
|
92
|
+
a as c,
|
|
93
|
+
j as d,
|
|
94
|
+
E as u,
|
|
95
|
+
g as z
|
|
96
|
+
};
|
|
@@ -193,8 +193,8 @@ var _ = y, A = (
|
|
|
193
193
|
};
|
|
194
194
|
}(),
|
|
195
195
|
CatmullRom: function(e, t, i, n, r) {
|
|
196
|
-
var s = (i - e) * 0.5, a = (n - t) * 0.5, l = r * r,
|
|
197
|
-
return (2 * t - 2 * i + s + a) *
|
|
196
|
+
var s = (i - e) * 0.5, a = (n - t) * 0.5, l = r * r, h = r * l;
|
|
197
|
+
return (2 * t - 2 * i + s + a) * h + (-3 * t + 3 * i - 2 * s - a) * l + s * r + t;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
}, I = (
|
|
@@ -233,18 +233,18 @@ var _ = y, A = (
|
|
|
233
233
|
return this._isPlaying = !0, this._isPaused = !1, this._onStartCallbackFired = !1, this._isChainStopped = !1, this._startTime = t !== void 0 ? typeof t == "string" ? _() + parseFloat(t) : t : _(), this._startTime += this._delayTime, this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat), this;
|
|
234
234
|
}, e.prototype._setupProperties = function(t, i, n, r) {
|
|
235
235
|
for (var s in n) {
|
|
236
|
-
var a = t[s], l = Array.isArray(a),
|
|
237
|
-
if (!(
|
|
236
|
+
var a = t[s], l = Array.isArray(a), h = l ? "array" : typeof a, d = !l && Array.isArray(n[s]);
|
|
237
|
+
if (!(h === "undefined" || h === "function")) {
|
|
238
238
|
if (d) {
|
|
239
239
|
var o = n[s];
|
|
240
240
|
if (o.length === 0)
|
|
241
241
|
continue;
|
|
242
242
|
o = o.map(this._handleRelativeValue.bind(this, a)), n[s] = [a].concat(o);
|
|
243
243
|
}
|
|
244
|
-
if ((
|
|
244
|
+
if ((h === "object" || l) && a && !d) {
|
|
245
245
|
i[s] = l ? [] : {};
|
|
246
|
-
for (var
|
|
247
|
-
i[s][
|
|
246
|
+
for (var f in a)
|
|
247
|
+
i[s][f] = a[f];
|
|
248
248
|
r[s] = l ? [] : {}, this._setupProperties(a, i[s], n[s], r[s]);
|
|
249
249
|
} else
|
|
250
250
|
typeof i[s] > "u" && (i[s] = a), l || (i[s] *= 1), d ? r[s] = n[s].slice().reverse() : r[s] = i[s] || 0;
|
|
@@ -313,7 +313,7 @@ var _ = y, A = (
|
|
|
313
313
|
return this._yoyo && (this._reversed = !this._reversed), this._repeatDelayTime !== void 0 ? this._startTime = t + this._repeatDelayTime : this._startTime = t + this._delayTime, this._onRepeatCallback && this._onRepeatCallback(this._object), !0;
|
|
314
314
|
} else {
|
|
315
315
|
this._onCompleteCallback && this._onCompleteCallback(this._object);
|
|
316
|
-
for (var l = 0,
|
|
316
|
+
for (var l = 0, h = this._chainedTweens.length; l < h; l++)
|
|
317
317
|
this._chainedTweens[l].start(this._startTime + this._duration);
|
|
318
318
|
return this._isPlaying = !1, !1;
|
|
319
319
|
}
|
|
@@ -321,7 +321,7 @@ var _ = y, A = (
|
|
|
321
321
|
}, e.prototype._updateProperties = function(t, i, n, r) {
|
|
322
322
|
for (var s in n)
|
|
323
323
|
if (i[s] !== void 0) {
|
|
324
|
-
var a = i[s] || 0, l = n[s],
|
|
324
|
+
var a = i[s] || 0, l = n[s], h = Array.isArray(t[s]), d = Array.isArray(l), o = !h && d;
|
|
325
325
|
o ? t[s] = this._interpolationFunction(l, r) : typeof l == "object" && l ? this._updateProperties(t[s], a, l, r) : (l = this._handleRelativeValue(a, l), typeof l == "number" && (t[s] = a + (l - a) * r));
|
|
326
326
|
}
|
|
327
327
|
}, e.prototype._handleRelativeValue = function(t, i) {
|
|
@@ -371,7 +371,7 @@ const ne = /* @__PURE__ */ j({
|
|
|
371
371
|
});
|
|
372
372
|
let r = null;
|
|
373
373
|
function s(o) {
|
|
374
|
-
const u = /^([^\d-]*)(((-)?(?:\d{1,3}(?=,)(?:,\d{3})+|\d+)
|
|
374
|
+
const u = /^([^\d-]*)(((-)?(?:\d{1,3}(?=,)(?:,\d{3})+|\d+))(\.(\d+))?)?([\s\S]*)$/.exec(`${o}`);
|
|
375
375
|
return {
|
|
376
376
|
value: o,
|
|
377
377
|
prefix: u?.[1] ?? "",
|
|
@@ -384,20 +384,20 @@ const ne = /* @__PURE__ */ j({
|
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
function a(o) {
|
|
387
|
-
const
|
|
388
|
-
return `${
|
|
387
|
+
const f = Math.floor(o), u = `${o}`.split(".")[1] || "";
|
|
388
|
+
return `${f}`.replace(/\d{1,3}(?=(\d{3})+$)/g, "$&,") + (u ? `.${u}` : "");
|
|
389
389
|
}
|
|
390
390
|
function l() {
|
|
391
391
|
r && r.stop(), r = null;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
x.update(o) && requestAnimationFrame(
|
|
393
|
+
function h(o) {
|
|
394
|
+
x.update(o) && requestAnimationFrame(h);
|
|
395
395
|
}
|
|
396
|
-
function d(o,
|
|
396
|
+
function d(o, f) {
|
|
397
397
|
l();
|
|
398
|
-
const u = s(
|
|
398
|
+
const u = s(f);
|
|
399
399
|
if (!u.number)
|
|
400
|
-
return n.value.value = u.value, n.value.prefix = u.prefix, n.value.number = u.number, n.value.negativeFlag = !!u.negative, n.value.integer = u.integer, n.value.decimalFull = u.decimalFull, n.value.decimal = u.decimal, n.value.decimalDecimal = u.decimal.length, n.value.append = u.append,
|
|
400
|
+
return n.value.value = u.value, n.value.prefix = u.prefix, n.value.number = u.number, n.value.negativeFlag = !!u.negative, n.value.integer = u.integer, n.value.decimalFull = u.decimalFull, n.value.decimal = u.decimal, n.value.decimalDecimal = u.decimal.length, n.value.append = u.append, h();
|
|
401
401
|
const w = s(o);
|
|
402
402
|
n.value.prefix = u.prefix, n.value.value = w.value, n.value.append = u.append, n.value.thousandFlag = u.integer.includes(","), r = new x.Tween({
|
|
403
403
|
value: w.number ? parseFloat(w.number.replace(/,/g, "")) : 0,
|
|
@@ -411,15 +411,15 @@ const ne = /* @__PURE__ */ j({
|
|
|
411
411
|
(t.thousand === !0 || typeof t.thousand > "u" && n.value.thousandFlag) && (S = a(Number(S)));
|
|
412
412
|
const p = s(`${u.prefix}${S}${u.append}`);
|
|
413
413
|
n.value.value = p.value, n.value.number = p.number, n.value.negativeFlag = !!p.negative, n.value.integer = p.integer, n.value.decimalFull = p.decimalFull, n.value.decimal = p.decimal, n.value.decimalDecimal = p.decimal.length;
|
|
414
|
-
}).start(),
|
|
414
|
+
}).start(), h();
|
|
415
415
|
}
|
|
416
416
|
return m(() => {
|
|
417
417
|
d(0, t.value);
|
|
418
|
-
}), N(() => t.value, (o,
|
|
419
|
-
|
|
418
|
+
}), N(() => t.value, (o, f) => {
|
|
419
|
+
f !== o && d(f, o);
|
|
420
420
|
}), q(() => {
|
|
421
421
|
l();
|
|
422
|
-
}), (o,
|
|
422
|
+
}), (o, f) => !v(i).default && (t.class || t.style) ? (C(), z("span", {
|
|
423
423
|
key: 0,
|
|
424
424
|
class: F(t.class),
|
|
425
425
|
style: M(t.style)
|
|
@@ -438,7 +438,7 @@ const ne = /* @__PURE__ */ j({
|
|
|
438
438
|
k(P(v(n).value), 1)
|
|
439
439
|
], !0);
|
|
440
440
|
}
|
|
441
|
-
}), D = /* @__PURE__ */ H(ne, [["__scopeId", "data-v-
|
|
441
|
+
}), D = /* @__PURE__ */ H(ne, [["__scopeId", "data-v-3243bcbd"]]), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
442
442
|
__proto__: null,
|
|
443
443
|
ZfTweenNumber: D,
|
|
444
444
|
default: D
|