dform-designer 0.7.0 → 0.7.2
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/form/FormDesign.umd.js +264 -0
- package/dist/form/form/designer.style.css +1 -0
- package/dist/plug/SetpPlug.umd.js +1 -0
- package/dist/plug/plug/plug.style.css +1 -0
- package/package.json +7 -10
- package/dist/designer.es.js +0 -48074
- package/dist/designer.style.css +0 -1
- package/dist/index-AbsZswzx.js +0 -108
- package/dist/plug.es.js +0 -10
package/dist/index-AbsZswzx.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
var B = Object.defineProperty;
|
|
2
|
-
var b = (s, t, e) => t in s ? B(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
-
var d = (s, t, e) => b(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { defineComponent as N, computed as h, resolveComponent as x, openBlock as l, createElementBlock as u, Fragment as w, renderList as I, createElementVNode as p, normalizeStyle as S, toDisplayString as f, renderSlot as T, createVNode as q, withCtx as E, createCommentVNode as M } from "vue";
|
|
5
|
-
const D = (s, t) => {
|
|
6
|
-
const e = s.__vccOpts || s;
|
|
7
|
-
for (const [a, m] of t)
|
|
8
|
-
e[a] = m;
|
|
9
|
-
return e;
|
|
10
|
-
}, P = (s, t) => (s.install = (e) => {
|
|
11
|
-
for (const a of [s, ...Object.values({})])
|
|
12
|
-
e.component(a.name, a);
|
|
13
|
-
}, s), V = BigInt(16224768e5), C = 5n, k = 5n, _ = 12n, z = -1n ^ -1n << C, A = -1n ^ -1n << k, O = _ + C + k, R = _ + k, j = _, F = -1n ^ -1n << _;
|
|
14
|
-
class L {
|
|
15
|
-
// 构造函数,接受数据中心 ID 和工作节点 ID 作为参数,同时初始化上一次的时间戳和序列号
|
|
16
|
-
constructor(t, e) {
|
|
17
|
-
d(this, "dataCenterId");
|
|
18
|
-
d(this, "workerId");
|
|
19
|
-
d(this, "lastTimestamp");
|
|
20
|
-
d(this, "sequence");
|
|
21
|
-
if (t < 0n || t > z)
|
|
22
|
-
throw new Error("data center id is out of range");
|
|
23
|
-
if (e < 0n || e > A)
|
|
24
|
-
throw new Error("worker id is out of range");
|
|
25
|
-
this.dataCenterId = t, this.workerId = e, this.lastTimestamp = -1n, this.sequence = 0n;
|
|
26
|
-
}
|
|
27
|
-
// 生成 ID 的方法,返回一个 BigInt 类型的 ID
|
|
28
|
-
nextId() {
|
|
29
|
-
let t = BigInt(Date.now());
|
|
30
|
-
if (t < this.lastTimestamp)
|
|
31
|
-
throw new Error("clock moved backwards");
|
|
32
|
-
return t === this.lastTimestamp ? (this.sequence = this.sequence + 1n & F, this.sequence === 0n && (t = this.waitNextMillisecond(t))) : this.sequence = 0n, this.lastTimestamp = t, (t - V << O) + (this.dataCenterId << R) + (this.workerId << j) + this.sequence;
|
|
33
|
-
}
|
|
34
|
-
// 等待下一毫秒的方法,返回一个 BigInt 类型的时间戳
|
|
35
|
-
waitNextMillisecond(t) {
|
|
36
|
-
for (; t <= this.lastTimestamp; )
|
|
37
|
-
t = BigInt(Date.now());
|
|
38
|
-
return t;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const Y = new L(1n, 1n), W = {
|
|
42
|
-
class: "setp-box"
|
|
43
|
-
}, $ = {
|
|
44
|
-
class: "item-box"
|
|
45
|
-
}, G = {
|
|
46
|
-
class: "title-txt"
|
|
47
|
-
}, H = {
|
|
48
|
-
class: "item-content"
|
|
49
|
-
}, J = {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: "link-box"
|
|
52
|
-
}, K = /* @__PURE__ */ N({
|
|
53
|
-
name: "SetpPlug",
|
|
54
|
-
__name: "index",
|
|
55
|
-
props: {
|
|
56
|
-
attr: {},
|
|
57
|
-
data: {}
|
|
58
|
-
},
|
|
59
|
-
setup(s) {
|
|
60
|
-
const t = s, e = h(() => {
|
|
61
|
-
var n, o;
|
|
62
|
-
return ((o = (n = t.attr) == null ? void 0 : n.props) == null ? void 0 : o.title) || "title";
|
|
63
|
-
}), a = h(() => {
|
|
64
|
-
var n, o;
|
|
65
|
-
return ((o = (n = t.attr) == null ? void 0 : n.props) == null ? void 0 : o.state) || "status";
|
|
66
|
-
}), m = h(() => {
|
|
67
|
-
var o, i, c;
|
|
68
|
-
const n = (i = (o = t.attr) == null ? void 0 : o.columns) == null ? void 0 : i.find((r) => r.prop === a.value);
|
|
69
|
-
return new Map(((c = n == null ? void 0 : n.enum) == null ? void 0 : c.map((r) => [r.value, r.color])) || []);
|
|
70
|
-
}), y = h(() => {
|
|
71
|
-
var n, o;
|
|
72
|
-
return ((o = (n = t.attr) == null ? void 0 : n.columns) == null ? void 0 : o.filter((i) => {
|
|
73
|
-
const c = i.columnName ?? i.prop;
|
|
74
|
-
return c && c !== e.value && c !== a.value;
|
|
75
|
-
})) || [];
|
|
76
|
-
});
|
|
77
|
-
return (n, o) => {
|
|
78
|
-
const i = x("ArrowRight"), c = x("el-icon");
|
|
79
|
-
return l(), u("div", W, [(l(!0), u(w, null, I(n.data, (r, g) => (l(), u(w, {
|
|
80
|
-
key: r.id || g
|
|
81
|
-
}, [p("div", $, [p("div", {
|
|
82
|
-
class: "title-box",
|
|
83
|
-
style: S({
|
|
84
|
-
background: m.value.get(r[a.value])
|
|
85
|
-
})
|
|
86
|
-
}, [p("span", G, f(r[e.value]), 1)], 4), p("div", {
|
|
87
|
-
class: "item-state mg",
|
|
88
|
-
style: S({
|
|
89
|
-
color: m.value.get(r[a.value])
|
|
90
|
-
})
|
|
91
|
-
}, f(r[a.value]), 5), p("div", H, [(l(!0), u(w, null, I(y.value, (v) => (l(), u("div", {
|
|
92
|
-
key: v.prop,
|
|
93
|
-
class: "mg"
|
|
94
|
-
}, f(r[v.prop || v.columnName]), 1))), 128))])]), g < n.data.length - 1 ? (l(), u("div", J, [T(n.$slots, "link-icon", {}, () => [q(c, {
|
|
95
|
-
size: "16"
|
|
96
|
-
}, {
|
|
97
|
-
default: E(() => [q(i)]),
|
|
98
|
-
_: 1
|
|
99
|
-
})], !0)])) : M("", !0)], 64))), 128))]);
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}), Q = /* @__PURE__ */ D(K, [["__scopeId", "data-v-25c33124"]]), Z = P(Q);
|
|
103
|
-
export {
|
|
104
|
-
Z as S,
|
|
105
|
-
D as _,
|
|
106
|
-
Y as s,
|
|
107
|
-
P as u
|
|
108
|
-
};
|