epic-designer-gold 1.0.33 → 1.0.34
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/{attributeView-BF8AFFq3.cjs → attributeView-cV9JcdL1.cjs} +1 -1
- package/dist/{attributeView-BAtvUAhV.js → attributeView-tdOSR9MO.js} +1 -1
- package/dist/{index-BwHmwZ5G.cjs → index--gqcMvxJ.cjs} +1 -1
- package/dist/{index-Cecp9t8s.js → index-B9pkOv4t.js} +1 -1
- package/dist/{index-DExGgrX9.cjs → index-BDF5_G5f.cjs} +1 -1
- package/dist/{index-DI-E5Cpq.js → index-BEyLpsim.js} +1 -1
- package/dist/{index-DYU07eGb.cjs → index-BKdKkCt6.cjs} +1 -1
- package/dist/{index-CHYKgo9A.cjs → index-BRDkOUYS.cjs} +1 -1
- package/dist/{index-CFChTrwc.cjs → index-BUITcTmI.cjs} +1 -1
- package/dist/{index-natF7VzY.js → index-C4dEBxvF.js} +1 -1
- package/dist/{index-sFE9uQIP.js → index-C8ReU6Xc.js} +96 -96
- package/dist/{index-lf6yCev-.cjs → index-C9q_Wa8V.cjs} +1 -1
- package/dist/{index-CFHEVgng.cjs → index-CRsrNl6B.cjs} +1 -1
- package/dist/index-CYD9fvY1.js +4 -0
- package/dist/{index-Xnqspbxj.js → index-C_vstFad.js} +1 -1
- package/dist/{index-ClgIpXW0.cjs → index-CsW4QbS7.cjs} +1 -1
- package/dist/{index-UpNznhhe.js → index-Cv3nKoEL.js} +1 -1
- package/dist/{index-K9w-efBB.cjs → index-DFhtJ9Co.cjs} +1 -1
- package/dist/index-DJDwPJHn.cjs +10 -0
- package/dist/{index-Di9sEDRc.cjs → index-DKt-n7Pv.cjs} +1 -1
- package/dist/{index-D2n96wxz.js → index-DM3RLWza.js} +1 -1
- package/dist/{index-Bxdmlmwu.cjs → index-DmY8tL_f.cjs} +1 -1
- package/dist/{index-CT056ccv.js → index-Do-zTF8W.js} +1 -1
- package/dist/{index-CrVn9CfT.js → index-jRFvV869.js} +1 -1
- package/dist/{index-CLeSXOVj.js → index-p8GEir2h.js} +1 -1
- package/dist/{index-C5yUsiJH.js → index-tkciUDvZ.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-oSuNX97o.js → styleView-BreyVWSd.js} +1 -1
- package/dist/{styleView-DAskd_e3.cjs → styleView-CTqq3Ctg.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-B_ZNp-FD.cjs +0 -10
- package/dist/index-Dp0hJSh5.js +0 -4
|
@@ -95,7 +95,7 @@ function ze() {
|
|
|
95
95
|
console.error(`[Epic:组件${p.componentId}函数(${p.methodName})]执行异常:`, P);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function S(p = !0) {
|
|
99
99
|
o.value = p;
|
|
100
100
|
}
|
|
101
101
|
function g(p) {
|
|
@@ -131,7 +131,7 @@ function ze() {
|
|
|
131
131
|
removeComponentInstance: i,
|
|
132
132
|
setMethods: w,
|
|
133
133
|
doActions: _,
|
|
134
|
-
setDesignMode:
|
|
134
|
+
setDesignMode: S,
|
|
135
135
|
setDefaultComponentIds: g
|
|
136
136
|
};
|
|
137
137
|
}
|
|
@@ -216,10 +216,10 @@ const ft = /* @__PURE__ */ fe({
|
|
|
216
216
|
const w = se("slots", {}), A = se("pageManager", {}), _ = se("disabled", { value: !1 }), m = se("ruleFieldPrefix", null), N = se("resetFormData", !1);
|
|
217
217
|
let t = de(ne(a.componentSchema));
|
|
218
218
|
p();
|
|
219
|
-
async function
|
|
219
|
+
async function S(r) {
|
|
220
220
|
try {
|
|
221
221
|
o.value = !0, s.value = "正在识别中...请稍等";
|
|
222
|
-
const
|
|
222
|
+
const b = {
|
|
223
223
|
url: r.callBackUrl,
|
|
224
224
|
headers: {
|
|
225
225
|
Authorization: "Bearer " + j.get("Admin-Token"),
|
|
@@ -227,20 +227,20 @@ const ft = /* @__PURE__ */ fe({
|
|
|
227
227
|
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
228
228
|
}
|
|
229
229
|
}, R = (r.callBackMethod || "").toLowerCase(), O = { [r.callBackField]: r.url.join(",") };
|
|
230
|
-
R === "get" ? (
|
|
231
|
-
let U = await ve(
|
|
230
|
+
R === "get" ? (b.method = "get", b.params = O) : (b.method = R || "post", b.data = O);
|
|
231
|
+
let U = await ve(b), f = {};
|
|
232
232
|
r.callBackDataPath ? f = r.callBackDataPath.split(".").reduce((G, Q) => G[Q], U.data) : f = U.data, r.validate && (r.validateParams.forEach((J) => {
|
|
233
233
|
i[J.value] = i.orcWarningInfo__copy_data[J.value];
|
|
234
234
|
}), i[r.field + "-orcWarningInfo"] = "", r.validateParams.forEach((J) => {
|
|
235
235
|
i[J.value] && f[J.value] !== i[J.value] && f[J.value] && (a.componentSchema.componentProps.validateStatus = !0, i[r.field + "-orcWarningInfo"] ? i[r.field + "-orcWarningInfo"] = i[r.field + "-orcWarningInfo"] + "," + J.label + "已从" + i[J.value] + "改为" + f[J.value] : i[r.field + "-orcWarningInfo"] = J.label + "已从" + i[J.value] + "改为" + f[J.value]);
|
|
236
236
|
})), Object.assign(i, f);
|
|
237
|
-
} catch (
|
|
238
|
-
ct.error("OCR 识别回调处理失败:" +
|
|
237
|
+
} catch (b) {
|
|
238
|
+
ct.error("OCR 识别回调处理失败:" + b.message);
|
|
239
239
|
} finally {
|
|
240
240
|
o.value = !1, s.value = "加载中";
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
async function g({ value: r, field:
|
|
243
|
+
async function g({ value: r, field: b, fillDataSource: R, fillDataParams: O }) {
|
|
244
244
|
try {
|
|
245
245
|
o.value = !0;
|
|
246
246
|
const f = (await ve({
|
|
@@ -263,8 +263,8 @@ const ft = /* @__PURE__ */ fe({
|
|
|
263
263
|
data: f.body ? JSON.parse(f.body) : {},
|
|
264
264
|
params: f.params ? {
|
|
265
265
|
...JSON.parse(f.params),
|
|
266
|
-
[
|
|
267
|
-
} : { [
|
|
266
|
+
[b]: r
|
|
267
|
+
} : { [b]: r },
|
|
268
268
|
headers: {
|
|
269
269
|
...JSON.parse(f.headers),
|
|
270
270
|
Authorization: "Bearer " + j.get("Admin-Token"),
|
|
@@ -293,7 +293,7 @@ const ft = /* @__PURE__ */ fe({
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
async function D(r) {
|
|
296
|
-
if (["cascader", "checkbox", "select", "radio"].includes(r.type) && r.componentProps.dynamicId && a.sourceDateUrl) {
|
|
296
|
+
if (["cascader", "checkbox", "select", "radio", "ocr-select-page"].includes(r.type) && r.componentProps.dynamicId && a.sourceDateUrl) {
|
|
297
297
|
const O = (await ve({
|
|
298
298
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
299
299
|
url: a.sourceDateUrl,
|
|
@@ -332,13 +332,13 @@ const ft = /* @__PURE__ */ fe({
|
|
|
332
332
|
}
|
|
333
333
|
return r;
|
|
334
334
|
}
|
|
335
|
-
function M(r,
|
|
335
|
+
function M(r, b, R) {
|
|
336
336
|
return r && Object.prototype.toString.call(r) === "[object Array]" ? r.map((O) => O.children && O.children.length ? {
|
|
337
|
-
label: O[
|
|
337
|
+
label: O[b],
|
|
338
338
|
value: O[R] + "",
|
|
339
|
-
children: M(O.children,
|
|
339
|
+
children: M(O.children, b, R)
|
|
340
340
|
} : {
|
|
341
|
-
label: O[
|
|
341
|
+
label: O[b],
|
|
342
342
|
value: O[R] + ""
|
|
343
343
|
}) : [];
|
|
344
344
|
}
|
|
@@ -360,8 +360,8 @@ const ft = /* @__PURE__ */ fe({
|
|
|
360
360
|
}, H = Ze();
|
|
361
361
|
Object.keys(H).length && k("nodeAttrs", H);
|
|
362
362
|
const z = Re(null), I = ee(() => {
|
|
363
|
-
var r,
|
|
364
|
-
return (r = t.componentProps) != null && r.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((
|
|
363
|
+
var r, b;
|
|
364
|
+
return (r = t.componentProps) != null && r.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((b = t.show) == null ? void 0 : b.call(t, { values: i })) ?? !0;
|
|
365
365
|
}), l = ee(() => {
|
|
366
366
|
var O;
|
|
367
367
|
const r = I.value && ((O = t.rules) == null ? void 0 : O.map((U) => ({
|
|
@@ -369,20 +369,20 @@ const ft = /* @__PURE__ */ fe({
|
|
|
369
369
|
validator: U.validator && A.funcs.value[U.validator]
|
|
370
370
|
// 自定义校验函数
|
|
371
371
|
})));
|
|
372
|
-
let
|
|
373
|
-
a.ruleField ?
|
|
372
|
+
let b = t.field;
|
|
373
|
+
a.ruleField ? b = a.ruleField : m && t.field && (b = ne(m), b.push(t.field));
|
|
374
374
|
const R = {
|
|
375
375
|
...t,
|
|
376
376
|
rules: r,
|
|
377
377
|
rule: r,
|
|
378
|
-
field:
|
|
378
|
+
field: b
|
|
379
379
|
};
|
|
380
380
|
return R.children && delete R.children, R;
|
|
381
381
|
}), B = ee(() => {
|
|
382
382
|
var R, O, U;
|
|
383
|
-
const r = ((R = c.value) == null ? void 0 : R.bindModel) ?? "modelValue",
|
|
383
|
+
const r = ((R = c.value) == null ? void 0 : R.bindModel) ?? "modelValue", b = {};
|
|
384
384
|
return t.on && Object.keys(t.on).forEach((f) => {
|
|
385
|
-
|
|
385
|
+
b[`on${st(f)}`] = (...J) => A.doActions(t.on[f], ...J);
|
|
386
386
|
}), t.type === "selectpage" && (t.componentProps.defaultData = {
|
|
387
387
|
value: i[t.field],
|
|
388
388
|
label: i[i[t.field]]
|
|
@@ -393,7 +393,7 @@ const ft = /* @__PURE__ */ fe({
|
|
|
393
393
|
// 为了避免禁用对超链接输入框点击的影响
|
|
394
394
|
disabled: a.componentSchema.type === "input" && a.componentSchema.componentProps && ((O = a.componentSchema.componentProps) != null && O.isLink) ? !1 : (_ == null ? void 0 : _.value) || ((U = t.componentProps) == null ? void 0 : U.disabled),
|
|
395
395
|
bindModel: r,
|
|
396
|
-
...
|
|
396
|
+
...b
|
|
397
397
|
};
|
|
398
398
|
}), c = ee(() => q.getComponentConfingByType(t.type) ?? null);
|
|
399
399
|
Ee(() => {
|
|
@@ -411,17 +411,17 @@ const ft = /* @__PURE__ */ fe({
|
|
|
411
411
|
{ immediate: !0 }
|
|
412
412
|
);
|
|
413
413
|
function u() {
|
|
414
|
-
var
|
|
414
|
+
var b;
|
|
415
415
|
const r = $.value || d;
|
|
416
|
-
t != null && t.id && r && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (r.setValue = h, r.getValue = () => i[t.field] || a.modelValue), r.setAttr = (R, O) => (t.componentProps || (t.componentProps = {}), t.componentProps[R] = O), r.getAttr = (R) => t.componentProps[R], A.addComponentInstance(t == null ? void 0 : t.id, r), (
|
|
416
|
+
t != null && t.id && r && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (r.setValue = h, r.getValue = () => i[t.field] || a.modelValue), r.setAttr = (R, O) => (t.componentProps || (t.componentProps = {}), t.componentProps[R] = O), r.getAttr = (R) => t.componentProps[R], A.addComponentInstance(t == null ? void 0 : t.id, r), (b = c.value) != null && b.defaultSchema.input && t.noFormItem !== !0 && P.value && A.addComponentInstance((t == null ? void 0 : t.id) + "formItem", P.value));
|
|
417
417
|
}
|
|
418
418
|
function C() {
|
|
419
419
|
var r;
|
|
420
420
|
t.id && (A.removeComponentInstance(t == null ? void 0 : t.id), (r = c.value) != null && r.defaultSchema.input && t.noFormItem !== !0 && A.removeComponentInstance((t == null ? void 0 : t.id) + "formItem"));
|
|
421
421
|
}
|
|
422
422
|
async function V() {
|
|
423
|
-
var
|
|
424
|
-
if (t = await D(t), typeof ((
|
|
423
|
+
var b, R, O;
|
|
424
|
+
if (t = await D(t), typeof ((b = t.componentProps) == null ? void 0 : b.defaultValue) < "u") {
|
|
425
425
|
const U = A.isDesignMode.value ? (R = t.componentProps) == null ? void 0 : R.defaultValue : i[t.field] ?? ((O = t.componentProps) == null ? void 0 : O.defaultValue);
|
|
426
426
|
h(ne(U));
|
|
427
427
|
}
|
|
@@ -450,8 +450,8 @@ const ft = /* @__PURE__ */ fe({
|
|
|
450
450
|
r && (z.value = r);
|
|
451
451
|
}
|
|
452
452
|
function x(r) {
|
|
453
|
-
Object.prototype.toString.call(r) === "[object Array]" ? r.forEach((
|
|
454
|
-
i[
|
|
453
|
+
Object.prototype.toString.call(r) === "[object Array]" ? r.forEach((b) => {
|
|
454
|
+
i[b.value] = b.label;
|
|
455
455
|
}) : i[r.value] = r.label, a != null && a.id ? re.emit("updateformData" + (a == null ? void 0 : a.id), i) : re.emit("updateformData", i);
|
|
456
456
|
}
|
|
457
457
|
function h(r) {
|
|
@@ -464,7 +464,7 @@ const ft = /* @__PURE__ */ fe({
|
|
|
464
464
|
return K(
|
|
465
465
|
() => t,
|
|
466
466
|
async (r) => {
|
|
467
|
-
const
|
|
467
|
+
const b = JSON.stringify({
|
|
468
468
|
...r,
|
|
469
469
|
children: void 0,
|
|
470
470
|
componentProps: {
|
|
@@ -472,21 +472,21 @@ const ft = /* @__PURE__ */ fe({
|
|
|
472
472
|
options: null
|
|
473
473
|
}
|
|
474
474
|
});
|
|
475
|
-
if (
|
|
475
|
+
if (b === T)
|
|
476
476
|
return !1;
|
|
477
|
-
T =
|
|
477
|
+
T = b, V();
|
|
478
478
|
},
|
|
479
479
|
{
|
|
480
480
|
immediate: !0,
|
|
481
481
|
deep: !0
|
|
482
482
|
}
|
|
483
|
-
), Ue(C), (r,
|
|
483
|
+
), Ue(C), (r, b) => {
|
|
484
484
|
var O;
|
|
485
485
|
const R = Ge("ENode");
|
|
486
486
|
return Y(), ge(Te, null, [
|
|
487
487
|
o.value ? (Y(), ge("div", pt, [
|
|
488
488
|
te("div", mt, [
|
|
489
|
-
|
|
489
|
+
b[1] || (b[1] = Qe('<div class="epic-loading-wave" data-v-936adbeb><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div></div>', 1)),
|
|
490
490
|
te("span", ht, Ye(s.value), 1)
|
|
491
491
|
])
|
|
492
492
|
])) : Ne("", !0),
|
|
@@ -505,11 +505,11 @@ const ft = /* @__PURE__ */ fe({
|
|
|
505
505
|
sourceDateUrl: a.sourceDateUrl
|
|
506
506
|
}, { ...B.value }, {
|
|
507
507
|
[B.value.bindModel]: v.value,
|
|
508
|
-
["onUpdate:" + B.value.bindModel]:
|
|
508
|
+
["onUpdate:" + B.value.bindModel]: b[0] || (b[0] = (U) => v.value = U),
|
|
509
509
|
[`onUpdate:${B.value.bindModel}` || ""]: h,
|
|
510
510
|
"onUpdate:modelValueLabel": x,
|
|
511
511
|
"onUpdate:dynamicId": L,
|
|
512
|
-
"onUpdate:ocrData":
|
|
512
|
+
"onUpdate:ocrData": S,
|
|
513
513
|
"onUpdate:selectFillData": g
|
|
514
514
|
}), {
|
|
515
515
|
node: Z((U) => [
|
|
@@ -530,7 +530,7 @@ const ft = /* @__PURE__ */ fe({
|
|
|
530
530
|
], 64);
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
|
-
}), gt = /* @__PURE__ */ ut(vt, [["__scopeId", "data-v-
|
|
533
|
+
}), gt = /* @__PURE__ */ ut(vt, [["__scopeId", "data-v-936adbeb"]]);
|
|
534
534
|
function yt() {
|
|
535
535
|
const e = F(!1), n = ze(), o = F({});
|
|
536
536
|
function s() {
|
|
@@ -538,8 +538,8 @@ function yt() {
|
|
|
538
538
|
if (e.value)
|
|
539
539
|
t();
|
|
540
540
|
else {
|
|
541
|
-
const
|
|
542
|
-
|
|
541
|
+
const S = K(e, () => {
|
|
542
|
+
S(), t();
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
});
|
|
@@ -547,18 +547,18 @@ function yt() {
|
|
|
547
547
|
async function d(t = "default") {
|
|
548
548
|
var g;
|
|
549
549
|
await s();
|
|
550
|
-
const
|
|
551
|
-
if (!
|
|
552
|
-
return
|
|
550
|
+
const S = (g = o.value) == null ? void 0 : g[t];
|
|
551
|
+
if (!S) throw new Error(`表单 [name=${t}] 不存在`);
|
|
552
|
+
return S;
|
|
553
553
|
}
|
|
554
|
-
async function a(t,
|
|
554
|
+
async function a(t, S) {
|
|
555
555
|
const g = await d(t);
|
|
556
|
-
return ne(await
|
|
556
|
+
return ne(await S(g));
|
|
557
557
|
}
|
|
558
558
|
async function v(t = "default") {
|
|
559
|
-
return await a(t, (
|
|
559
|
+
return await a(t, (S) => S.getData());
|
|
560
560
|
}
|
|
561
|
-
function i(t,
|
|
561
|
+
function i(t, S = "default", g = void 0) {
|
|
562
562
|
var D, M;
|
|
563
563
|
if (g && Object.keys(g).length) {
|
|
564
564
|
let p = function(y) {
|
|
@@ -578,42 +578,42 @@ function yt() {
|
|
|
578
578
|
y[I].indexOf(";") === -1 && y[I].indexOf(";") === -1 ? y[I][y[I]] : y[I].indexOf(";") > -1 ? y[I] = y[I].split(";").map((T) => T.split(",")) : y[I].indexOf(";") === -1 ? y[I] = y[I].split(",") : y[I].indexOf(";") > -1 ? y[I] = y[I].split(";").map((T) => T.split(",")) : y[I].indexOf(";") === -1 && (y[I] = y[I].split(","));
|
|
579
579
|
else if (((l == null ? void 0 : l.type) === "upload-image" || (l == null ? void 0 : l.type) === "upload-file") && typeof y[I] == "string") {
|
|
580
580
|
let T = [];
|
|
581
|
-
Object.entries(y).forEach(([r,
|
|
582
|
-
y[I] ===
|
|
583
|
-
}), y[I] = y[I].split(",").map((r,
|
|
581
|
+
Object.entries(y).forEach(([r, b]) => {
|
|
582
|
+
y[I] === b && r !== l.field && r.indexOf("@") > -1 && r.indexOf(I) > -1 && (T = r.split("@")[1].split(","));
|
|
583
|
+
}), y[I] = y[I].split(",").map((r, b) => ({
|
|
584
584
|
url: r,
|
|
585
|
-
name: T[
|
|
585
|
+
name: T[b] || r
|
|
586
586
|
}));
|
|
587
587
|
} else (l == null ? void 0 : l.type) === "number" || (l == null ? void 0 : l.type) === "slider" ? y[I] = Number(y[I]) : (l == null ? void 0 : l.type) === "switch" && (y[I] = typeof y[I] == "boolean" ? y[I] : y[I].indexOf("true") > -1);
|
|
588
588
|
}), y;
|
|
589
589
|
}(t);
|
|
590
|
-
n.setFormData($,
|
|
591
|
-
const P = (D = o.value) == null ? void 0 : D[
|
|
590
|
+
n.setFormData($, S);
|
|
591
|
+
const P = (D = o.value) == null ? void 0 : D[S];
|
|
592
592
|
P == null || P.clearValidate();
|
|
593
593
|
} else {
|
|
594
|
-
n.setFormData(t,
|
|
595
|
-
const p = (M = o.value) == null ? void 0 : M[
|
|
594
|
+
n.setFormData(t, S);
|
|
595
|
+
const p = (M = o.value) == null ? void 0 : M[S];
|
|
596
596
|
p == null || p.clearValidate();
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
async function w(t = "default") {
|
|
600
|
-
return await a(t, async (
|
|
600
|
+
return await a(t, async (S) => (await S.validate(), await S.getData()));
|
|
601
601
|
}
|
|
602
602
|
async function A(t) {
|
|
603
603
|
await s();
|
|
604
|
-
const
|
|
604
|
+
const S = {};
|
|
605
605
|
for (const g in o.value) {
|
|
606
606
|
const D = o.value[g];
|
|
607
|
-
D && (
|
|
607
|
+
D && (S[g] = ne(await t(D)));
|
|
608
608
|
}
|
|
609
|
-
return
|
|
609
|
+
return S;
|
|
610
610
|
}
|
|
611
611
|
async function _() {
|
|
612
612
|
return await A((t) => t.getData());
|
|
613
613
|
}
|
|
614
614
|
function m(t) {
|
|
615
|
-
for (const
|
|
616
|
-
i(t[
|
|
615
|
+
for (const S in t)
|
|
616
|
+
i(t[S], S);
|
|
617
617
|
}
|
|
618
618
|
async function N() {
|
|
619
619
|
return await A(async (t) => (await t.validate(), await t.getData()));
|
|
@@ -634,7 +634,7 @@ function yt() {
|
|
|
634
634
|
const wt = {
|
|
635
635
|
key: 0,
|
|
636
636
|
class: "epic-loading-box"
|
|
637
|
-
},
|
|
637
|
+
}, bt = { class: "epic-builder-main" }, St = { class: "epic-loading-box" }, Dt = /* @__PURE__ */ fe({
|
|
638
638
|
__name: "builder",
|
|
639
639
|
props: {
|
|
640
640
|
pageSchema: {},
|
|
@@ -645,7 +645,7 @@ const wt = {
|
|
|
645
645
|
},
|
|
646
646
|
emits: ["change", "ready"],
|
|
647
647
|
setup(e, { expose: n, emit: o }) {
|
|
648
|
-
const s = ue(() => import("./index-BMXnkqXx.js")), d = o, a = F([]), v = F({}), { ready: i, pageManager: w, forms: A, getData: _, setData: m, validate: N, getForms: t, setForms:
|
|
648
|
+
const s = ue(() => import("./index-BMXnkqXx.js")), d = o, a = F([]), v = F({}), { ready: i, pageManager: w, forms: A, getData: _, setData: m, validate: N, getForms: t, setForms: S, validateAll: g, getFormInstance: D } = yt(), M = e, p = de({
|
|
649
649
|
schemas: []
|
|
650
650
|
});
|
|
651
651
|
K(
|
|
@@ -683,9 +683,9 @@ const wt = {
|
|
|
683
683
|
function V(x, h) {
|
|
684
684
|
if (x.type === "card" && x.multiple && x.field && Array.isArray(h[x.field]))
|
|
685
685
|
return h[x.field].map((T) => {
|
|
686
|
-
var
|
|
686
|
+
var b;
|
|
687
687
|
const r = C({ ...x, multiple: !0 });
|
|
688
|
-
return r.children = (
|
|
688
|
+
return r.children = (b = r.children) == null ? void 0 : b.map((R) => V(R, T)).flat(), r;
|
|
689
689
|
});
|
|
690
690
|
const L = C(x);
|
|
691
691
|
return Array.isArray(L.children) && (L.children = L.children.map((T) => V(T, h)).flat()), L;
|
|
@@ -734,10 +734,10 @@ const wt = {
|
|
|
734
734
|
const C = $(M.pageSchema.schemas[0].children, c);
|
|
735
735
|
let { obj: V, dataObj: x } = H(C, c, a.value);
|
|
736
736
|
return c = x, M.pageSchema.schemas[0].children = V, Object.keys(c).forEach((h) => {
|
|
737
|
-
var L, T, r,
|
|
737
|
+
var L, T, r, b, R, O, U;
|
|
738
738
|
if (h.indexOf("@") < 0) {
|
|
739
739
|
const f = u.find((G) => G.field === h), J = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
740
|
-
if ((f && (f == null ? void 0 : f.type) === "checkbox" || (f == null ? void 0 : f.type) === "select" && ((L = f == null ? void 0 : f.componentProps) != null && L.multiple) || (f == null ? void 0 : f.type) === "cascader" && !((r = (T = f == null ? void 0 : f.componentProps) == null ? void 0 : T.props) != null && r.multiple) || (f == null ? void 0 : f.type) === "date" && J.includes((
|
|
740
|
+
if ((f && (f == null ? void 0 : f.type) === "checkbox" || (f == null ? void 0 : f.type) === "select" && ((L = f == null ? void 0 : f.componentProps) != null && L.multiple) || (f == null ? void 0 : f.type) === "cascader" && !((r = (T = f == null ? void 0 : f.componentProps) == null ? void 0 : T.props) != null && r.multiple) || (f == null ? void 0 : f.type) === "date" && J.includes((b = f == null ? void 0 : f.componentProps) == null ? void 0 : b.type)) && typeof c[h] == "string")
|
|
741
741
|
c[h] = (R = c[h]) == null ? void 0 : R.split(",");
|
|
742
742
|
else if ((f == null ? void 0 : f.type) === "cascader" && ((U = (O = f == null ? void 0 : f.componentProps) == null ? void 0 : O.props) != null && U.multiple) && typeof c[h] == "string")
|
|
743
743
|
c[h].indexOf(";") > -1 ? c[h] = c[h].split(";").map((G) => G.split(",")) : c[h] = c[h].split(","), c[h].indexOf(";") > -1 ? c[h] = c[h].split(";").map((G) => G.split(",")) : c[h] = c[h].split(",");
|
|
@@ -780,7 +780,7 @@ const wt = {
|
|
|
780
780
|
setData: m,
|
|
781
781
|
validate: N,
|
|
782
782
|
getForms: t,
|
|
783
|
-
setForms:
|
|
783
|
+
setForms: S,
|
|
784
784
|
validateAll: g,
|
|
785
785
|
getFormInstance: D
|
|
786
786
|
}), (c, u) => W(q).initialized.value ? (Y(), ae(Be, {
|
|
@@ -788,7 +788,7 @@ const wt = {
|
|
|
788
788
|
onResolve: B
|
|
789
789
|
}, {
|
|
790
790
|
default: Z(() => [
|
|
791
|
-
te("div",
|
|
791
|
+
te("div", bt, [
|
|
792
792
|
(Y(!0), ge(Te, null, ke(p.schemas, (C, V) => (Y(), ae(W(gt), {
|
|
793
793
|
id: M.id,
|
|
794
794
|
key: V,
|
|
@@ -798,7 +798,7 @@ const wt = {
|
|
|
798
798
|
])
|
|
799
799
|
]),
|
|
800
800
|
fallback: Z(() => [
|
|
801
|
-
te("div",
|
|
801
|
+
te("div", St, [
|
|
802
802
|
oe(W(s))
|
|
803
803
|
])
|
|
804
804
|
]),
|
|
@@ -918,7 +918,7 @@ function $e(...e) {
|
|
|
918
918
|
return;
|
|
919
919
|
const N = It(m) ? { ...m } : m;
|
|
920
920
|
a.push(
|
|
921
|
-
...o.flatMap((t) => s.map((
|
|
921
|
+
...o.flatMap((t) => s.map((S) => i(_, t, S, N)))
|
|
922
922
|
);
|
|
923
923
|
},
|
|
924
924
|
{ immediate: !0, flush: "post" }
|
|
@@ -962,9 +962,9 @@ function Ut(e) {
|
|
|
962
962
|
function Tt(e) {
|
|
963
963
|
return JSON.parse(JSON.stringify(e));
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Se = "__vueuse_ssr_handlers__", Bt = /* @__PURE__ */ Jt();
|
|
966
966
|
function Jt() {
|
|
967
|
-
return
|
|
967
|
+
return Se in be || (be[Se] = be[Se] || {}), be[Se];
|
|
968
968
|
}
|
|
969
969
|
function zt(e, n) {
|
|
970
970
|
return Bt[e] || n;
|
|
@@ -1020,7 +1020,7 @@ function hn(e, n, o, s = {}) {
|
|
|
1020
1020
|
onError: t = (l) => {
|
|
1021
1021
|
console.error(l);
|
|
1022
1022
|
},
|
|
1023
|
-
initOnMounted:
|
|
1023
|
+
initOnMounted: S
|
|
1024
1024
|
} = s, g = (_ ? Re : F)(typeof n == "function" ? n() : n);
|
|
1025
1025
|
if (!o)
|
|
1026
1026
|
try {
|
|
@@ -1039,8 +1039,8 @@ function hn(e, n, o, s = {}) {
|
|
|
1039
1039
|
{ flush: a, deep: v, eventFilter: N }
|
|
1040
1040
|
);
|
|
1041
1041
|
m && i && We(() => {
|
|
1042
|
-
o instanceof Storage ? $e(m, "storage", z) : $e(m, Me, I),
|
|
1043
|
-
}),
|
|
1042
|
+
o instanceof Storage ? $e(m, "storage", z) : $e(m, Me, I), S && z();
|
|
1043
|
+
}), S || z();
|
|
1044
1044
|
function P(l, B) {
|
|
1045
1045
|
if (m) {
|
|
1046
1046
|
const c = {
|
|
@@ -1136,12 +1136,12 @@ function vn(e, n = { width: 0, height: 0 }, o = {}) {
|
|
|
1136
1136
|
if (s && a.value) {
|
|
1137
1137
|
const t = le(e);
|
|
1138
1138
|
if (t) {
|
|
1139
|
-
const
|
|
1140
|
-
v.value =
|
|
1139
|
+
const S = t.getBoundingClientRect();
|
|
1140
|
+
v.value = S.width, i.value = S.height;
|
|
1141
1141
|
}
|
|
1142
1142
|
} else if (N) {
|
|
1143
1143
|
const t = Array.isArray(N) ? N : [N];
|
|
1144
|
-
v.value = t.reduce((
|
|
1144
|
+
v.value = t.reduce((S, { inlineSize: g }) => S + g, 0), i.value = t.reduce((S, { blockSize: g }) => S + g, 0);
|
|
1145
1145
|
} else
|
|
1146
1146
|
v.value = m.contentRect.width, i.value = m.contentRect.height;
|
|
1147
1147
|
},
|
|
@@ -1175,11 +1175,11 @@ function gn(e, n, o, s = {}) {
|
|
|
1175
1175
|
deep: _ = !1,
|
|
1176
1176
|
defaultValue: m,
|
|
1177
1177
|
shouldEmit: N
|
|
1178
|
-
} = s, t = ye(),
|
|
1178
|
+
} = s, t = ye(), S = o || (t == null ? void 0 : t.emit) || ((d = t == null ? void 0 : t.$emit) == null ? void 0 : d.bind(t)) || ((v = (a = t == null ? void 0 : t.proxy) == null ? void 0 : a.$emit) == null ? void 0 : v.bind(t == null ? void 0 : t.proxy));
|
|
1179
1179
|
let g = A;
|
|
1180
1180
|
n || (n = "modelValue"), g = g || `update:${n.toString()}`;
|
|
1181
1181
|
const D = (E) => i ? typeof i == "function" ? i(E) : Tt(E) : E, M = () => At(e[n]) ? D(e[n]) : m, p = (E) => {
|
|
1182
|
-
N ? N(E) &&
|
|
1182
|
+
N ? N(E) && S(g, E) : S(g, E);
|
|
1183
1183
|
};
|
|
1184
1184
|
if (w) {
|
|
1185
1185
|
const E = M(), $ = F(E);
|
|
@@ -1292,7 +1292,7 @@ function wn(e) {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
return { handleElementDragStart: a, handleElementDrag: v, handleElementDragEnd: i };
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function bn(e) {
|
|
1296
1296
|
const { pressCtrl: n, canvasScale: o, disabledZoom: s } = Oe();
|
|
1297
1297
|
function d(a) {
|
|
1298
1298
|
if (!n.value || s.value)
|
|
@@ -1308,7 +1308,7 @@ function Sn(e) {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
), { handleZoom: d, canvasScale: o };
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Sn(e, n = 16.66) {
|
|
1312
1312
|
let o;
|
|
1313
1313
|
function s() {
|
|
1314
1314
|
d(), o = window.setInterval(e, n);
|
|
@@ -1334,7 +1334,7 @@ const qt = { class: "min-w-750px rounded" }, Xt = { class: "h-full rounded" }, k
|
|
|
1334
1334
|
function t() {
|
|
1335
1335
|
a.value = !0, _.value = lt();
|
|
1336
1336
|
}
|
|
1337
|
-
async function
|
|
1337
|
+
async function S() {
|
|
1338
1338
|
try {
|
|
1339
1339
|
let g = await A.value.validateAll();
|
|
1340
1340
|
if (!Object.keys(g).length) {
|
|
@@ -1358,7 +1358,7 @@ const qt = { class: "min-w-750px rounded" }, Xt = { class: "h-full rounded" }, k
|
|
|
1358
1358
|
class: "w-900px",
|
|
1359
1359
|
width: "900px",
|
|
1360
1360
|
onClose: N,
|
|
1361
|
-
onOk:
|
|
1361
|
+
onOk: S,
|
|
1362
1362
|
okText: "表单数据"
|
|
1363
1363
|
}, {
|
|
1364
1364
|
default: Z(() => [
|
|
@@ -1423,7 +1423,7 @@ const qt = { class: "min-w-750px rounded" }, Xt = { class: "h-full rounded" }, k
|
|
|
1423
1423
|
"updateSourceData"
|
|
1424
1424
|
],
|
|
1425
1425
|
setup(e, { expose: n, emit: o }) {
|
|
1426
|
-
const { t: s } = Pe(), d = ue(() => import("./index-syyNmnFq.js")), a = ue(() => import("./index-BTaKazMR.js")), v = ue(() => import("./index-
|
|
1426
|
+
const { t: s } = Pe(), d = ue(() => import("./index-syyNmnFq.js")), a = ue(() => import("./index-BTaKazMR.js")), v = ue(() => import("./index-Do-zTF8W.js")), i = ue(() => import("./index-ocw8DZly.js")), w = ue(() => import("./index-BMXnkqXx.js")), A = ze(), _ = dt(), m = e;
|
|
1427
1427
|
let N = {
|
|
1428
1428
|
schemas: [
|
|
1429
1429
|
{
|
|
@@ -1477,7 +1477,7 @@ defineExpose({
|
|
|
1477
1477
|
}
|
|
1478
1478
|
m.source && q.setSourceData(m.source), m.formMode && (N.schemas = q.formSchemas);
|
|
1479
1479
|
}), A.setDesignMode(), A.setDefaultComponentIds(N.schemas);
|
|
1480
|
-
const t = o,
|
|
1480
|
+
const t = o, S = F(null), g = de({
|
|
1481
1481
|
checkedNode: null,
|
|
1482
1482
|
hoverNode: null,
|
|
1483
1483
|
disableHover: !1,
|
|
@@ -1546,7 +1546,7 @@ defineExpose({
|
|
|
1546
1546
|
t("toggleDeviceMode", u);
|
|
1547
1547
|
}
|
|
1548
1548
|
function c() {
|
|
1549
|
-
|
|
1549
|
+
S.value.handleOpen();
|
|
1550
1550
|
}
|
|
1551
1551
|
return p(), n({
|
|
1552
1552
|
revoke: _,
|
|
@@ -1598,7 +1598,7 @@ defineExpose({
|
|
|
1598
1598
|
], 2),
|
|
1599
1599
|
oe(kt, {
|
|
1600
1600
|
ref_key: "previewRef",
|
|
1601
|
-
ref:
|
|
1601
|
+
ref: S
|
|
1602
1602
|
}, null, 512)
|
|
1603
1603
|
])
|
|
1604
1604
|
]),
|
|
@@ -1611,7 +1611,7 @@ defineExpose({
|
|
|
1611
1611
|
})) : (Y(), ge("div", jt));
|
|
1612
1612
|
}
|
|
1613
1613
|
}), on = {
|
|
1614
|
-
component: async () => await import("./index-
|
|
1614
|
+
component: async () => await import("./index-tkciUDvZ.js"),
|
|
1615
1615
|
defaultSchema: {
|
|
1616
1616
|
label: "代码编辑器",
|
|
1617
1617
|
type: "monacoEditor",
|
|
@@ -1661,11 +1661,11 @@ defineExpose({
|
|
|
1661
1661
|
}
|
|
1662
1662
|
}, { t: De } = Pe();
|
|
1663
1663
|
function rn(e) {
|
|
1664
|
-
e.component("EInputSize", async () => await import("./index-DMnyvgEN.js")), e.component("EColEditor", async () => await import("./index-CAYHjLKP.js")), e.component("EActionEditor", async () => await import("./index-
|
|
1664
|
+
e.component("EInputSize", async () => await import("./index-DMnyvgEN.js")), e.component("EColEditor", async () => await import("./index-CAYHjLKP.js")), e.component("EActionEditor", async () => await import("./index-jRFvV869.js")), e.component("ERuleEditor", async () => await import("./index-B9pkOv4t.js")), e.component("EOptionsEditor", async () => await import("./index-BEyLpsim.js")), e.component("ENode", async () => await import("./index-CYD9fvY1.js")), e.component("EDataSource", async () => await import("./index-9Mn4Y5ul.js")), e.component("EColumnEditor", async () => await import("./index-DM3RLWza.js")), e.component("PaddingMarginControl", async () => await import("./index-CQSYlqUB.js")), e.component("ESourceDataSelect", async () => await import("./index-C4dEBxvF.js")), e.component("EValidateParam", async () => await import("./index-C_vstFad.js")), e.component("EDescribe", async () => await import("./index-Cv3nKoEL.js")), e.registerActivitybar({
|
|
1665
1665
|
id: "component_view",
|
|
1666
1666
|
title: De("component"),
|
|
1667
1667
|
icon: "icon--epic--extension-outline",
|
|
1668
|
-
component: async () => await import("./index-
|
|
1668
|
+
component: async () => await import("./index-p8GEir2h.js")
|
|
1669
1669
|
}), e.registerActivitybar({
|
|
1670
1670
|
id: "outline_view",
|
|
1671
1671
|
title: De("outline"),
|
|
@@ -1674,11 +1674,11 @@ function rn(e) {
|
|
|
1674
1674
|
}), e.registerRightSidebar({
|
|
1675
1675
|
id: "attribute_view",
|
|
1676
1676
|
title: De("attribute"),
|
|
1677
|
-
component: async () => await import("./attributeView-
|
|
1677
|
+
component: async () => await import("./attributeView-tdOSR9MO.js")
|
|
1678
1678
|
}), e.registerRightSidebar({
|
|
1679
1679
|
id: "style_view",
|
|
1680
1680
|
title: De("style"),
|
|
1681
|
-
component: async () => await import("./styleView-
|
|
1681
|
+
component: async () => await import("./styleView-BreyVWSd.js")
|
|
1682
1682
|
}), e.registerRightSidebar({
|
|
1683
1683
|
id: "event_view",
|
|
1684
1684
|
title: "事件",
|
|
@@ -1691,11 +1691,11 @@ rn(q);
|
|
|
1691
1691
|
export {
|
|
1692
1692
|
gt as E,
|
|
1693
1693
|
Dt as _,
|
|
1694
|
-
|
|
1694
|
+
Sn as a,
|
|
1695
1695
|
Ht as b,
|
|
1696
1696
|
wn as c,
|
|
1697
1697
|
vn as d,
|
|
1698
|
-
|
|
1698
|
+
bn as e,
|
|
1699
1699
|
pn as f,
|
|
1700
1700
|
gn as g,
|
|
1701
1701
|
hn as h,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-DJDwPJHn.cjs"),s=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),i={class:"validate-param"},a=e.defineComponent({__name:"index",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,r=n,c=l.useVModel(o,"modelValue",r);return(d,p)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)),1)]))}}),u=s._export_sfc(a,[["__scopeId","data-v-7f888cb6"]]);exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./pluginManager-C8aQylGX.cjs"),_=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./pluginManager-C8aQylGX.cjs"),_=require("./index-DJDwPJHn.cjs"),w=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-BoL2PSBk.cjs"),B=[{label:"string",value:"string"},{label:"number",value:"number"},{label:"boolean",value:"boolean"},{label:"method",value:"method"},{label:"regexp",value:"regexp"},{label:"integer",value:"integer"},{label:"float",value:"float"},{label:"array",value:"array"},{label:"object",value:"object"},{label:"date",value:"date"},{label:"url",value:"url"},{label:"hex",value:"hex"},{label:"email",value:"email"},{label:"any",value:"any"}],x=[{label:"change",value:"change"},{label:"blur",value:"blur"}],f=["string","number","url","array","email"],E={class:"rule-item-main bg-white m-t-2 p-2 rounded border border-solid border-gray-200 hover:border-primary transition-all relative"},q={key:0,class:"flex m-t-2 first:m-0"},N=["title"],C={class:"epic-attr-input"},P=e.defineComponent({__name:"ERuleItem",props:{rule:{}},emits:["change","delete","update:rule"],setup(v,{emit:g}){const{t:l}=k.useLocale(),s=g,c=v,n=e.computed({get(){return c.rule},set(t){s("update:rule",t)}}),i=e.inject("pageManager",{}),r=e.computed(()=>Object.entries(i.funcs.value).filter(([t,p])=>typeof p=="function").map(([t])=>({label:t,value:t}))),h=[{type:"select",label:l("validationTrigger"),model:"trigger",componentProps:{options:x,placeholder:l("validationTrigger"),multiple:!0,mode:"multiple"}},{type:"switch",label:l("customRule"),model:"isValidator"},{type:"select",label:l("validationFunction"),model:"validator",show(){return!!n.value.isValidator},componentProps:{options:r.value,placeholder:l("validationFunction")}},{type:"select",label:l("type"),model:"type",show(){return!n.value.isValidator},componentProps:{options:B,placeholder:l("type")}},{type:"input",label:l("regexValidation"),model:"pattern",show(){return!n.value.isValidator},componentProps:{placeholder:l("regexValidation")}},{type:"number",label:l("fieldLength"),model:"len",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("fieldLength")}},{type:"number",label:l("minLength"),model:"min",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("minLength")}},{type:"number",label:l("maxLength"),model:"max",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("maxLength")}},{type:"input",label:l("validationMessage"),model:"message",componentProps:{placeholder:l("validationMessage")}}];function a(){const t=n.value;t.isValidator?(delete t.type,delete t.pattern,delete t.len,delete t.min,delete t.max):delete t.validator,s("change",t)}function b(){s("delete")}return(t,p)=>(e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,(o,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[!o.show||o.show()?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",{class:"epic-attr-label",title:e.unref(l)("validationTrigger")},e.toDisplayString(o.label),9,N),e.createElementVNode("div",C,[e.createVNode(e.unref(_.ENode),{modelValue:n.value[o.model],"onUpdate:modelValue":u=>n.value[o.model]=u,componentSchema:{...o,noFormItem:!0},onChange:a},null,8,["modelValue","onUpdate:modelValue","componentSchema"])])])):e.createCommentVNode("",!0)],64))),64)),e.createElementVNode("div",{class:"rule-btn-delete absolute top-0 text-md right-0 transition-all w-24px h-24px cursor-pointer rounded-bl-2 flex justify-center items-center color-white",onClick:b},[e.createVNode(e.unref(w._sfc_main),{name:"icon--epic--delete-outline-rounded"})])]))}}),L={class:"rule-item-main m-t-2 p-2 rounded border border-solid transition-all relative"},T={key:0,class:"flex m-t-2 first:m-0"},M={class:"epic-attr-label"},F={class:"flex-1"},U=e.defineComponent({__name:"index",props:{ruleType:{type:String,default:"string"},modelValue:{type:Array,default:void 0}},emits:["update:modelValue"],setup(v,{emit:g}){const{t:l}=k.useLocale(),s=y.pluginManager.getComponent("button"),c=v,n=g,i=_.useVModel(c,"modelValue",n),r=e.ref({required:!1,message:l("required"),type:c.ruleType,trigger:["change"]}),h=[{type:"switch",label:l("required"),model:"required"},{type:"select",label:l("validationTrigger"),model:"trigger",show(){return!!r.value.required},componentProps:{options:x,placeholder:l("validationTrigger"),multiple:!0,mode:"multiple"}},{type:"select",label:l("type"),model:"type",show(){return!!r.value.required},componentProps:{options:B,placeholder:l("type")}},{type:"input",label:l("validationMessage"),model:"message",show(){return!!r.value.required},componentProps:{placeholder:l("validationMessage")}}],a=e.ref([]);e.watchEffect(()=>{i.value&&(a.value=[],i.value.forEach(o=>{typeof o.required<"u"?r.value=o:a.value.push(o)}))});function b(){a.value.push({message:"",type:c.ruleType,trigger:["change"]}),t()}function t(){if(r.value.required){i.value=y.deepClone([...a.value,r.value]);return}if(a.value.length){i.value=y.deepClone(a.value);return}i.value=void 0}function p(o){a.value.splice(o,1),t()}return(o,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,(u,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[!u.show||u.show()?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",M,e.toDisplayString(u.label),1),e.createElementVNode("div",F,[e.createVNode(e.unref(_.ENode),{modelValue:r.value[u.model],"onUpdate:modelValue":m=>r.value[u.model]=m,componentSchema:{...u,noFormItem:!0},onChange:t},null,8,["modelValue","onUpdate:modelValue","componentSchema"])])])):e.createCommentVNode("",!0)],64))),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,d)=>(e.openBlock(),e.createBlock(P,{key:d,rule:a.value[d],"onUpdate:rule":m=>a.value[d]=m,onDelete:m=>p(d),onChange:t},null,8,["rule","onUpdate:rule","onDelete"]))),128)),e.createVNode(e.unref(s),{class:"m-t-2",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("addRule")),1)]),_:1})]))}});exports.default=U;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, createElementBlock as d, openBlock as r, createElementVNode as g, createVNode as n, Fragment as U, renderList as h, unref as t, withCtx as C, createTextVNode as k, reactive as B } from "vue";
|
|
2
|
-
import { g as N } from "./index-
|
|
2
|
+
import { g as N } from "./index-C8ReU6Xc.js";
|
|
3
3
|
import { p as c } from "./pluginManager-B0y107-1.js";
|
|
4
4
|
import { _ as $ } from "./icon.vue_vue_type_script_setup_true_lang-DW206h_7.js";
|
|
5
5
|
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|