dform-designer 2.2.5 → 2.2.7
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.es.js +40422 -40256
- package/dist/form/designer.style.css +1 -1
- package/dist/plug/SetpPlug.es.js +34 -36
- package/dist/plug/plug.style.css +1 -1
- package/package.json +1 -1
package/dist/plug/SetpPlug.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Q = Object.defineProperty;
|
|
2
2
|
var Z = (e, n, r) => n in e ? Q(e, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[n] = r;
|
|
3
3
|
var T = (e, n, r) => Z(e, typeof n != "symbol" ? n + "" : n, r);
|
|
4
|
-
import { defineComponent as P, createVNode as D, Fragment as A, h as
|
|
4
|
+
import { defineComponent as P, createVNode as D, Fragment as A, h as f, nextTick as G, computed as I, inject as K, resolveComponent as V, openBlock as N, createElementBlock as C, renderList as B, createElementVNode as j, normalizeStyle as Y, unref as q, toDisplayString as X, createTextVNode as ee, renderSlot as te, withCtx as ne, createCommentVNode as re } from "vue";
|
|
5
5
|
import { ElTag as ae, ElImage as F, ElIcon as L } from "element-plus";
|
|
6
6
|
import { Download as H } from "@element-plus/icons-vue";
|
|
7
7
|
const oe = (e, n) => (e.install = (r) => {
|
|
@@ -85,7 +85,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
85
85
|
}, o = () => {
|
|
86
86
|
var t, a, d, i, x, p, u, h, b;
|
|
87
87
|
if (e.value === null || e.value === void 0 || e.value === "")
|
|
88
|
-
return e.showNull ?
|
|
88
|
+
return e.showNull ? f("div", {
|
|
89
89
|
class: "no-txt"
|
|
90
90
|
}) : null;
|
|
91
91
|
if (["Radio", "Checkbox", "Select"].includes(e.type))
|
|
@@ -102,7 +102,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
102
102
|
}
|
|
103
103
|
return l(e.value);
|
|
104
104
|
case "Editor":
|
|
105
|
-
return
|
|
105
|
+
return f("div", {
|
|
106
106
|
innerHTML: e.value || "",
|
|
107
107
|
style: {
|
|
108
108
|
maxHeight: "220px",
|
|
@@ -119,7 +119,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
119
119
|
case "SubTable":
|
|
120
120
|
return e.row[`${e.columnName}_ct`];
|
|
121
121
|
case "Related":
|
|
122
|
-
return
|
|
122
|
+
return m(e);
|
|
123
123
|
case "Formula":
|
|
124
124
|
return ye(e.value, e == null ? void 0 : e.attr);
|
|
125
125
|
case "Region":
|
|
@@ -149,7 +149,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
149
149
|
}, v = (t) => {
|
|
150
150
|
const a = [t.district, t.address, t.name].filter(Boolean);
|
|
151
151
|
return a.length ? a.join("") : "";
|
|
152
|
-
},
|
|
152
|
+
}, m = (t) => {
|
|
153
153
|
var a;
|
|
154
154
|
return t.row[`${t.columnName}_related`] ? t.row[`${t.columnName}_related`] : (a = t.row[`${t.columnName}_related_data`]) == null ? void 0 : a.map((d) => {
|
|
155
155
|
var i;
|
|
@@ -159,7 +159,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
159
159
|
var d, i, x, p, u;
|
|
160
160
|
let a = "";
|
|
161
161
|
return (d = t.attr.props) != null && d.showPassword ? a = a + "********" : ((i = t.attr) != null && i.prefix && (a = a + ((x = t.attr) == null ? void 0 : x.prefix)), a = a + t.value, (p = t.attr) != null && p.suffix && (a = a + ((u = t.attr) == null ? void 0 : u.suffix))), a;
|
|
162
|
-
}, S = (t, a) => Array.isArray(t) ? t.filter(Boolean).join(a) : t || "", s = (t) =>
|
|
162
|
+
}, S = (t, a) => Array.isArray(t) ? t.filter(Boolean).join(a) : t || "", s = (t) => f(F, {
|
|
163
163
|
style: {
|
|
164
164
|
height: "80px"
|
|
165
165
|
},
|
|
@@ -194,13 +194,13 @@ const ge = /* @__PURE__ */ P({
|
|
|
194
194
|
name: t.name || ""
|
|
195
195
|
}] : []).map((u, h) => {
|
|
196
196
|
const b = a(u.url), k = u.name || `image_${h + 1}.${b}`;
|
|
197
|
-
return i(u.url) ?
|
|
197
|
+
return i(u.url) ? f("div", {
|
|
198
198
|
class: "thumbnail-item image-item",
|
|
199
199
|
key: `thumb-${h}`
|
|
200
|
-
}, [
|
|
200
|
+
}, [f("div", {
|
|
201
201
|
class: "image-wrapper"
|
|
202
202
|
}, [
|
|
203
|
-
|
|
203
|
+
f(F, {
|
|
204
204
|
class: "preview-image",
|
|
205
205
|
style: {
|
|
206
206
|
height: "80px",
|
|
@@ -227,33 +227,33 @@ const ge = /* @__PURE__ */ P({
|
|
|
227
227
|
}
|
|
228
228
|
}),
|
|
229
229
|
// 下载按钮受控
|
|
230
|
-
e.download !== !1 &&
|
|
230
|
+
e.download !== !1 && f("div", {
|
|
231
231
|
class: "image-overlay",
|
|
232
232
|
onMouseenter: (y) => y.currentTarget.style.opacity = "1",
|
|
233
233
|
onMouseleave: (y) => y.currentTarget.style.opacity = "0"
|
|
234
|
-
}, [
|
|
234
|
+
}, [f("div", {
|
|
235
235
|
class: "download-btn",
|
|
236
236
|
onClick: async (y) => {
|
|
237
237
|
y.stopPropagation(), await d(u.url, k);
|
|
238
238
|
}
|
|
239
|
-
}, [
|
|
239
|
+
}, [f(L, {
|
|
240
240
|
class: "download-icon"
|
|
241
|
-
}, [
|
|
242
|
-
])]) :
|
|
241
|
+
}, [f(H)])])])
|
|
242
|
+
])]) : f("div", {
|
|
243
243
|
class: "thumbnail-item file-item",
|
|
244
244
|
key: `file-${h}`
|
|
245
245
|
}, [
|
|
246
|
-
|
|
246
|
+
f("span", {
|
|
247
247
|
class: "file-name"
|
|
248
248
|
}, u.name || "未命名文件"),
|
|
249
249
|
// 文件下载按钮受控
|
|
250
|
-
e.download !== !1 &&
|
|
250
|
+
e.download !== !1 && f(L, {
|
|
251
251
|
class: "file-download-btn",
|
|
252
252
|
onClick: async () => await d(u.url, k)
|
|
253
|
-
}, [
|
|
253
|
+
}, [f(H)])
|
|
254
254
|
]);
|
|
255
255
|
});
|
|
256
|
-
return
|
|
256
|
+
return f("div", {
|
|
257
257
|
class: "upload-preview"
|
|
258
258
|
}, p);
|
|
259
259
|
}, w = () => {
|
|
@@ -264,7 +264,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
264
264
|
const d = ((i = e.enum) == null ? void 0 : i.find((x) => String(x.value) === String(a))) || {
|
|
265
265
|
label: String(a)
|
|
266
266
|
};
|
|
267
|
-
return
|
|
267
|
+
return f(ae, {
|
|
268
268
|
class: "tagClass",
|
|
269
269
|
round: !0,
|
|
270
270
|
color: e.isColor ? d.color : void 0,
|
|
@@ -297,8 +297,8 @@ function we(e, n) {
|
|
|
297
297
|
o = n;
|
|
298
298
|
else if (typeof n == "string")
|
|
299
299
|
if (/^\d{1,2}:\d{2}(:\d{2})?$/.test(n)) {
|
|
300
|
-
const c = /* @__PURE__ */ new Date(), [v,
|
|
301
|
-
o = new Date(c.getFullYear(), c.getMonth(), c.getDate(), v,
|
|
300
|
+
const c = /* @__PURE__ */ new Date(), [v, m, g] = n.split(":").map(Number);
|
|
301
|
+
o = new Date(c.getFullYear(), c.getMonth(), c.getDate(), v, m, g || 0);
|
|
302
302
|
} else
|
|
303
303
|
o = new Date(n), isNaN(o.getTime()) && (o = /* @__PURE__ */ new Date());
|
|
304
304
|
else
|
|
@@ -338,15 +338,15 @@ function z(e) {
|
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
const ye = (e, n) => {
|
|
341
|
-
var o, c, v,
|
|
341
|
+
var o, c, v, m, g, S;
|
|
342
342
|
let r = e;
|
|
343
|
-
return ((o = n == null ? void 0 : n.config) == null ? void 0 : o.prepend) === "prefix" && (r = ((c = n == null ? void 0 : n.config) == null ? void 0 : c.unit) || "" + r), ((v = n == null ? void 0 : n.config) == null ? void 0 : v.format) === "subtract" && (r = ve(e, (
|
|
343
|
+
return ((o = n == null ? void 0 : n.config) == null ? void 0 : o.prepend) === "prefix" && (r = ((c = n == null ? void 0 : n.config) == null ? void 0 : c.unit) || "" + r), ((v = n == null ? void 0 : n.config) == null ? void 0 : v.format) === "subtract" && (r = ve(e, (m = n == null ? void 0 : n.subtract) == null ? void 0 : m.format)), ((g = n == null ? void 0 : n.config) == null ? void 0 : g.prepend) === "suffix" && (r = r + ((S = n == null ? void 0 : n.config) == null ? void 0 : S.unit) || ""), r;
|
|
344
344
|
}, ve = (e, n = "YYYY-MM-DD HH:mm:ss") => {
|
|
345
345
|
if (!e) return "";
|
|
346
346
|
const r = new Date(Number(e));
|
|
347
347
|
if (isNaN(r.getTime())) return "";
|
|
348
|
-
const o = r.getFullYear(), c = String(r.getMonth() + 1).padStart(2, "0"), v = String(r.getDate()).padStart(2, "0"),
|
|
349
|
-
return n.replace("YYYY", String(o)).replace("MM", c).replace("DD", v).replace("HH",
|
|
348
|
+
const o = r.getFullYear(), c = String(r.getMonth() + 1).padStart(2, "0"), v = String(r.getDate()).padStart(2, "0"), m = String(r.getHours()).padStart(2, "0"), g = String(r.getMinutes()).padStart(2, "0"), S = String(r.getSeconds()).padStart(2, "0");
|
|
349
|
+
return n.replace("YYYY", String(o)).replace("MM", c).replace("DD", v).replace("HH", m).replace("mm", g).replace("ss", S);
|
|
350
350
|
}, Se = (e) => {
|
|
351
351
|
const n = (r) => r.includes("_") ? r.split("_")[0] : r;
|
|
352
352
|
if (e) {
|
|
@@ -391,12 +391,10 @@ const ye = (e, n) => {
|
|
|
391
391
|
const t = w.columnName ?? w.prop;
|
|
392
392
|
return t && t !== r.value && t !== o.value;
|
|
393
393
|
})) || [];
|
|
394
|
-
}),
|
|
394
|
+
}), m = I(() => {
|
|
395
395
|
var s, l;
|
|
396
396
|
return (l = (s = n.attr) == null ? void 0 : s.columns) == null ? void 0 : l.find((w) => w.prop === r.value);
|
|
397
|
-
})
|
|
398
|
-
console.log(f.value);
|
|
399
|
-
const g = (s) => c.value.find((w) => w.value === s) || {
|
|
397
|
+
}), g = (s) => c.value.find((w) => w.value === s) || {
|
|
400
398
|
color: "#909399",
|
|
401
399
|
label: ""
|
|
402
400
|
}, S = K("TableCellRenderer", ge);
|
|
@@ -410,13 +408,13 @@ const ye = (e, n) => {
|
|
|
410
408
|
background: g(a[o.value]).color
|
|
411
409
|
})
|
|
412
410
|
}, [j("span", _e, [D(q(S), {
|
|
413
|
-
attr:
|
|
414
|
-
type:
|
|
415
|
-
value: a[
|
|
416
|
-
enum:
|
|
417
|
-
"is-color":
|
|
411
|
+
attr: m.value,
|
|
412
|
+
type: m.value.type,
|
|
413
|
+
value: a[m.value.prop],
|
|
414
|
+
enum: m.value.enum,
|
|
415
|
+
"is-color": m.value.isColor,
|
|
418
416
|
row: a,
|
|
419
|
-
"column-name":
|
|
417
|
+
"column-name": m.value.prop,
|
|
420
418
|
showNull: !1
|
|
421
419
|
}, null, 8, ["attr", "type", "value", "enum", "is-color", "row", "column-name"])])], 4), j("div", {
|
|
422
420
|
class: "item-state mg",
|
|
@@ -448,7 +446,7 @@ const ye = (e, n) => {
|
|
|
448
446
|
for (const [o, c] of n)
|
|
449
447
|
r[o] = c;
|
|
450
448
|
return r;
|
|
451
|
-
}, Ce = /* @__PURE__ */ Ne(ke, [["__scopeId", "data-v-
|
|
449
|
+
}, Ce = /* @__PURE__ */ Ne(ke, [["__scopeId", "data-v-c1be2763"]]), R = oe(Ce), Te = (e) => {
|
|
452
450
|
e.component(R.name, R);
|
|
453
451
|
}, $e = {
|
|
454
452
|
install: Te,
|
package/dist/plug/plug.style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";body[data-v-
|
|
1
|
+
@charset "UTF-8";body[data-v-c1be2763]{height:100%;margin:0!important;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Segoe UI,Helvetica Neue,Helvetica,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}html[data-v-c1be2763],#app[data-v-c1be2763]{height:100%}[data-v-c1be2763],[data-v-c1be2763]:before,[data-v-c1be2763]:after{box-sizing:border-box}a[data-v-c1be2763],a[data-v-c1be2763]:focus,a[data-v-c1be2763]:hover{color:inherit;text-decoration:none;outline:none}div[data-v-c1be2763]:focus{outline:none}.clearfix[data-v-c1be2763]:after{display:table;clear:both;content:""}.text-center[data-v-c1be2763]{text-align:center}.no-padding[data-v-c1be2763]{padding:0!important}.flx-center[data-v-c1be2763]{display:flex;align-items:center;justify-content:center}.flx-justify-between[data-v-c1be2763]{display:flex;align-items:center;justify-content:space-between}.flx-align-center[data-v-c1be2763]{display:flex;align-items:center}.clearfix-after[data-v-c1be2763]{display:block;height:0;overflow:hidden;clear:both;content:""}.sle[data-v-c1be2763]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mle[data-v-c1be2763]{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.break-word[data-v-c1be2763]{word-break:break-all;word-wrap:break-word}[data-v-c1be2763]::-webkit-scrollbar{width:8px;height:8px}[data-v-c1be2763]::-webkit-scrollbar-thumb{background-color:#d3d3d3;border-radius:20px;box-shadow:inset 0 0 #fff}#nprogress .bar[data-v-c1be2763]{background:var(--df-color-primary)!important}#nprogress .spinner-icon[data-v-c1be2763]{border-top-color:var(--df-color-primary)!important;border-left-color:var(--df-color-primary)!important}#nprogress .peg[data-v-c1be2763]{box-shadow:0 0 10px var(--df-color-primary),0 0 5px var(--df-color-primary)!important}.main-maximize .aside-split[data-v-c1be2763],.main-maximize .df-aside[data-v-c1be2763],.main-maximize .df-header[data-v-c1be2763],.main-maximize .df-footer[data-v-c1be2763],.main-maximize .tabs-nav[data-v-c1be2763]{display:none!important}.antd-message[data-v-c1be2763]{padding:10px 13px!important;background:#fff!important;border-width:0!important;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d!important}.antd-message.df-message.is-closable .df-message__content[data-v-c1be2763]{padding-right:17px!important}.antd-message .df-message__content[data-v-c1be2763]{color:#000000d9!important;pointer-events:all!important;background-image:initial!important}.antd-message .df-message__icon[data-v-c1be2763]{margin-right:8px!important}.antd-message .df-message__closeBtn[data-v-c1be2763]{right:9px!important;border-radius:4px;outline:none;transition:background-color .2s,color .2s}.antd-message .df-message__closeBtn[data-v-c1be2763]:hover{background-color:#0000000f}.card[data-v-c1be2763]{box-sizing:border-box;padding:20px;overflow-x:hidden;background-color:var(--df-fill-color-blank);border:1px solid var(--df-border-color-light);border-radius:4px;box-shadow:0 0 12px #0000000d}.theme-color-hover[data-v-c1be2763]:hover{color:var(--df-color-primary)}.df-drawer .df-drawer__header[data-v-c1be2763]{padding:15px 20px 14px;margin-bottom:0;border-bottom:1px solid var(--df-border-color-lighter)}.df-drawer .df-drawer__footer[data-v-c1be2763]{border-top:1px solid var(--df-border-color-lighter)}.df-drawer .df-select[data-v-c1be2763]{width:100%}.df-drawer .drawer-multiColumn-form[data-v-c1be2763]{display:flex;flex-wrap:wrap}.df-drawer .drawer-multiColumn-form .df-form-item[data-v-c1be2763]{width:47%}.df-drawer .drawer-multiColumn-form .df-form-item[data-v-c1be2763]:nth-child(2n-1){margin-right:5%}.df-dialog .df-dialog__header[data-v-c1be2763]{border-bottom:1px solid var(--df-border-color-lighter)}.df-dialog .df-dialog__body[data-v-c1be2763]{padding-top:15px}.df-dialog .df-dialog__footer[data-v-c1be2763]{border-top:1px solid var(--df-border-color-lighter)}.m-5[data-v-c1be2763]{margin:5px}.mt-5[data-v-c1be2763]{margin-top:5px}.mb-5[data-v-c1be2763]{margin-bottom:5px}.ml-5[data-v-c1be2763]{margin-left:5px}.mr-5[data-v-c1be2763]{margin-right:5px}.p-5[data-v-c1be2763]{padding:5px}.pt-5[data-v-c1be2763]{padding-top:5px}.pb-5[data-v-c1be2763]{padding-bottom:5px}.pl-5[data-v-c1be2763]{padding-left:5px}.pr-5[data-v-c1be2763]{padding-right:5px}.m-10[data-v-c1be2763]{margin:10px}.mt-10[data-v-c1be2763]{margin-top:10px}.mb-10[data-v-c1be2763]{margin-bottom:10px}.ml-10[data-v-c1be2763]{margin-left:10px}.mr-10[data-v-c1be2763]{margin-right:10px}.p-10[data-v-c1be2763]{padding:10px}.pt-10[data-v-c1be2763]{padding-top:10px}.pb-10[data-v-c1be2763]{padding-bottom:10px}.pl-10[data-v-c1be2763]{padding-left:10px}.pr-10[data-v-c1be2763]{padding-right:10px}.m-15[data-v-c1be2763]{margin:15px}.mt-15[data-v-c1be2763]{margin-top:15px}.mb-15[data-v-c1be2763]{margin-bottom:15px}.ml-15[data-v-c1be2763]{margin-left:15px}.mr-15[data-v-c1be2763]{margin-right:15px}.p-15[data-v-c1be2763]{padding:15px}.pt-15[data-v-c1be2763]{padding-top:15px}.pb-15[data-v-c1be2763]{padding-bottom:15px}.pl-15[data-v-c1be2763]{padding-left:15px}.pr-15[data-v-c1be2763]{padding-right:15px}.m-20[data-v-c1be2763]{margin:20px}.mt-20[data-v-c1be2763]{margin-top:20px}.mb-20[data-v-c1be2763]{margin-bottom:20px}.ml-20[data-v-c1be2763]{margin-left:20px}.mr-20[data-v-c1be2763]{margin-right:20px}.p-20[data-v-c1be2763]{padding:20px}.pt-20[data-v-c1be2763]{padding-top:20px}.pb-20[data-v-c1be2763]{padding-bottom:20px}.pl-20[data-v-c1be2763]{padding-left:20px}.pr-20[data-v-c1be2763]{padding-right:20px}.m-25[data-v-c1be2763]{margin:25px}.mt-25[data-v-c1be2763]{margin-top:25px}.mb-25[data-v-c1be2763]{margin-bottom:25px}.ml-25[data-v-c1be2763]{margin-left:25px}.mr-25[data-v-c1be2763]{margin-right:25px}.p-25[data-v-c1be2763]{padding:25px}.pt-25[data-v-c1be2763]{padding-top:25px}.pb-25[data-v-c1be2763]{padding-bottom:25px}.pl-25[data-v-c1be2763]{padding-left:25px}.pr-25[data-v-c1be2763]{padding-right:25px}.m-30[data-v-c1be2763]{margin:30px}.mt-30[data-v-c1be2763]{margin-top:30px}.mb-30[data-v-c1be2763]{margin-bottom:30px}.ml-30[data-v-c1be2763]{margin-left:30px}.mr-30[data-v-c1be2763]{margin-right:30px}.p-30[data-v-c1be2763]{padding:30px}.pt-30[data-v-c1be2763]{padding-top:30px}.pb-30[data-v-c1be2763]{padding-bottom:30px}.pl-30[data-v-c1be2763]{padding-left:30px}.pr-30[data-v-c1be2763]{padding-right:30px}.fz-14[data-v-c1be2763]{font-size:14px}.fz-15[data-v-c1be2763]{font-size:15px}.fz-16[data-v-c1be2763]{font-size:16px}.fz-17[data-v-c1be2763]{font-size:17px}.fz-18[data-v-c1be2763]{font-size:18px}.fz-19[data-v-c1be2763]{font-size:19px}.fz-20[data-v-c1be2763]{font-size:20px}.fz-21[data-v-c1be2763]{font-size:21px}.fz-22[data-v-c1be2763]{font-size:22px}.fz-23[data-v-c1be2763]{font-size:23px}.fz-24[data-v-c1be2763]{font-size:24px}.mg[data-v-c1be2763]{text-align:left;margin:4px 0;white-space:nowrap;height:20px;line-height:20px}.setp-box[data-v-c1be2763]{display:flex;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.setp-box .item-box[data-v-c1be2763]{width:160px;background:#fff0;overflow:hidden;padding:6px 8px;flex-shrink:0}.setp-box .item-box .title-box[data-v-c1be2763]{height:32px;background:#ffd164;border-radius:16px;overflow:hidden;display:flex;align-items:center;justify-content:center}.setp-box .item-box .title-box .title-txt[data-v-c1be2763]{height:20px;font-weight:500;font-size:14px;color:#fff;line-height:20px;overflow:hidden}.setp-box .item-box .item-state[data-v-c1be2763]{height:20px;font-weight:400;font-size:14px;color:#ffd164;line-height:20px;text-align:center;overflow:hidden}.setp-box .item-box .item-content[data-v-c1be2763]{display:flex;max-height:115px;overflow-y:auto;overflow-x:hidden;flex-direction:column;align-items:center;font-weight:400;font-size:14px;color:#5c5f66;line-height:20px}.setp-box .link-box[data-v-c1be2763]{margin-top:10px;width:16px;height:16px;color:#919191}
|