@form-create/iview 2.7.11 → 2.7.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/form-create.esm.js +234 -226
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +3 -3
package/dist/form-create.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/iview v2.7.
|
|
3
|
+
* @form-create/iview v2.7.12
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -9,30 +9,30 @@
|
|
|
9
9
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .ivu-upload-list{margin-top:0}._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn,._fc-frame .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .ivu-upload-list{margin-top:0}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .ivu-form-item{margin-bottom:24px}.form-create .form-create .ivu-form-item .ivu-form-item{margin-bottom:0}.form-create.is-preview .fc-clock,.form-create .fc-none{display:none!important}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
10
10
|
var sr = Object.defineProperty, or = Object.defineProperties;
|
|
11
11
|
var ar = Object.getOwnPropertyDescriptors;
|
|
12
|
-
var
|
|
12
|
+
var ot = Object.getOwnPropertySymbols;
|
|
13
13
|
var lr = Object.prototype.hasOwnProperty, ur = Object.prototype.propertyIsEnumerable;
|
|
14
|
-
var
|
|
14
|
+
var at = (t, e, r) => e in t ? sr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, v = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
lr.call(e, r) &&
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
ur.call(e, r) &&
|
|
16
|
+
lr.call(e, r) && at(t, r, e[r]);
|
|
17
|
+
if (ot)
|
|
18
|
+
for (var r of ot(e))
|
|
19
|
+
ur.call(e, r) && at(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
21
|
}, U = (t, e) => or(t, ar(e));
|
|
22
|
-
import $e, { getCurrentInstance as fr, provide as cr, inject as hr, toRefs as
|
|
22
|
+
import $e, { getCurrentInstance as fr, provide as cr, inject as hr, toRefs as lt, reactive as ie, onBeforeMount as dr, watch as B, onMounted as pr, onBeforeUnmount as mr, onUpdated as gr, nextTick as V, markRaw as ge, computed as ye, toRef as je, ref as yr } from "vue";
|
|
23
23
|
function $r(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function ze() {
|
|
27
|
+
return ze = Object.assign ? Object.assign.bind() : function(t) {
|
|
28
28
|
for (var e, r = 1; r < arguments.length; r++) for (var i in e = arguments[r], e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
|
|
29
29
|
return t;
|
|
30
|
-
},
|
|
30
|
+
}, ze.apply(this, arguments);
|
|
31
31
|
}
|
|
32
32
|
var br = ["attrs", "props", "domProps"], vr = ["class", "style", "directives"], _r = ["on", "nativeOn"], Cr = function(t) {
|
|
33
33
|
return t.reduce(function(e, r) {
|
|
34
34
|
for (var i in r) if (!e[i]) e[i] = r[i];
|
|
35
|
-
else if (br.indexOf(i) !== -1) e[i] =
|
|
35
|
+
else if (br.indexOf(i) !== -1) e[i] = ze({}, e[i], r[i]);
|
|
36
36
|
else if (vr.indexOf(i) !== -1) {
|
|
37
37
|
var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
|
|
38
38
|
e[i] = [].concat(s, n);
|
|
@@ -51,7 +51,7 @@ var br = ["attrs", "props", "domProps"], vr = ["class", "style", "directives"],
|
|
|
51
51
|
};
|
|
52
52
|
}, Or = Cr;
|
|
53
53
|
const A = /* @__PURE__ */ $r(Or);
|
|
54
|
-
function
|
|
54
|
+
function Ie(t, e) {
|
|
55
55
|
return Object.keys(t).reduce((r, i) => ((!e || e.indexOf(i) === -1) && r.push(t[i]), r), []);
|
|
56
56
|
}
|
|
57
57
|
const Fr = "fcCheckbox", kr = {
|
|
@@ -117,7 +117,7 @@ const Fr = "fcCheckbox", kr = {
|
|
|
117
117
|
}, {
|
|
118
118
|
key: "" + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), Ie(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -569,7 +569,7 @@ const Rr = "fcRadio", Er = {
|
|
|
569
569
|
}, {
|
|
570
570
|
key: "" + r + "-" + e.value
|
|
571
571
|
}]));
|
|
572
|
-
}),
|
|
572
|
+
}), Ie(this.$slots)]);
|
|
573
573
|
},
|
|
574
574
|
mounted() {
|
|
575
575
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -688,20 +688,20 @@ const Dr = "fcSelect", jr = {
|
|
|
688
688
|
ref: "tree"
|
|
689
689
|
}, {
|
|
690
690
|
on: e
|
|
691
|
-
}]), [
|
|
691
|
+
}]), [Ie(this.$slots)]);
|
|
692
692
|
},
|
|
693
693
|
mounted() {
|
|
694
694
|
this.$emit("fc.el", this.$refs.tree);
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
-
function
|
|
697
|
+
function ut(t) {
|
|
698
698
|
return typeof t == "object" ? t : {
|
|
699
699
|
url: t,
|
|
700
700
|
is_string: !0,
|
|
701
701
|
name: Vr(t)
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function ft(t) {
|
|
705
705
|
return U(v({}, t), {
|
|
706
706
|
file: t,
|
|
707
707
|
value: t
|
|
@@ -754,11 +754,11 @@ function St(t) {
|
|
|
754
754
|
};
|
|
755
755
|
},
|
|
756
756
|
created() {
|
|
757
|
-
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = H(this.value).map(
|
|
757
|
+
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = H(this.value).map(ut).map(ft);
|
|
758
758
|
},
|
|
759
759
|
watch: {
|
|
760
760
|
value(e) {
|
|
761
|
-
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = H(e).map(
|
|
761
|
+
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = H(e).map(ut).map(ft), this.uploadList = this.$refs.upload.fileList);
|
|
762
762
|
},
|
|
763
763
|
maxLength(e, r) {
|
|
764
764
|
(r === 1 || e === 1) && this.update();
|
|
@@ -864,7 +864,7 @@ function St(t) {
|
|
|
864
864
|
type: this.uploadType === "file" ? "ios-cloud-upload-outline" : t.imgUpIcon,
|
|
865
865
|
size: 20
|
|
866
866
|
}
|
|
867
|
-
}]))])]) : null,
|
|
867
|
+
}]))])]) : null, Ie(this.$slots, ["default"])]);
|
|
868
868
|
},
|
|
869
869
|
update() {
|
|
870
870
|
let e = this.$refs.upload.fileList.map((r) => r.is_string ? r.url : r.value || r.url).filter((r) => r !== void 0);
|
|
@@ -957,7 +957,7 @@ const Lr = Object.assign || function(t) {
|
|
|
957
957
|
function C() {
|
|
958
958
|
return Lr.apply(this, arguments);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function Je(t) {
|
|
961
961
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
|
|
962
962
|
}
|
|
963
963
|
const Br = "fcGroup", Tr = {
|
|
@@ -1402,23 +1402,23 @@ const Et = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style"
|
|
|
1402
1402
|
}, e);
|
|
1403
1403
|
}, Gr = (t, e) => function() {
|
|
1404
1404
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1405
|
-
}, At = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"],
|
|
1405
|
+
}, At = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], xe = ["effect", "deep", "renderSlots"];
|
|
1406
1406
|
function It() {
|
|
1407
|
-
return [...At, ...Et, ...Dt, ...jt, ...
|
|
1407
|
+
return [...At, ...Et, ...Dt, ...jt, ...Ye, ...xe];
|
|
1408
1408
|
}
|
|
1409
1409
|
function Vt(t, e, r) {
|
|
1410
1410
|
return `[form-create ${t}]: ${e}`;
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function et(t, e) {
|
|
1413
1413
|
console.error(Vt("err", t));
|
|
1414
1414
|
}
|
|
1415
1415
|
function Hr(t) {
|
|
1416
|
-
|
|
1416
|
+
et(t.toString()), console.error(t);
|
|
1417
1417
|
}
|
|
1418
1418
|
function zr(t) {
|
|
1419
1419
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1420
1420
|
}
|
|
1421
|
-
const
|
|
1421
|
+
const We = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
|
|
1422
1422
|
function _e(t, e) {
|
|
1423
1423
|
return JSON.stringify(Ce(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1424
1424
|
if (!(i && i._isVue === !0)) {
|
|
@@ -1427,19 +1427,19 @@ function _e(t, e) {
|
|
|
1427
1427
|
if (i.__json)
|
|
1428
1428
|
return i.__json;
|
|
1429
1429
|
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1430
|
-
return
|
|
1430
|
+
return We + i + Ke;
|
|
1431
1431
|
}
|
|
1432
1432
|
}, e);
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Te(t) {
|
|
1435
1435
|
return new Function("return " + t)();
|
|
1436
1436
|
}
|
|
1437
1437
|
function W(t, e) {
|
|
1438
1438
|
if (t && h.String(t) && t.length > 4) {
|
|
1439
1439
|
let r = t.trim(), i = !1;
|
|
1440
1440
|
try {
|
|
1441
|
-
if (r.indexOf(
|
|
1442
|
-
r = r.replace(
|
|
1441
|
+
if (r.indexOf(Ke) > 0 && r.indexOf(We) === 0)
|
|
1442
|
+
r = r.replace(Ke, "").replace(We, ""), i = !0;
|
|
1443
1443
|
else if (r.indexOf("$FN:") === 0)
|
|
1444
1444
|
r = r.substring(4), i = !0;
|
|
1445
1445
|
else if (r.indexOf("$EXEC:") === 0)
|
|
@@ -1453,7 +1453,7 @@ function W(t, e) {
|
|
|
1453
1453
|
}, r.__json = t, r.__inject = !0, r;
|
|
1454
1454
|
} else {
|
|
1455
1455
|
if (r.indexOf("$FNX:") === 0)
|
|
1456
|
-
return r =
|
|
1456
|
+
return r = Te(`function($inject){
|
|
1457
1457
|
` + r.substring(5) + `
|
|
1458
1458
|
}`), r.__json = t, r.__inject = !0, r;
|
|
1459
1459
|
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
@@ -1461,13 +1461,13 @@ function W(t, e) {
|
|
|
1461
1461
|
if (!i) return t;
|
|
1462
1462
|
let s;
|
|
1463
1463
|
try {
|
|
1464
|
-
s =
|
|
1464
|
+
s = Te(r);
|
|
1465
1465
|
} catch (n) {
|
|
1466
|
-
s =
|
|
1466
|
+
s = Te("function " + r);
|
|
1467
1467
|
}
|
|
1468
1468
|
return s.__json = t, s;
|
|
1469
1469
|
} catch (s) {
|
|
1470
|
-
|
|
1470
|
+
et(`解析失败:${r}
|
|
1471
1471
|
|
|
1472
1472
|
err: ${s}`);
|
|
1473
1473
|
return;
|
|
@@ -1481,7 +1481,7 @@ function Pt(t, e) {
|
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
1483
|
let Jr = 0;
|
|
1484
|
-
function
|
|
1484
|
+
function Ve() {
|
|
1485
1485
|
const t = 370 + ++Jr;
|
|
1486
1486
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1487
1487
|
}
|
|
@@ -1491,7 +1491,7 @@ function se(t, e, r) {
|
|
|
1491
1491
|
s && ((!i[s] || typeof i[s] != "object") && F(i, s, {}), i = i[s]), s = n;
|
|
1492
1492
|
}), F(i, s, r), i;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function Xe(t, e) {
|
|
1495
1495
|
return {
|
|
1496
1496
|
value: t,
|
|
1497
1497
|
enumerable: !1,
|
|
@@ -1506,9 +1506,9 @@ function Bt(t, e) {
|
|
|
1506
1506
|
return Ce([], [...t], e || !1);
|
|
1507
1507
|
}
|
|
1508
1508
|
function x(t, e) {
|
|
1509
|
-
return Y(Array.isArray(e) ? e : [e], t, { array:
|
|
1509
|
+
return Y(Array.isArray(e) ? e : [e], t, { array: Ye, normal: xe }), t;
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function ct(t) {
|
|
1512
1512
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1513
1513
|
return e.type || (e.type = "input"), e;
|
|
1514
1514
|
}
|
|
@@ -1535,9 +1535,9 @@ function O(t, e) {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
return e;
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function Ze(t, e) {
|
|
1539
1539
|
let r = null;
|
|
1540
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1540
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Ze(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1541
1541
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1542
1542
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1543
1543
|
});
|
|
@@ -1547,10 +1547,10 @@ function Kr(t, e) {
|
|
|
1547
1547
|
if (h.Object(t)) {
|
|
1548
1548
|
const r = {};
|
|
1549
1549
|
return Object.keys(t).forEach((i) => {
|
|
1550
|
-
r[i] =
|
|
1550
|
+
r[i] = Ze(t[i], i);
|
|
1551
1551
|
}), r;
|
|
1552
1552
|
} else
|
|
1553
|
-
return
|
|
1553
|
+
return Ze(t, e);
|
|
1554
1554
|
}
|
|
1555
1555
|
function ke() {
|
|
1556
1556
|
const t = {}, e = (r) => r || "default";
|
|
@@ -1591,15 +1591,15 @@ function ke() {
|
|
|
1591
1591
|
function Se(t, e) {
|
|
1592
1592
|
return Object.setPrototypeOf(t, e), t;
|
|
1593
1593
|
}
|
|
1594
|
-
const
|
|
1595
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1594
|
+
const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
|
|
1595
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
|
|
1596
1596
|
"!=": (t, e) => !ce["=="](t, e),
|
|
1597
1597
|
">": (t, e) => t > e,
|
|
1598
1598
|
">=": (t, e) => t >= e,
|
|
1599
1599
|
"<": (t, e) => t < e,
|
|
1600
1600
|
"<=": (t, e) => t <= e,
|
|
1601
1601
|
on(t, e) {
|
|
1602
|
-
return t && t.indexOf && t.indexOf(
|
|
1602
|
+
return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
|
|
1603
1603
|
},
|
|
1604
1604
|
notOn(t, e) {
|
|
1605
1605
|
return !ce.on(t, e);
|
|
@@ -1639,7 +1639,7 @@ function Xr(t) {
|
|
|
1639
1639
|
r[1] && (i[r[1]] = !0);
|
|
1640
1640
|
return Object.keys(i);
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function dt(t) {
|
|
1643
1643
|
let e = t.split("."), r = [], i = "";
|
|
1644
1644
|
return e.forEach((s, n) => {
|
|
1645
1645
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
@@ -1657,12 +1657,12 @@ function Nt(t) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
1659
1659
|
}
|
|
1660
|
-
const
|
|
1660
|
+
const Ee = (t, e) => {
|
|
1661
1661
|
if (!(!t || t === e || !t.$props)) {
|
|
1662
1662
|
if (t.$props.formCreateInject)
|
|
1663
1663
|
return t.$props.formCreateInject;
|
|
1664
1664
|
if (t.$parent)
|
|
1665
|
-
return
|
|
1665
|
+
return Ee(t.$parent, e);
|
|
1666
1666
|
}
|
|
1667
1667
|
};
|
|
1668
1668
|
function Zr(t, e, r) {
|
|
@@ -1726,27 +1726,27 @@ function Zr(t, e, r) {
|
|
|
1726
1726
|
a = a.parent;
|
|
1727
1727
|
else
|
|
1728
1728
|
a = n;
|
|
1729
|
-
const { rule: l, value: u, subForm: f, inFor: p } =
|
|
1729
|
+
const { rule: l, value: u, subForm: f, inFor: p } = lt(s), d = ie({
|
|
1730
1730
|
ctxInject: {},
|
|
1731
1731
|
destroyed: !1,
|
|
1732
1732
|
isShow: !0,
|
|
1733
1733
|
unique: 1,
|
|
1734
1734
|
renderRule: [...l.value || []],
|
|
1735
1735
|
updateValue: JSON.stringify(u.value || {})
|
|
1736
|
-
}), m = new t(n), y = m.api(), _ = p.value,
|
|
1736
|
+
}), m = new t(n), y = m.api(), _ = p.value, E = () => {
|
|
1737
1737
|
if (o) {
|
|
1738
|
-
const k =
|
|
1738
|
+
const k = Ee(n, o);
|
|
1739
1739
|
if (k) {
|
|
1740
|
-
let
|
|
1741
|
-
_ ? (
|
|
1740
|
+
let R;
|
|
1741
|
+
_ ? (R = H(k.getSubForm()), R.push(y)) : R = y, k.subForm(R);
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
1744
|
}, ee = () => {
|
|
1745
|
-
const k =
|
|
1745
|
+
const k = Ee(n, o);
|
|
1746
1746
|
if (k)
|
|
1747
1747
|
if (_) {
|
|
1748
|
-
const
|
|
1749
|
-
N > -1 &&
|
|
1748
|
+
const R = H(k.getSubForm()), N = R.indexOf(y);
|
|
1749
|
+
N > -1 && R.splice(N, 1);
|
|
1750
1750
|
} else
|
|
1751
1751
|
k.subForm();
|
|
1752
1752
|
};
|
|
@@ -1754,12 +1754,12 @@ function Zr(t, e, r) {
|
|
|
1754
1754
|
dr(() => {
|
|
1755
1755
|
B(() => {
|
|
1756
1756
|
let k = "";
|
|
1757
|
-
const
|
|
1758
|
-
Object.keys(
|
|
1757
|
+
const R = s.option && s.option.globalClass || {};
|
|
1758
|
+
Object.keys(R).forEach((N) => {
|
|
1759
1759
|
let pe = "";
|
|
1760
|
-
|
|
1761
|
-
pe += be(z) + ":" +
|
|
1762
|
-
}),
|
|
1760
|
+
R[N].style && Object.keys(R[N].style).forEach((z) => {
|
|
1761
|
+
pe += be(z) + ":" + R[N].style[z] + ";";
|
|
1762
|
+
}), R[N].content && (pe += R[N].content + ";"), pe && (k += `.${N}{${pe}}`);
|
|
1763
1763
|
}), s.option && s.option.style && (k += s.option.style), I || (I = document.createElement("style"), I.type = "text/css", document.head.appendChild(I)), I.innerHTML = k || "";
|
|
1764
1764
|
}, () => {
|
|
1765
1765
|
});
|
|
@@ -1768,7 +1768,7 @@ function Zr(t, e, r) {
|
|
|
1768
1768
|
m.bus.$emit("$loadData.$topForm");
|
|
1769
1769
|
}, 100), he = ne(function() {
|
|
1770
1770
|
m.bus.$emit("$loadData.$scopeForm");
|
|
1771
|
-
}, 100),
|
|
1771
|
+
}, 100), Pe = ne(() => {
|
|
1772
1772
|
m.bus.$emit("$loadData.$form");
|
|
1773
1773
|
}, 100), de = (k) => {
|
|
1774
1774
|
m.bus.$emit("change-$form." + k);
|
|
@@ -1780,11 +1780,11 @@ function Zr(t, e, r) {
|
|
|
1780
1780
|
}), gr(() => {
|
|
1781
1781
|
m.updated();
|
|
1782
1782
|
}), B(f, (k) => {
|
|
1783
|
-
k ?
|
|
1783
|
+
k ? E() : ee();
|
|
1784
1784
|
}, { immediate: !0 }), B(() => s.option, () => {
|
|
1785
1785
|
m.initOptions(), y.refresh();
|
|
1786
1786
|
}, { deep: !0 }), B(() => [...l.value], (k) => {
|
|
1787
|
-
m.$handle.isBreakWatch() || k.length === d.renderRule.length && k.every((
|
|
1787
|
+
m.$handle.isBreakWatch() || k.length === d.renderRule.length && k.every((R) => d.renderRule.indexOf(R) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
|
|
1788
1788
|
}), B(() => [s.disabled, s.preview], () => {
|
|
1789
1789
|
y.refresh();
|
|
1790
1790
|
}), B(u, (k) => {
|
|
@@ -1800,8 +1800,8 @@ function Zr(t, e, r) {
|
|
|
1800
1800
|
parent: o && ge(o),
|
|
1801
1801
|
top: ge(a),
|
|
1802
1802
|
fapi: ge(y)
|
|
1803
|
-
},
|
|
1804
|
-
getGroupInject: () =>
|
|
1803
|
+
}, lt(d)), {
|
|
1804
|
+
getGroupInject: () => Ee(n, o),
|
|
1805
1805
|
refresh() {
|
|
1806
1806
|
++d.unique;
|
|
1807
1807
|
},
|
|
@@ -1810,9 +1810,9 @@ function Zr(t, e, r) {
|
|
|
1810
1810
|
},
|
|
1811
1811
|
updateValue(k) {
|
|
1812
1812
|
if (d.destroyed) return;
|
|
1813
|
-
const
|
|
1814
|
-
d.updateValue !==
|
|
1815
|
-
|
|
1813
|
+
const R = _e(k);
|
|
1814
|
+
d.updateValue !== R && (d.updateValue = R, n.$emit("update:value", k), V(() => {
|
|
1815
|
+
Pe(), o ? f.value || he() : (T(), he());
|
|
1816
1816
|
}));
|
|
1817
1817
|
}
|
|
1818
1818
|
});
|
|
@@ -1836,14 +1836,14 @@ function Mt() {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
function P(t, e) {
|
|
1838
1838
|
return (r, i, s, n = {}) => {
|
|
1839
|
-
const o = new
|
|
1839
|
+
const o = new tt(t, r, i, s, n);
|
|
1840
1840
|
return e && (h.Function(e) ? e(o) : o.props(e)), o;
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function tt(t, e, r, i, s) {
|
|
1844
1844
|
this._data = C(Mt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1845
1845
|
}
|
|
1846
|
-
C(
|
|
1846
|
+
C(tt.prototype, {
|
|
1847
1847
|
getRule() {
|
|
1848
1848
|
return this._data;
|
|
1849
1849
|
},
|
|
@@ -1857,7 +1857,7 @@ C(rt.prototype, {
|
|
|
1857
1857
|
});
|
|
1858
1858
|
function Ut(t) {
|
|
1859
1859
|
t.forEach((e) => {
|
|
1860
|
-
|
|
1860
|
+
tt.prototype[e] = function(r) {
|
|
1861
1861
|
return x(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1862
1862
|
};
|
|
1863
1863
|
});
|
|
@@ -1868,15 +1868,15 @@ function Qr(t, e, r) {
|
|
|
1868
1868
|
let i = qt("", e);
|
|
1869
1869
|
return i._data.type = t, i._data.title = r, i;
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function pt(t, e, r, i) {
|
|
1872
1872
|
let s = qt("", r);
|
|
1873
1873
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1874
1874
|
}
|
|
1875
1875
|
function Yr() {
|
|
1876
1876
|
return {
|
|
1877
1877
|
create: Qr,
|
|
1878
|
-
createTmp:
|
|
1879
|
-
template:
|
|
1878
|
+
createTmp: pt,
|
|
1879
|
+
template: pt,
|
|
1880
1880
|
factory: P
|
|
1881
1881
|
};
|
|
1882
1882
|
}
|
|
@@ -1884,7 +1884,7 @@ function xr(t, e, r) {
|
|
|
1884
1884
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1885
1885
|
return s.status = r.status, s.url = t, s;
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function mt(t) {
|
|
1888
1888
|
const e = t.responseText || t.response;
|
|
1889
1889
|
if (!e)
|
|
1890
1890
|
return e;
|
|
@@ -1909,8 +1909,8 @@ function Gt(t) {
|
|
|
1909
1909
|
t.onError(o);
|
|
1910
1910
|
}, e.onload = function() {
|
|
1911
1911
|
if (e.status < 200 || e.status >= 300)
|
|
1912
|
-
return t.onError(xr(r, t, e),
|
|
1913
|
-
t.onSuccess(
|
|
1912
|
+
return t.onError(xr(r, t, e), mt(e));
|
|
1913
|
+
t.onSuccess(mt(e));
|
|
1914
1914
|
}, e.open(t.method || "get", r, !0);
|
|
1915
1915
|
let i;
|
|
1916
1916
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
@@ -1921,7 +1921,7 @@ function Gt(t) {
|
|
|
1921
1921
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1922
1922
|
}), e.send(i);
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function gt(t, e, r) {
|
|
1925
1925
|
return new Promise((i, s) => {
|
|
1926
1926
|
(e || Gt)(U(v({}, t), {
|
|
1927
1927
|
onSuccess(n) {
|
|
@@ -2323,6 +2323,12 @@ function ei(t) {
|
|
|
2323
2323
|
}).catch(a) : o(l.data) : o(t.fc.loadData[n]);
|
|
2324
2324
|
});
|
|
2325
2325
|
},
|
|
2326
|
+
setGlobalData(n, o) {
|
|
2327
|
+
s.setData("$globalData." + n, o);
|
|
2328
|
+
},
|
|
2329
|
+
setGlobalVar(n, o) {
|
|
2330
|
+
s.setData("$var." + n, o);
|
|
2331
|
+
},
|
|
2326
2332
|
renderRule(n, o, a) {
|
|
2327
2333
|
const u = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2328
2334
|
return u ? t.$render.createRuleVnode(u, o, a) : void 0;
|
|
@@ -2346,7 +2352,7 @@ function ei(t) {
|
|
|
2346
2352
|
bus: t.bus,
|
|
2347
2353
|
fetch(n) {
|
|
2348
2354
|
return new Promise((o, a) => {
|
|
2349
|
-
n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2355
|
+
n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
|
|
2350
2356
|
O(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2351
2357
|
}).catch((l) => {
|
|
2352
2358
|
O(() => n.onError && n.onError(l)), a(l);
|
|
@@ -2357,7 +2363,7 @@ function ei(t) {
|
|
|
2357
2363
|
watchFetch(n, o, a, l) {
|
|
2358
2364
|
return t.fc.watchLoadData((u, f) => {
|
|
2359
2365
|
let p = G(n);
|
|
2360
|
-
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() =>
|
|
2366
|
+
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((d) => {
|
|
2361
2367
|
O(() => p.onSuccess && p.onSuccess(d)), o && o(d, f);
|
|
2362
2368
|
}).catch((d) => {
|
|
2363
2369
|
O(() => p.onError && p.onError(d)), a && a(d);
|
|
@@ -2527,7 +2533,7 @@ function ri(t) {
|
|
|
2527
2533
|
});
|
|
2528
2534
|
const d = this.getTypeSlot(e);
|
|
2529
2535
|
let m;
|
|
2530
|
-
return d ? (u.children = f, m = d(u)) : m = a ? e.parser.preview(
|
|
2536
|
+
return d ? (u.children = f, m = d(u)) : m = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(f), e), m = this.renderSides(m, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), m = this.$manager.makeWrap(e, m)), e.none && (Array.isArray(m) ? m = m.map((y) => !y || !y.tag ? y : this.none(y)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
|
|
2531
2537
|
}, this.setCache(e, s, r);
|
|
2532
2538
|
}
|
|
2533
2539
|
return (...s) => {
|
|
@@ -2577,6 +2583,7 @@ function ri(t) {
|
|
|
2577
2583
|
},
|
|
2578
2584
|
getSubForm: () => this.$handle.subForm[e.id],
|
|
2579
2585
|
slots: () => this.vm.top.$scopedSlots,
|
|
2586
|
+
getWrap: () => this.vm.$refs[e.wrapRef],
|
|
2580
2587
|
options: [],
|
|
2581
2588
|
children: [],
|
|
2582
2589
|
preview: !1,
|
|
@@ -2715,7 +2722,7 @@ function ri(t) {
|
|
|
2715
2722
|
});
|
|
2716
2723
|
}
|
|
2717
2724
|
let ii = 1;
|
|
2718
|
-
function
|
|
2725
|
+
function rt(t) {
|
|
2719
2726
|
C(this, {
|
|
2720
2727
|
$handle: t,
|
|
2721
2728
|
fc: t.fc,
|
|
@@ -2734,8 +2741,8 @@ function it(t) {
|
|
|
2734
2741
|
}
|
|
2735
2742
|
}), this.initCache(), this.initRender();
|
|
2736
2743
|
}
|
|
2737
|
-
ti(
|
|
2738
|
-
ri(
|
|
2744
|
+
ti(rt);
|
|
2745
|
+
ri(rt);
|
|
2739
2746
|
function ni(t) {
|
|
2740
2747
|
C(t.prototype, {
|
|
2741
2748
|
parseInjectEvent(e, r) {
|
|
@@ -2851,7 +2858,7 @@ function ni(t) {
|
|
|
2851
2858
|
}
|
|
2852
2859
|
});
|
|
2853
2860
|
}
|
|
2854
|
-
const
|
|
2861
|
+
const yt = ["hook:updated", "hook:mounted"];
|
|
2855
2862
|
function si(t) {
|
|
2856
2863
|
C(t.prototype, {
|
|
2857
2864
|
usePage() {
|
|
@@ -2866,9 +2873,9 @@ function si(t) {
|
|
|
2866
2873
|
},
|
|
2867
2874
|
pageLoad() {
|
|
2868
2875
|
const e = () => {
|
|
2869
|
-
this.pageEnd ? (this.vm.$off(
|
|
2876
|
+
this.pageEnd ? (this.vm.$off(yt, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2870
2877
|
};
|
|
2871
|
-
this.vm.$on(
|
|
2878
|
+
this.vm.$on(yt, e);
|
|
2872
2879
|
}
|
|
2873
2880
|
});
|
|
2874
2881
|
}
|
|
@@ -2892,13 +2899,13 @@ function ai(t) {
|
|
|
2892
2899
|
}
|
|
2893
2900
|
function li(t) {
|
|
2894
2901
|
Object.defineProperties(t.origin, {
|
|
2895
|
-
__fc__:
|
|
2902
|
+
__fc__: Xe(ge(t), !0)
|
|
2896
2903
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2897
|
-
__fc__:
|
|
2904
|
+
__fc__: Xe(ge(t), !0)
|
|
2898
2905
|
});
|
|
2899
2906
|
}
|
|
2900
2907
|
function zt(t, e, r) {
|
|
2901
|
-
const i =
|
|
2908
|
+
const i = Ve(), s = !!e.field;
|
|
2902
2909
|
C(this, {
|
|
2903
2910
|
id: i,
|
|
2904
2911
|
ref: i,
|
|
@@ -2997,7 +3004,7 @@ C(zt.prototype, {
|
|
|
2997
3004
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2998
3005
|
},
|
|
2999
3006
|
updateKey(t) {
|
|
3000
|
-
this.key =
|
|
3007
|
+
this.key = Ve(), t && this.parent && this.parent.updateKey(t);
|
|
3001
3008
|
},
|
|
3002
3009
|
updateType() {
|
|
3003
3010
|
this.originType = this.rule.type, this.type = q(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -3086,9 +3093,9 @@ function ui(t) {
|
|
|
3086
3093
|
});
|
|
3087
3094
|
},
|
|
3088
3095
|
parseRule(e) {
|
|
3089
|
-
const r =
|
|
3096
|
+
const r = ct(e);
|
|
3090
3097
|
return Object.defineProperties(r, {
|
|
3091
|
-
__origin__:
|
|
3098
|
+
__origin__: Xe(e, !0)
|
|
3092
3099
|
}), fi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3093
3100
|
i && this.loadFn(i, r);
|
|
3094
3101
|
}), this.loadCtrl(r), r.update && (r.update = W(r.update)), r;
|
|
@@ -3136,17 +3143,17 @@ function ui(t) {
|
|
|
3136
3143
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3137
3144
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3138
3145
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3139
|
-
let l =
|
|
3146
|
+
let l = ct(o);
|
|
3140
3147
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3141
3148
|
this.fc.targetFormDriver("loadRule", { rule: l, api: this.api }, this.fc), this.ruleEffect(l, "init", { repeat: u() }), u() && this.vm.$emit("repeat-field", o, this.api);
|
|
3142
3149
|
let f, p = !1, d = !!o.__fc__, m = l.value;
|
|
3143
3150
|
if (d) {
|
|
3144
3151
|
if (f = o.__fc__, m = f.defaultValue, f.deleted) {
|
|
3145
|
-
if (
|
|
3152
|
+
if ($t(f))
|
|
3146
3153
|
return;
|
|
3147
3154
|
f.update(this);
|
|
3148
3155
|
} else if (!f.check(this)) {
|
|
3149
|
-
if (
|
|
3156
|
+
if ($t(f))
|
|
3150
3157
|
return;
|
|
3151
3158
|
e[a] = o = o._clone ? o._clone() : Pt(_e(o)), f = null, p = !0;
|
|
3152
3159
|
}
|
|
@@ -3154,14 +3161,14 @@ function ui(t) {
|
|
|
3154
3161
|
if (f)
|
|
3155
3162
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3156
3163
|
else {
|
|
3157
|
-
const
|
|
3158
|
-
f = new zt(this,
|
|
3164
|
+
const E = this.parseRule(o);
|
|
3165
|
+
f = new zt(this, E, m), this.bindParser(f);
|
|
3159
3166
|
}
|
|
3160
|
-
[!1, !0].forEach((
|
|
3167
|
+
[!1, !0].forEach((E) => this.parseEmit(f, E)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !p && !d && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3161
3168
|
const y = f.loadChildrenPending();
|
|
3162
3169
|
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3170
|
+
const E = i(a);
|
|
3171
|
+
E > -1 || !a ? this.sort.splice(E + 1, 0, f.id) : this.sort.push(f.id);
|
|
3165
3172
|
}
|
|
3166
3173
|
const _ = f.rule;
|
|
3167
3174
|
return f.updated || (f.updated = !0, h.Function(_.update) && this.bus.$once("load-end", () => {
|
|
@@ -3263,7 +3270,7 @@ function hi(t, e) {
|
|
|
3263
3270
|
return i;
|
|
3264
3271
|
}
|
|
3265
3272
|
}
|
|
3266
|
-
function
|
|
3273
|
+
function $t(t) {
|
|
3267
3274
|
return !!t.rule.__ctrl;
|
|
3268
3275
|
}
|
|
3269
3276
|
function di(t) {
|
|
@@ -3279,7 +3286,7 @@ function di(t) {
|
|
|
3279
3286
|
this.api.clearValidateState(e.id);
|
|
3280
3287
|
});
|
|
3281
3288
|
});
|
|
3282
|
-
}));
|
|
3289
|
+
}), this.$manager.fieldChange(e, r, i, s));
|
|
3283
3290
|
},
|
|
3284
3291
|
onInput(e, r) {
|
|
3285
3292
|
let i;
|
|
@@ -3310,9 +3317,9 @@ function di(t) {
|
|
|
3310
3317
|
},
|
|
3311
3318
|
syncForm() {
|
|
3312
3319
|
const e = {}, r = this.fields(), i = [];
|
|
3313
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] =
|
|
3320
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = je(this.appendData, n)), s), e), r.reduce((s, n) => {
|
|
3314
3321
|
let o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a))[0];
|
|
3315
|
-
return o || (o = this.fieldCtx[n][0], i.push(n)), s[n] =
|
|
3322
|
+
return o || (o = this.fieldCtx[n][0], i.push(n)), s[n] = je(o.rule, "value"), s;
|
|
3316
3323
|
}, e), this.form = ie(e), this.ignoreFields = i, this.syncValue();
|
|
3317
3324
|
},
|
|
3318
3325
|
isIgnore(e) {
|
|
@@ -3336,7 +3343,7 @@ function di(t) {
|
|
|
3336
3343
|
}), this.vm.updateValue(e);
|
|
3337
3344
|
},
|
|
3338
3345
|
isChange(e, r) {
|
|
3339
|
-
return JSON.stringify(this.getFormData(e),
|
|
3346
|
+
return JSON.stringify(this.getFormData(e), bt) !== JSON.stringify(r, bt);
|
|
3340
3347
|
},
|
|
3341
3348
|
isQuote(e, r) {
|
|
3342
3349
|
return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -3369,10 +3376,10 @@ function di(t) {
|
|
|
3369
3376
|
}
|
|
3370
3377
|
});
|
|
3371
3378
|
}
|
|
3372
|
-
function
|
|
3379
|
+
function bt(t, e) {
|
|
3373
3380
|
return typeof e == "function" ? "" + e : e;
|
|
3374
3381
|
}
|
|
3375
|
-
const
|
|
3382
|
+
const De = {
|
|
3376
3383
|
init(t) {
|
|
3377
3384
|
},
|
|
3378
3385
|
toFormValue(t, e) {
|
|
@@ -3427,7 +3434,7 @@ function mi(t) {
|
|
|
3427
3434
|
if (n)
|
|
3428
3435
|
return n;
|
|
3429
3436
|
}
|
|
3430
|
-
return r[e.originType] || r[q(e.type)] || r[e.trueType] ||
|
|
3437
|
+
return r[e.originType] || r[q(e.type)] || r[e.trueType] || De;
|
|
3431
3438
|
},
|
|
3432
3439
|
bindParser(e) {
|
|
3433
3440
|
e.setParser(this.getParser(e));
|
|
@@ -3441,7 +3448,7 @@ function mi(t) {
|
|
|
3441
3448
|
},
|
|
3442
3449
|
watchCtx(e) {
|
|
3443
3450
|
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && pi.indexOf(i) === -1).forEach((i) => {
|
|
3444
|
-
const s =
|
|
3451
|
+
const s = je(e.rule, i), n = i === "children";
|
|
3445
3452
|
e.refRule[i] = s, e.watch.push(B(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3446
3453
|
let l = s.value;
|
|
3447
3454
|
if (!this.isBreakWatch()) {
|
|
@@ -3508,7 +3515,7 @@ function mi(t) {
|
|
|
3508
3515
|
return n;
|
|
3509
3516
|
});
|
|
3510
3517
|
}), e.input) {
|
|
3511
|
-
const i =
|
|
3518
|
+
const i = je(e.rule, "value");
|
|
3512
3519
|
e.watch.push(B(() => i.value, () => {
|
|
3513
3520
|
let s = e.parser.toFormValue(i.value, e);
|
|
3514
3521
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
@@ -3660,11 +3667,11 @@ function mi(t) {
|
|
|
3660
3667
|
if (p.variable)
|
|
3661
3668
|
m = JSON.stringify(this.fc.getLoadData(p.variable) || "");
|
|
3662
3669
|
else if (p.field)
|
|
3663
|
-
m =
|
|
3670
|
+
m = dt(p.field || "");
|
|
3664
3671
|
else if (!p.mode)
|
|
3665
3672
|
return !0;
|
|
3666
3673
|
let y = p.compare;
|
|
3667
|
-
if (y && (y =
|
|
3674
|
+
if (y && (y = dt(y || "")), p.mode ? d = n(p) : ce[p.condition] ? h.Function(p.handler) ? d = O(() => p.handler(this.api, e.rule)) : d = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${m}, ${y || "$val"}); }}}}`).call(this.api.form, ce, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : d = !1, l && d)
|
|
3668
3675
|
return !0;
|
|
3669
3676
|
l || (u = u && d);
|
|
3670
3677
|
}
|
|
@@ -3887,7 +3894,7 @@ function K(t) {
|
|
|
3887
3894
|
nextReload: () => {
|
|
3888
3895
|
this.lifecycle("reload");
|
|
3889
3896
|
}
|
|
3890
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3897
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new rt(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3891
3898
|
const i = O(() => r(e, this));
|
|
3892
3899
|
return i && i !== e && C(e, i), e;
|
|
3893
3900
|
}, ei(this));
|
|
@@ -3938,7 +3945,7 @@ di(K);
|
|
|
3938
3945
|
mi(K);
|
|
3939
3946
|
gi(K);
|
|
3940
3947
|
yi(K);
|
|
3941
|
-
const vi = "fcFragment",
|
|
3948
|
+
const vi = "fcFragment", Ne = {
|
|
3942
3949
|
name: vi,
|
|
3943
3950
|
functional: !0,
|
|
3944
3951
|
props: ["vnode"],
|
|
@@ -4012,7 +4019,7 @@ C(Jt.prototype, {
|
|
|
4012
4019
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
4013
4020
|
},
|
|
4014
4021
|
updateKey() {
|
|
4015
|
-
this.key =
|
|
4022
|
+
this.key = Ve();
|
|
4016
4023
|
},
|
|
4017
4024
|
//TODO interface
|
|
4018
4025
|
init() {
|
|
@@ -4052,6 +4059,8 @@ C(Jt.prototype, {
|
|
|
4052
4059
|
getDefaultOptions() {
|
|
4053
4060
|
return {};
|
|
4054
4061
|
},
|
|
4062
|
+
fieldChange(t, e, r, i) {
|
|
4063
|
+
},
|
|
4055
4064
|
render(t) {
|
|
4056
4065
|
}
|
|
4057
4066
|
});
|
|
@@ -4179,14 +4188,14 @@ const Oi = function(t) {
|
|
|
4179
4188
|
const m = t.$handle.loadFetchVar(G(a), p, n), y = U(v({
|
|
4180
4189
|
headers: {}
|
|
4181
4190
|
}, m), {
|
|
4182
|
-
onSuccess(_,
|
|
4191
|
+
onSuccess(_, E) {
|
|
4183
4192
|
if (f()) return;
|
|
4184
|
-
let ee = (T) =>
|
|
4193
|
+
let ee = (T) => E ? T : D(T, "data") ? T.data : T;
|
|
4185
4194
|
const I = W(m.parse);
|
|
4186
4195
|
h.Function(I) ? ee = I : I && h.String(I) && (ee = (T) => L(T, I)), l(ee(_, n, o));
|
|
4187
4196
|
},
|
|
4188
4197
|
onError(_) {
|
|
4189
|
-
l(void 0), !f() && (u || ((
|
|
4198
|
+
l(void 0), !f() && (u || ((E) => et(E.message || "fetch fail " + m.action)))(_, n, o);
|
|
4190
4199
|
}
|
|
4191
4200
|
});
|
|
4192
4201
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
@@ -4295,7 +4304,7 @@ function Ii(t) {
|
|
|
4295
4304
|
}
|
|
4296
4305
|
return null;
|
|
4297
4306
|
}
|
|
4298
|
-
function
|
|
4307
|
+
function it(t, e) {
|
|
4299
4308
|
if (!e)
|
|
4300
4309
|
return null;
|
|
4301
4310
|
const r = e.split(".");
|
|
@@ -4303,13 +4312,13 @@ function nt(t, e) {
|
|
|
4303
4312
|
return r.length ? i == null ? null : L(i, r) : i;
|
|
4304
4313
|
}
|
|
4305
4314
|
function Vi(t) {
|
|
4306
|
-
return
|
|
4315
|
+
return it(ji, t);
|
|
4307
4316
|
}
|
|
4308
4317
|
function Pi(t) {
|
|
4309
|
-
return
|
|
4318
|
+
return it(Ai, t);
|
|
4310
4319
|
}
|
|
4311
4320
|
function Li(t) {
|
|
4312
|
-
return
|
|
4321
|
+
return it(Ii, t);
|
|
4313
4322
|
}
|
|
4314
4323
|
const Bi = {
|
|
4315
4324
|
en: {
|
|
@@ -4365,7 +4374,7 @@ function Ti(t, e) {
|
|
|
4365
4374
|
let r;
|
|
4366
4375
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4367
4376
|
}
|
|
4368
|
-
function
|
|
4377
|
+
function Me() {
|
|
4369
4378
|
return Ti("name", ...arguments);
|
|
4370
4379
|
}
|
|
4371
4380
|
function Ni(t) {
|
|
@@ -4384,20 +4393,20 @@ function Mi(t, e) {
|
|
|
4384
4393
|
}
|
|
4385
4394
|
function Ui(t) {
|
|
4386
4395
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4387
|
-
At.push(...e),
|
|
4396
|
+
At.push(...e), Ye.push(...r), xe.push(...i), Ut([...e, ...r, ...i]);
|
|
4388
4397
|
}
|
|
4389
4398
|
let qi = 1;
|
|
4390
|
-
const M = {},
|
|
4399
|
+
const M = {}, vt = Symbol("defValue");
|
|
4391
4400
|
function Kt(t) {
|
|
4392
4401
|
const e = {
|
|
4393
|
-
[
|
|
4402
|
+
[Ne.name]: Ne
|
|
4394
4403
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4395
4404
|
t.extendApi
|
|
4396
4405
|
], u = v({}, Si), f = Yr();
|
|
4397
4406
|
let p = { global: {} };
|
|
4398
4407
|
const d = t.isMobile === !0, m = ie({
|
|
4399
4408
|
$mobile: d
|
|
4400
|
-
}), y = Ci(), _ = {},
|
|
4409
|
+
}), y = Ci(), _ = {}, E = {};
|
|
4401
4410
|
Ui(t.attrs || {});
|
|
4402
4411
|
function ee(c) {
|
|
4403
4412
|
const g = M[c];
|
|
@@ -4410,40 +4419,40 @@ function Kt(t) {
|
|
|
4410
4419
|
o.push(c);
|
|
4411
4420
|
}
|
|
4412
4421
|
function T() {
|
|
4413
|
-
const c =
|
|
4422
|
+
const c = Me(...arguments);
|
|
4414
4423
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4415
4424
|
}
|
|
4416
4425
|
function he() {
|
|
4417
|
-
const c =
|
|
4426
|
+
const c = Me(...arguments);
|
|
4418
4427
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : U(v({}, c.prop), {
|
|
4419
4428
|
name: c.id
|
|
4420
4429
|
}));
|
|
4421
4430
|
}
|
|
4422
|
-
function
|
|
4431
|
+
function Pe(c) {
|
|
4423
4432
|
y.use(c);
|
|
4424
4433
|
}
|
|
4425
4434
|
function de() {
|
|
4426
|
-
const c =
|
|
4427
|
-
if (!c.id || !c.prop) return
|
|
4435
|
+
const c = Me(...arguments);
|
|
4436
|
+
if (!c.id || !c.prop) return De;
|
|
4428
4437
|
const g = q(c.id), $ = c.prop, b = $.merge === !0 ? r[g] : void 0;
|
|
4429
|
-
r[g] = Se($, b ||
|
|
4438
|
+
r[g] = Se($, b || De), f[g] = P(g), $.maker && C(f, $.maker);
|
|
4430
4439
|
}
|
|
4431
4440
|
function k(c, g) {
|
|
4432
4441
|
let $;
|
|
4433
4442
|
if (h.String(c)) {
|
|
4434
4443
|
if ($ = c, g === void 0)
|
|
4435
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4444
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? R() : e[$];
|
|
4436
4445
|
} else
|
|
4437
4446
|
$ = q(c.name), g = c;
|
|
4438
4447
|
if (!$ || !g) return;
|
|
4439
4448
|
const b = q($);
|
|
4440
4449
|
e[$] = g, e[b] = g, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], g.formCreateParser && de($, g.formCreateParser);
|
|
4441
4450
|
}
|
|
4442
|
-
function
|
|
4443
|
-
return Zr(
|
|
4451
|
+
function R() {
|
|
4452
|
+
return Zr(Be, e, i);
|
|
4444
4453
|
}
|
|
4445
4454
|
function N() {
|
|
4446
|
-
return
|
|
4455
|
+
return Ne;
|
|
4447
4456
|
}
|
|
4448
4457
|
function pe(c, g) {
|
|
4449
4458
|
return h.Function(c.install) ? c.install(z, g) : h.Function(c) && c(z, g), this;
|
|
@@ -4453,7 +4462,7 @@ function Kt(t) {
|
|
|
4453
4462
|
const w = b.$refs.fc.formCreate;
|
|
4454
4463
|
return w.$parent = $, Ni(w.options).appendChild(b.$el), w.api();
|
|
4455
4464
|
}
|
|
4456
|
-
Se(z,
|
|
4465
|
+
Se(z, E);
|
|
4457
4466
|
function Zt(c) {
|
|
4458
4467
|
let g = v({}, t);
|
|
4459
4468
|
return c ? g.inherit = {
|
|
@@ -4477,7 +4486,7 @@ function Kt(t) {
|
|
|
4477
4486
|
function xt(c, g) {
|
|
4478
4487
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4479
4488
|
g.parsers && Object.keys(g.parsers).forEach((w) => {
|
|
4480
|
-
b[w] = Se(g.parsers[w],
|
|
4489
|
+
b[w] = Se(g.parsers[w], De);
|
|
4481
4490
|
}), g.name = c, n[c] = U(v(v({}, $), g), { parsers: b });
|
|
4482
4491
|
}
|
|
4483
4492
|
function we(c) {
|
|
@@ -4487,18 +4496,18 @@ function Kt(t) {
|
|
|
4487
4496
|
});
|
|
4488
4497
|
});
|
|
4489
4498
|
}
|
|
4490
|
-
function
|
|
4499
|
+
function Le(c, g) {
|
|
4491
4500
|
se(m, c, g), we(c);
|
|
4492
4501
|
}
|
|
4493
4502
|
function Oe(c, g) {
|
|
4494
4503
|
const $ = (...b) => O(() => g(...b));
|
|
4495
|
-
$._driver = !0,
|
|
4504
|
+
$._driver = !0, Le(c, $);
|
|
4496
4505
|
}
|
|
4497
|
-
function
|
|
4506
|
+
function nt(c, g) {
|
|
4498
4507
|
const $ = (c || "").split(".");
|
|
4499
4508
|
c = $.shift();
|
|
4500
4509
|
const b = $.join(".");
|
|
4501
|
-
if (D(m, c) || F(m, c,
|
|
4510
|
+
if (D(m, c) || F(m, c, vt), m[c] !== vt) {
|
|
4502
4511
|
let w = m[c];
|
|
4503
4512
|
return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ? g : w;
|
|
4504
4513
|
} else
|
|
@@ -4513,7 +4522,7 @@ function Kt(t) {
|
|
|
4513
4522
|
function rr(c, g) {
|
|
4514
4523
|
a.push({ name: c, callback: g });
|
|
4515
4524
|
}
|
|
4516
|
-
function
|
|
4525
|
+
function Be(c) {
|
|
4517
4526
|
C(this, {
|
|
4518
4527
|
id: qi++,
|
|
4519
4528
|
create: z,
|
|
@@ -4525,7 +4534,7 @@ function Kt(t) {
|
|
|
4525
4534
|
formulas: _,
|
|
4526
4535
|
isMobile: d,
|
|
4527
4536
|
rules: c.$options.propsData.rule,
|
|
4528
|
-
name: c.$options.propsData.name ||
|
|
4537
|
+
name: c.$options.propsData.name || Ve(),
|
|
4529
4538
|
inFor: c.$options.propsData.inFor,
|
|
4530
4539
|
prop: {
|
|
4531
4540
|
components: e,
|
|
@@ -4551,7 +4560,7 @@ function Kt(t) {
|
|
|
4551
4560
|
}, { deep: !0 });
|
|
4552
4561
|
}), C(c.$options.components, e), C(c.$options.directives, i), this.$handle = new K(this), this.name && (this.inFor ? (M[this.name] || (M[this.name] = []), M[this.name].push(this)) : M[this.name] = this);
|
|
4553
4562
|
}
|
|
4554
|
-
|
|
4563
|
+
Be.isMobile = d, C(Be.prototype, {
|
|
4555
4564
|
init() {
|
|
4556
4565
|
this.isSub() && this.unwatch.push(B(() => this.vm.parent.fc.options.value, () => {
|
|
4557
4566
|
this.initOptions(), this.$handle.api.refresh();
|
|
@@ -4564,8 +4573,8 @@ function Kt(t) {
|
|
|
4564
4573
|
t(c, g, $) {
|
|
4565
4574
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4566
4575
|
return b == null && (b = ""), b && g && Object.keys(g).forEach((w) => {
|
|
4567
|
-
const
|
|
4568
|
-
b = b.replace(
|
|
4576
|
+
const j = new RegExp(`{${w}}`, "g");
|
|
4577
|
+
b = b.replace(j, g[w]);
|
|
4569
4578
|
}), b;
|
|
4570
4579
|
},
|
|
4571
4580
|
globalDataDriver(c) {
|
|
@@ -4576,14 +4585,14 @@ function Kt(t) {
|
|
|
4576
4585
|
return L(b.data, g);
|
|
4577
4586
|
{
|
|
4578
4587
|
let w;
|
|
4579
|
-
const
|
|
4580
|
-
if (
|
|
4581
|
-
if (
|
|
4588
|
+
const j = this.fetchCache.get(b);
|
|
4589
|
+
if (j) {
|
|
4590
|
+
if (j.status && (w = L(j.data, g)), !j.loading)
|
|
4582
4591
|
return w;
|
|
4583
|
-
|
|
4592
|
+
j.loading = !1, this.fetchCache.set(b, j);
|
|
4584
4593
|
} else
|
|
4585
4594
|
this.fetchCache.set(b, { status: !1 });
|
|
4586
|
-
const
|
|
4595
|
+
const S = ne(() => {
|
|
4587
4596
|
le();
|
|
4588
4597
|
const J = this.fetchCache.get(b);
|
|
4589
4598
|
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (J && (J.loading = !0, this.fetchCache.set(b, J)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
@@ -4593,10 +4602,10 @@ function Kt(t) {
|
|
|
4593
4602
|
if (ue && b.watch === !1)
|
|
4594
4603
|
return le();
|
|
4595
4604
|
if (ue) {
|
|
4596
|
-
|
|
4605
|
+
S();
|
|
4597
4606
|
return;
|
|
4598
4607
|
}
|
|
4599
|
-
const me = this.$handle.loadFetchVar(
|
|
4608
|
+
const me = this.$handle.loadFetchVar(Je(b), J);
|
|
4600
4609
|
this.$handle.api.fetch(me).then((te) => {
|
|
4601
4610
|
ae(te);
|
|
4602
4611
|
}).catch((te) => {
|
|
@@ -4614,8 +4623,8 @@ function Kt(t) {
|
|
|
4614
4623
|
globalLanguageDriver(c) {
|
|
4615
4624
|
let g = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4616
4625
|
if (g && (b = O(() => g(c))), b == null && $ && typeof $ == "object" && (b = L($, c)), b == null) {
|
|
4617
|
-
const w = this.options.value.language || {},
|
|
4618
|
-
b = L(w[
|
|
4626
|
+
const w = this.options.value.language || {}, j = this.getLocale();
|
|
4627
|
+
b = L(w[j] || {}, c), b == null && (b = L(Bi[j] || {}, c));
|
|
4619
4628
|
}
|
|
4620
4629
|
return b;
|
|
4621
4630
|
},
|
|
@@ -4625,22 +4634,24 @@ function Kt(t) {
|
|
|
4625
4634
|
if (b) {
|
|
4626
4635
|
const w = h.Function(b) ? b : W(b.handle);
|
|
4627
4636
|
if (w) {
|
|
4628
|
-
let
|
|
4629
|
-
const
|
|
4630
|
-
X ? (this.bus.$emit("$loadData.$var." + $),
|
|
4637
|
+
let j;
|
|
4638
|
+
const S = this.watchLoadData((ae, X) => {
|
|
4639
|
+
X ? (this.bus.$emit("$loadData.$var." + $), S()) : j = w(ae, this.$handle.api);
|
|
4631
4640
|
});
|
|
4632
|
-
return this.unwatch.push(
|
|
4641
|
+
return this.unwatch.push(S), L(j, g);
|
|
4633
4642
|
}
|
|
4634
4643
|
}
|
|
4635
4644
|
},
|
|
4636
4645
|
setData(c, g, $) {
|
|
4637
|
-
$ ?
|
|
4646
|
+
$ ? Le(c, g) : (se(this.vm.top.fc.tmpData, c, g), this.bus.$emit("$loadData." + c));
|
|
4638
4647
|
},
|
|
4639
4648
|
getLoadData(c, g) {
|
|
4640
4649
|
let $ = null;
|
|
4641
4650
|
if (c != null) {
|
|
4642
4651
|
let b = c.split(".");
|
|
4643
4652
|
const w = b.shift();
|
|
4653
|
+
if ($ = L(this.vm.top.fc.tmpData, c), $ != null)
|
|
4654
|
+
return $;
|
|
4644
4655
|
if (w === "$topForm")
|
|
4645
4656
|
$ = this.$handle.api.top.formData(!0);
|
|
4646
4657
|
else if (w === "$scopeForm")
|
|
@@ -4660,10 +4671,7 @@ function Kt(t) {
|
|
|
4660
4671
|
else {
|
|
4661
4672
|
if (w === "$preview")
|
|
4662
4673
|
return this.$handle.preview;
|
|
4663
|
-
|
|
4664
|
-
const S = this.vm.top.fc.tmpData;
|
|
4665
|
-
D(S, w) || F(S, w, Ee), $ = S[w] !== Ee ? L(S, c) : st(c), b = [];
|
|
4666
|
-
}
|
|
4674
|
+
$ = nt(c), b = [];
|
|
4667
4675
|
}
|
|
4668
4676
|
$ && b.length && ($ = L($, b));
|
|
4669
4677
|
}
|
|
@@ -4671,23 +4679,23 @@ function Kt(t) {
|
|
|
4671
4679
|
},
|
|
4672
4680
|
watchLoadData(c, g) {
|
|
4673
4681
|
let $ = {};
|
|
4674
|
-
const b = (
|
|
4682
|
+
const b = (S) => {
|
|
4675
4683
|
this.get || (this.get = w), O(() => {
|
|
4676
|
-
c(w,
|
|
4684
|
+
c(w, S);
|
|
4677
4685
|
}), this.get === w && (this.get = void 0);
|
|
4678
|
-
}, w = (
|
|
4686
|
+
}, w = (S, ae) => {
|
|
4679
4687
|
let X;
|
|
4680
|
-
if (typeof
|
|
4681
|
-
return $[
|
|
4682
|
-
const le = ye(() => X ? X() : this.getLoadData(
|
|
4683
|
-
const fe = X ? X() : this.getLoadData(
|
|
4684
|
-
if ($[
|
|
4685
|
-
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[
|
|
4688
|
+
if (typeof S == "object" && (X = S.getValue, S = S.id), $[S])
|
|
4689
|
+
return $[S].val;
|
|
4690
|
+
const le = ye(() => X ? X() : this.getLoadData(S, ae)), J = S.split("."), ue = J.shift(), me = J.shift() || "", te = ne(() => {
|
|
4691
|
+
const fe = X ? X() : this.getLoadData(S, ae);
|
|
4692
|
+
if ($[S])
|
|
4693
|
+
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[S].val || JSON.stringify(fe) !== JSON.stringify($[S].val)) && ($[S].val = fe, b(!0));
|
|
4686
4694
|
else return;
|
|
4687
4695
|
}, g || 0), nr = B(le, (fe) => {
|
|
4688
4696
|
te();
|
|
4689
4697
|
});
|
|
4690
|
-
return this.bus.$on("$loadData." + ue, te), me && this.bus.$on("$loadData." + ue + "." + me, te), $[
|
|
4698
|
+
return this.bus.$on("$loadData." + ue, te), me && this.bus.$on("$loadData." + ue + "." + me, te), $[S] = {
|
|
4691
4699
|
fn: () => {
|
|
4692
4700
|
this.bus.$off("$loadData." + ue, te), me && this.bus.$off("$loadData." + ue + "." + me, te), nr();
|
|
4693
4701
|
},
|
|
@@ -4695,10 +4703,10 @@ function Kt(t) {
|
|
|
4695
4703
|
}, le.value;
|
|
4696
4704
|
};
|
|
4697
4705
|
b(!1);
|
|
4698
|
-
const
|
|
4699
|
-
Object.keys($).forEach((
|
|
4706
|
+
const j = () => {
|
|
4707
|
+
Object.keys($).forEach((S) => $[S].fn()), $ = {};
|
|
4700
4708
|
};
|
|
4701
|
-
return this.unwatch.push(
|
|
4709
|
+
return this.unwatch.push(j), j;
|
|
4702
4710
|
},
|
|
4703
4711
|
isSub() {
|
|
4704
4712
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4746,15 +4754,15 @@ function Kt(t) {
|
|
|
4746
4754
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4747
4755
|
}
|
|
4748
4756
|
});
|
|
4749
|
-
function
|
|
4757
|
+
function st(c) {
|
|
4750
4758
|
C(c, {
|
|
4751
4759
|
version: t.version,
|
|
4752
4760
|
ui: t.ui,
|
|
4753
4761
|
isMobile: d,
|
|
4754
4762
|
extendApi: er,
|
|
4755
|
-
getData:
|
|
4763
|
+
getData: nt,
|
|
4756
4764
|
setDataDriver: Oe,
|
|
4757
|
-
setData:
|
|
4765
|
+
setData: Le,
|
|
4758
4766
|
removeData: tr,
|
|
4759
4767
|
refreshData: we,
|
|
4760
4768
|
maker: f,
|
|
@@ -4768,12 +4776,12 @@ function Kt(t) {
|
|
|
4768
4776
|
parser: de,
|
|
4769
4777
|
use: pe,
|
|
4770
4778
|
factory: Zt,
|
|
4771
|
-
componentAlias:
|
|
4779
|
+
componentAlias: Pe,
|
|
4772
4780
|
copyRule: Lt,
|
|
4773
4781
|
copyRules: Bt,
|
|
4774
4782
|
mergeRule: x,
|
|
4775
4783
|
fetch: Gt,
|
|
4776
|
-
$form:
|
|
4784
|
+
$form: R,
|
|
4777
4785
|
parseFn: W,
|
|
4778
4786
|
parseJson: Pt,
|
|
4779
4787
|
toJson: _e,
|
|
@@ -4788,34 +4796,34 @@ function Kt(t) {
|
|
|
4788
4796
|
install(g, $) {
|
|
4789
4797
|
if (p = v(v({}, p), $ || {}), g._installedFormCreate === !0) return;
|
|
4790
4798
|
g._installedFormCreate = !0;
|
|
4791
|
-
const b = function(
|
|
4792
|
-
return z(
|
|
4799
|
+
const b = function(j, S = {}) {
|
|
4800
|
+
return z(j, S, this);
|
|
4793
4801
|
};
|
|
4794
|
-
|
|
4795
|
-
const w =
|
|
4796
|
-
g.component(w.name, w), g.component("FcFragment", N()), o.forEach((
|
|
4797
|
-
O(() =>
|
|
4802
|
+
st(b), g.prototype.$formCreate = b;
|
|
4803
|
+
const w = R();
|
|
4804
|
+
g.component(w.name, w), g.component("FcFragment", N()), o.forEach((j) => {
|
|
4805
|
+
O(() => j(c, g));
|
|
4798
4806
|
});
|
|
4799
4807
|
}
|
|
4800
4808
|
});
|
|
4801
4809
|
}
|
|
4802
|
-
if (
|
|
4810
|
+
if (st(E), ir(E), Oe("$cookie", Vi), Oe("$localStorage", Pi), Oe("$sessionStorage", Li), y.use({ fragment: "fcFragment" }), t.install && z.use(t), de(Di), t.inherit) {
|
|
4803
4811
|
const c = t.inherit;
|
|
4804
4812
|
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(m, c.loadData), c.formulas && C(_, c.formulas);
|
|
4805
4813
|
}
|
|
4806
|
-
const Fe =
|
|
4807
|
-
return Se(Fe,
|
|
4814
|
+
const Fe = R();
|
|
4815
|
+
return Se(Fe, E), Object.defineProperties(Fe, {
|
|
4808
4816
|
fetch: {
|
|
4809
4817
|
get() {
|
|
4810
|
-
return
|
|
4818
|
+
return E.fetch;
|
|
4811
4819
|
},
|
|
4812
4820
|
set(c) {
|
|
4813
|
-
|
|
4821
|
+
E.fetch = c;
|
|
4814
4822
|
}
|
|
4815
4823
|
}
|
|
4816
|
-
}), Fe.util =
|
|
4824
|
+
}), Fe.util = E, Fe;
|
|
4817
4825
|
}
|
|
4818
|
-
function
|
|
4826
|
+
function Ue(t) {
|
|
4819
4827
|
if (h.Date(t))
|
|
4820
4828
|
return t;
|
|
4821
4829
|
{
|
|
@@ -4830,7 +4838,7 @@ const _t = "datePicker", Gi = {
|
|
|
4830
4838
|
}(),
|
|
4831
4839
|
mergeProp(t) {
|
|
4832
4840
|
let e = t.prop.props;
|
|
4833
|
-
e.startDate && (e.startDate = e.startDate &&
|
|
4841
|
+
e.startDate && (e.startDate = e.startDate && Ue(e.startDate));
|
|
4834
4842
|
},
|
|
4835
4843
|
isRange(t) {
|
|
4836
4844
|
return t.type.includes("range") || t.multiple;
|
|
@@ -4849,25 +4857,25 @@ const _t = "datePicker", Gi = {
|
|
|
4849
4857
|
return this.isRange(e.el) ? r : r[0];
|
|
4850
4858
|
} else {
|
|
4851
4859
|
let r = Array.isArray(t), i = e.prop.props, s, n = i.type || "date";
|
|
4852
|
-
return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ?
|
|
4860
|
+
return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ? Ue(o) : "") : s = ["", ""] : n === "date" && i.multiple === !0 ? s = toString(t) : (s = r ? t[0] || "" : t, s = s ? Ue(s) : ""), s;
|
|
4853
4861
|
}
|
|
4854
4862
|
},
|
|
4855
4863
|
mounted(t) {
|
|
4856
4864
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
4857
4865
|
}
|
|
4858
|
-
},
|
|
4859
|
-
name:
|
|
4866
|
+
}, qe = "hidden", Hi = {
|
|
4867
|
+
name: qe,
|
|
4860
4868
|
maker: {
|
|
4861
|
-
[
|
|
4869
|
+
[qe]: (t, e) => P(qe)("", t, e)
|
|
4862
4870
|
},
|
|
4863
4871
|
render() {
|
|
4864
4872
|
return [];
|
|
4865
4873
|
}
|
|
4866
|
-
},
|
|
4867
|
-
name:
|
|
4874
|
+
}, Ge = "input", zi = {
|
|
4875
|
+
name: Ge,
|
|
4868
4876
|
maker: function() {
|
|
4869
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(
|
|
4870
|
-
return t.idate = P(
|
|
4877
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(Ge, { type: r }), e), {});
|
|
4878
|
+
return t.idate = P(Ge, { type: "date" }), t;
|
|
4871
4879
|
}(),
|
|
4872
4880
|
mergeProp(t) {
|
|
4873
4881
|
let { props: e } = t.prop;
|
|
@@ -4929,7 +4937,7 @@ const _t = "datePicker", Gi = {
|
|
|
4929
4937
|
array: "fcGroup",
|
|
4930
4938
|
subForm: "fcSubForm",
|
|
4931
4939
|
object: "fcSubForm"
|
|
4932
|
-
},
|
|
4940
|
+
}, Ae = {
|
|
4933
4941
|
resetBtnType: "default",
|
|
4934
4942
|
resetBtnIcon: "md-refresh",
|
|
4935
4943
|
infoIcon: "ios-information-circle-outline"
|
|
@@ -4940,7 +4948,7 @@ function Qi() {
|
|
|
4940
4948
|
trigger: "hover",
|
|
4941
4949
|
placement: "top-start",
|
|
4942
4950
|
wordWrap: !0,
|
|
4943
|
-
icon:
|
|
4951
|
+
icon: Ae.infoIcon
|
|
4944
4952
|
};
|
|
4945
4953
|
}
|
|
4946
4954
|
function Yi() {
|
|
@@ -4965,9 +4973,9 @@ function Yi() {
|
|
|
4965
4973
|
click: void 0
|
|
4966
4974
|
},
|
|
4967
4975
|
resetBtn: {
|
|
4968
|
-
type:
|
|
4976
|
+
type: Ae.resetBtnType,
|
|
4969
4977
|
disabled: !1,
|
|
4970
|
-
icon:
|
|
4978
|
+
icon: Ae.resetBtnIcon,
|
|
4971
4979
|
innerText: "",
|
|
4972
4980
|
loading: !1,
|
|
4973
4981
|
show: !1,
|
|
@@ -4984,7 +4992,7 @@ function Z(t) {
|
|
|
4984
4992
|
function xi(t, e) {
|
|
4985
4993
|
D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4986
4994
|
}
|
|
4987
|
-
function
|
|
4995
|
+
function He(t) {
|
|
4988
4996
|
const e = v({}, t);
|
|
4989
4997
|
return delete e.children, e;
|
|
4990
4998
|
}
|
|
@@ -5058,7 +5066,7 @@ const en = {
|
|
|
5058
5066
|
const f = Z(r.wrap.show) ? e : this.$r(Y([r.wrap, {
|
|
5059
5067
|
props: U(v({
|
|
5060
5068
|
labelWidth: o
|
|
5061
|
-
},
|
|
5069
|
+
}, He(r.wrap || {})), {
|
|
5062
5070
|
prop: t.id,
|
|
5063
5071
|
rules: t.injectValidate()
|
|
5064
5072
|
}),
|
|
@@ -5084,23 +5092,23 @@ const en = {
|
|
|
5084
5092
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5085
5093
|
const _ = {
|
|
5086
5094
|
type: s.type || "poptip",
|
|
5087
|
-
props:
|
|
5095
|
+
props: He(s),
|
|
5088
5096
|
key: `${e}pop`,
|
|
5089
5097
|
slot: "label"
|
|
5090
5098
|
};
|
|
5091
5099
|
delete _.props.icon, delete _.props.show, delete _.props.info, delete _.props.align, delete _.props.native;
|
|
5092
|
-
const
|
|
5093
|
-
s.info && !D(_.props,
|
|
5100
|
+
const E = "content";
|
|
5101
|
+
s.info && !D(_.props, E) && (_.props[E] = (y = (m = r.refRule) == null ? void 0 : m.__$info) == null ? void 0 : y.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, _]), [
|
|
5094
5102
|
this.$r({
|
|
5095
5103
|
type: "icon",
|
|
5096
|
-
props: { type: s.icon === !0 ?
|
|
5104
|
+
props: { type: s.icon === !0 ? Ae.infoIcon : s.icon, size: 16 },
|
|
5097
5105
|
style: "margin-top: -1px",
|
|
5098
5106
|
key: `${e}i`
|
|
5099
5107
|
})
|
|
5100
5108
|
]));
|
|
5101
5109
|
}
|
|
5102
5110
|
const l = Y([i, {
|
|
5103
|
-
props:
|
|
5111
|
+
props: He(i),
|
|
5104
5112
|
key: `${e}tit`,
|
|
5105
5113
|
class: "fc-form-title",
|
|
5106
5114
|
slot: i.slot || "label",
|
|
@@ -5363,7 +5371,7 @@ function cn(t) {
|
|
|
5363
5371
|
function hn() {
|
|
5364
5372
|
return Kt({
|
|
5365
5373
|
ui: "iview",
|
|
5366
|
-
version: "2.7.
|
|
5374
|
+
version: "2.7.12",
|
|
5367
5375
|
manager: en,
|
|
5368
5376
|
install: cn,
|
|
5369
5377
|
extendApi: un,
|
|
@@ -5374,10 +5382,10 @@ function hn() {
|
|
|
5374
5382
|
}
|
|
5375
5383
|
});
|
|
5376
5384
|
}
|
|
5377
|
-
const
|
|
5378
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5379
|
-
const mn =
|
|
5385
|
+
const Qe = hn();
|
|
5386
|
+
typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
|
|
5387
|
+
const mn = Qe.maker;
|
|
5380
5388
|
export {
|
|
5381
|
-
|
|
5389
|
+
Qe as default,
|
|
5382
5390
|
mn as maker
|
|
5383
5391
|
};
|