@form-create/element-ui 3.3.1 → 3.3.3
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 +1245 -1166
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +3 -3
- package/src/core/manager.js +1 -1
package/dist/form-create.esm.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/element-ui v3.3.
|
|
3
|
+
* @form-create/element-ui v3.3.3
|
|
4
4
|
* (c) 2018-2026 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
9
9
|
(function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('._fc-frame ._fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{cursor:not-allowed!important;color:#999}._fc-frame ._fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;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 .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-frame ._fc-upload-btn,._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;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}._fc-group{display:flex;min-height:38px;justify-content:center;flex-direction:column;width:100%}._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;border-radius:5px;margin:5px 5px 25px;padding:20px 20px 25px}._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%}._fc-group._fc-group-card{display:flex;flex-direction:column;width:100%;gap:16px}._fc-group._fc-group-card._fc-group-disabled ._fc-group-btn,._fc-group._fc-group-card._fc-group-disabled ._fc-group-add{cursor:not-allowed;opacity:.5}._fc-group._fc-group-card ._fc-group-container{position:relative;background:#fff;border:1px solid #f0f0f0;border-radius:6px;overflow:hidden;display:flex;flex-direction:column;padding:0;margin:0}._fc-group._fc-group-card ._fc-group-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0;background:#fafafa}._fc-group._fc-group-card ._fc-group-idx{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#f0f0f0;color:#666;border-radius:6px;font-size:12px;font-weight:500;margin-right:12px;flex-shrink:0;position:static;border:1px solid #e0e0e0}._fc-group._fc-group-card ._fc-group-title{flex:1;font-size:14px;font-weight:500;color:#000000d9;line-height:1.5715}._fc-group._fc-group-card ._fc-group-handle{display:flex;align-items:center;gap:4px;margin-left:12px;flex-shrink:0;position:static;bottom:auto;right:auto;border-radius:0;border:none;padding:0;background-color:transparent;flex-direction:row}._fc-group._fc-group-card ._fc-group-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;border:1px solid #d9d9d9;background:#fff;color:#00000073;position:relative}._fc-group._fc-group-card ._fc-group-btn:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}._fc-group._fc-group-card ._fc-group-btn:active{color:#096dd9;border-color:#096dd9}._fc-group._fc-group-card ._fc-group-arrow{position:relative}._fc-group._fc-group-card ._fc-group-arrow:before{content:"";position:absolute;top:50%;left:50%;width:5px;height:5px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:translate(-50%,-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group._fc-group-card ._fc-group-sort{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:24px}._fc-group._fc-group-card ._fc-group-sort:before,._fc-group._fc-group-card ._fc-group-sort:after{content:"";position:absolute;left:50%;width:4px;height:4px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:translate(-50%)}._fc-group._fc-group-card ._fc-group-sort:before{top:6px;transform:translate(-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-sort:after{bottom:6px;transform:translate(-50%) rotate(225deg)}._fc-group._fc-group-card ._fc-group-sort-up,._fc-group._fc-group-card ._fc-group-sort-down{position:absolute;left:0;right:0;height:12px;cursor:pointer;z-index:1}._fc-group._fc-group-card ._fc-group-sort-up{top:0}._fc-group._fc-group-card ._fc-group-sort-down{bottom:0}._fc-group._fc-group-card ._fc-group-sort-up:hover,._fc-group._fc-group-card ._fc-group-sort-down:hover{background:#1890ff1a}._fc-group._fc-group-card ._fc-group-plus-minus{position:relative;background:#409eff;border-color:#409eff;color:#fff;width:24px;height:24px}._fc-group._fc-group-card ._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-plus-minus:before,._fc-group._fc-group-card ._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1px;background-color:currentColor;transform:translate(-50%,-50%)}._fc-group._fc-group-card ._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus{background:#f56c6c;border-color:#f56c6c}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:hover{background:#f78989;border-color:#f78989}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group._fc-group-card ._fc-group-content{padding:20px}._fc-group._fc-group-card ._fc-group-add{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;border:1px solid #d9d9d9;background:#fff;color:#00000073;position:relative}._fc-group._fc-group-card ._fc-group-add:hover{color:#409eff;border-color:#409eff;background:#f0f8ff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus{width:24px;height:24px;background:#409eff;border-color:#409eff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before,._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1px;background-color:currentColor;transform:translate(-50%,-50%)}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-empty{text-align:center;padding:40px 20px;color:#00000073;font-size:14px}@media (max-width: 768px){._fc-group._fc-group-card ._fc-group-container{margin:0 -8px;border-radius:0;border-left:none;border-right:none}._fc-group._fc-group-card ._fc-group-header{padding:12px 16px 8px}._fc-group._fc-group-card ._fc-group-content{padding:16px}._fc-group._fc-group-card ._fc-group-handle{gap:2px}._fc-group._fc-group-card ._fc-group-btn{width:22px;height:22px}}.form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left;float:unset}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
var vr = Object.defineProperty, _r = Object.defineProperties;
|
|
11
|
+
var wr = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var gt = Object.getOwnPropertySymbols;
|
|
13
|
+
var Cr = Object.prototype.hasOwnProperty, Sr = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var yt = (t, e, r) => e in t ? vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, _ = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
|
|
16
|
+
Cr.call(e, r) && yt(t, r, e[r]);
|
|
17
|
+
if (gt)
|
|
18
|
+
for (var r of gt(e))
|
|
19
|
+
Sr.call(e, r) && yt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
},
|
|
22
|
-
import { defineComponent as re, resolveComponent as
|
|
23
|
-
function
|
|
21
|
+
}, z = (t, e) => _r(t, wr(e));
|
|
22
|
+
import { defineComponent as re, resolveComponent as O, createVNode as v, mergeProps as x, toRef as L, ref as ot, watch as B, computed as se, openBlock as U, createElementBlock as X, createElementVNode as de, nextTick as I, createBlock as Te, withCtx as bt, Fragment as Ye, renderList as $t, renderSlot as Vr, markRaw as fe, reactive as Z, isVNode as Fr, getCurrentInstance as tt, provide as Or, inject as Er, toRefs as vt, onBeforeMount as Rr, watchEffect as kr, onMounted as Dr, onBeforeUnmount as Ar, onUpdated as jr, withDirectives as Ir, resolveDirective as Pr, createApp as Br, h as Tr } from "vue";
|
|
23
|
+
function at(t, e) {
|
|
24
24
|
return Object.keys(t).reduce((r, n) => ((!e || e.indexOf(n) === -1) && (r[n] = t[n]), r), {});
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function q(t) {
|
|
27
27
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
name:
|
|
29
|
+
const Lr = "fcCheckbox", Mr = /* @__PURE__ */ re({
|
|
30
|
+
name: Lr,
|
|
31
31
|
inheritAttrs: !1,
|
|
32
32
|
props: {
|
|
33
33
|
formCreateInject: Object,
|
|
@@ -42,48 +42,48 @@ const Pr = "fcCheckbox", Br = /* @__PURE__ */ re({
|
|
|
42
42
|
},
|
|
43
43
|
emits: ["update:modelValue", "fc.el"],
|
|
44
44
|
setup(t, e) {
|
|
45
|
-
const r =
|
|
46
|
-
const h = [...
|
|
47
|
-
o.value =
|
|
45
|
+
const r = L(t.formCreateInject, "options", []), n = L(t, "options"), s = L(t, "modelValue"), i = L(t, "inputValue", ""), o = ot(i.value), a = L(t, "input", !1), l = (c) => {
|
|
46
|
+
const h = [...q(s.value)], p = h.indexOf(o.value);
|
|
47
|
+
o.value = c, p > -1 && (h.splice(p, 1), h.push(c), f(h));
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
B(i, (c) => {
|
|
50
50
|
if (!a.value) {
|
|
51
|
-
o.value =
|
|
51
|
+
o.value = c;
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
l(
|
|
54
|
+
l(c);
|
|
55
55
|
});
|
|
56
56
|
const u = se(() => {
|
|
57
|
-
let
|
|
58
|
-
return n.value && (
|
|
57
|
+
let c = r.value || [];
|
|
58
|
+
return n.value && (c = n.value || []), Array.isArray(c) ? c : [];
|
|
59
59
|
});
|
|
60
|
-
|
|
60
|
+
B(s, (c) => {
|
|
61
61
|
let h = null;
|
|
62
|
-
if (!i.value &&
|
|
63
|
-
const p = u.value.map((
|
|
64
|
-
|
|
65
|
-
p.indexOf(
|
|
62
|
+
if (!i.value && c != null && Array.isArray(c) && c.length > 0 && a.value) {
|
|
63
|
+
const p = u.value.map((y) => y.value);
|
|
64
|
+
c.forEach((y) => {
|
|
65
|
+
p.indexOf(y) === -1 && (h = y);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
h != null && (o.value = h);
|
|
69
69
|
}, {
|
|
70
70
|
immediate: !0
|
|
71
71
|
});
|
|
72
|
-
const f = (
|
|
73
|
-
e.emit("update:modelValue",
|
|
72
|
+
const f = (c) => {
|
|
73
|
+
e.emit("update:modelValue", c);
|
|
74
74
|
};
|
|
75
75
|
return {
|
|
76
76
|
options: u,
|
|
77
77
|
value: s,
|
|
78
78
|
onInput: f,
|
|
79
79
|
updateCustomValue: l,
|
|
80
|
-
makeInput(
|
|
80
|
+
makeInput(c) {
|
|
81
81
|
if (a.value)
|
|
82
|
-
return v(
|
|
82
|
+
return v(c, {
|
|
83
83
|
value: o.value || void 0,
|
|
84
84
|
label: o.value || void 0
|
|
85
85
|
}, {
|
|
86
|
-
default: () => [v(
|
|
86
|
+
default: () => [v(O("ElInput"), {
|
|
87
87
|
size: "small",
|
|
88
88
|
modelValue: o.value,
|
|
89
89
|
"onUpdate:modelValue": l
|
|
@@ -93,8 +93,8 @@ const Pr = "fcCheckbox", Br = /* @__PURE__ */ re({
|
|
|
93
93
|
};
|
|
94
94
|
},
|
|
95
95
|
render() {
|
|
96
|
-
const t = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox", e =
|
|
97
|
-
return v(
|
|
96
|
+
const t = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox", e = O(t);
|
|
97
|
+
return v(O("ElCheckboxGroup"), x(this.$attrs, {
|
|
98
98
|
modelValue: this.value === null ? void 0 : this.value,
|
|
99
99
|
"onUpdate:modelValue": this.onInput,
|
|
100
100
|
ref: "el"
|
|
@@ -103,7 +103,7 @@ const Pr = "fcCheckbox", Br = /* @__PURE__ */ re({
|
|
|
103
103
|
var r, n;
|
|
104
104
|
return [this.options.map((s, i) => {
|
|
105
105
|
const o = _({}, s), a = o.value, l = o.label;
|
|
106
|
-
return delete o.value, delete o.label, v(e,
|
|
106
|
+
return delete o.value, delete o.label, v(e, x(o, {
|
|
107
107
|
label: a,
|
|
108
108
|
value: a,
|
|
109
109
|
key: t + i + "-" + a
|
|
@@ -112,13 +112,13 @@ const Pr = "fcCheckbox", Br = /* @__PURE__ */ re({
|
|
|
112
112
|
});
|
|
113
113
|
}), (n = (r = this.$slots).default) == null ? void 0 : n.call(r), this.makeInput(e)];
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, at(this.$slots, ["default"])));
|
|
116
116
|
},
|
|
117
117
|
mounted() {
|
|
118
118
|
this.$emit("fc.el", this.$refs.el);
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
function
|
|
121
|
+
function Ut(t) {
|
|
122
122
|
t = t || /* @__PURE__ */ new Map();
|
|
123
123
|
const e = {
|
|
124
124
|
$on(r, n) {
|
|
@@ -142,92 +142,92 @@ function Tt(t) {
|
|
|
142
142
|
};
|
|
143
143
|
return e;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const me = (t, e) => {
|
|
146
146
|
const r = t.__vccOpts || t;
|
|
147
147
|
for (const [n, s] of e)
|
|
148
148
|
r[n] = s;
|
|
149
149
|
return r;
|
|
150
|
-
},
|
|
150
|
+
}, Nr = {
|
|
151
151
|
name: "IconCircleClose"
|
|
152
|
-
},
|
|
152
|
+
}, Ur = {
|
|
153
153
|
class: "icon",
|
|
154
154
|
viewBox: "0 0 1024 1024",
|
|
155
155
|
xmlns: "http://www.w3.org/2000/svg"
|
|
156
156
|
};
|
|
157
|
-
function
|
|
158
|
-
return
|
|
159
|
-
|
|
157
|
+
function qr(t, e, r, n, s, i) {
|
|
158
|
+
return U(), X("svg", Ur, [...e[0] || (e[0] = [
|
|
159
|
+
de("path", {
|
|
160
160
|
fill: "currentColor",
|
|
161
161
|
d: "M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"
|
|
162
162
|
}, null, -1),
|
|
163
|
-
|
|
163
|
+
de("path", {
|
|
164
164
|
fill: "currentColor",
|
|
165
165
|
d: "M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"
|
|
166
166
|
}, null, -1)
|
|
167
167
|
])]);
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const Hr = /* @__PURE__ */ me(Nr, [["render", qr]]), zr = {
|
|
170
170
|
name: "IconDocument"
|
|
171
|
-
},
|
|
171
|
+
}, xr = {
|
|
172
172
|
class: "icon",
|
|
173
173
|
viewBox: "0 0 1024 1024",
|
|
174
174
|
xmlns: "http://www.w3.org/2000/svg"
|
|
175
175
|
};
|
|
176
|
-
function
|
|
177
|
-
return
|
|
178
|
-
|
|
176
|
+
function Gr(t, e, r, n, s, i) {
|
|
177
|
+
return U(), X("svg", xr, [...e[0] || (e[0] = [
|
|
178
|
+
de("path", {
|
|
179
179
|
fill: "currentColor",
|
|
180
180
|
d: "M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"
|
|
181
181
|
}, null, -1)
|
|
182
182
|
])]);
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Yr = /* @__PURE__ */ me(zr, [["render", Gr]]), Kr = {
|
|
185
185
|
name: "IconDelete"
|
|
186
|
-
},
|
|
186
|
+
}, Wr = {
|
|
187
187
|
class: "icon",
|
|
188
188
|
viewBox: "0 0 1024 1024",
|
|
189
189
|
xmlns: "http://www.w3.org/2000/svg"
|
|
190
190
|
};
|
|
191
|
-
function
|
|
192
|
-
return
|
|
193
|
-
|
|
191
|
+
function Jr(t, e, r, n, s, i) {
|
|
192
|
+
return U(), X("svg", Wr, [...e[0] || (e[0] = [
|
|
193
|
+
de("path", {
|
|
194
194
|
fill: "currentColor",
|
|
195
195
|
d: "M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"
|
|
196
196
|
}, null, -1)
|
|
197
197
|
])]);
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const Qr = /* @__PURE__ */ me(Kr, [["render", Jr]]), Xr = {
|
|
200
200
|
name: "IconView"
|
|
201
|
-
},
|
|
201
|
+
}, Zr = {
|
|
202
202
|
class: "icon",
|
|
203
203
|
viewBox: "0 0 1024 1024",
|
|
204
204
|
xmlns: "http://www.w3.org/2000/svg"
|
|
205
205
|
};
|
|
206
|
-
function
|
|
207
|
-
return
|
|
208
|
-
|
|
206
|
+
function en(t, e, r, n, s, i) {
|
|
207
|
+
return U(), X("svg", Zr, [...e[0] || (e[0] = [
|
|
208
|
+
de("path", {
|
|
209
209
|
fill: "currentColor",
|
|
210
210
|
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"
|
|
211
211
|
}, null, -1)
|
|
212
212
|
])]);
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const tn = /* @__PURE__ */ me(Xr, [["render", en]]), rn = {
|
|
215
215
|
name: "IconFolderOpened"
|
|
216
|
-
},
|
|
216
|
+
}, nn = {
|
|
217
217
|
class: "icon",
|
|
218
218
|
viewBox: "0 0 1024 1024",
|
|
219
219
|
xmlns: "http://www.w3.org/2000/svg"
|
|
220
220
|
};
|
|
221
|
-
function
|
|
222
|
-
return
|
|
223
|
-
|
|
221
|
+
function sn(t, e, r, n, s, i) {
|
|
222
|
+
return U(), X("svg", nn, [...e[0] || (e[0] = [
|
|
223
|
+
de("path", {
|
|
224
224
|
fill: "currentColor",
|
|
225
225
|
d: "M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"
|
|
226
226
|
}, null, -1)
|
|
227
227
|
])]);
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
name:
|
|
229
|
+
const on = /* @__PURE__ */ me(rn, [["render", sn]]), an = "fcFrame", ln = /* @__PURE__ */ re({
|
|
230
|
+
name: an,
|
|
231
231
|
props: {
|
|
232
232
|
type: {
|
|
233
233
|
type: String,
|
|
@@ -338,21 +338,21 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
338
338
|
},
|
|
339
339
|
emits: ["update:modelValue", "change"],
|
|
340
340
|
components: {
|
|
341
|
-
IconFolderOpened:
|
|
342
|
-
IconView:
|
|
341
|
+
IconFolderOpened: on,
|
|
342
|
+
IconView: tn
|
|
343
343
|
},
|
|
344
344
|
data() {
|
|
345
345
|
return {
|
|
346
|
-
fileList:
|
|
346
|
+
fileList: q(this.modelValue),
|
|
347
347
|
previewVisible: !1,
|
|
348
348
|
frameVisible: !1,
|
|
349
349
|
previewImage: "",
|
|
350
|
-
bus: new
|
|
350
|
+
bus: new Ut()
|
|
351
351
|
};
|
|
352
352
|
},
|
|
353
353
|
watch: {
|
|
354
354
|
modelValue(t) {
|
|
355
|
-
this.fileList =
|
|
355
|
+
this.fileList = q(t);
|
|
356
356
|
}
|
|
357
357
|
},
|
|
358
358
|
methods: {
|
|
@@ -373,24 +373,24 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
373
373
|
this.$emit("update:modelValue", e), this.$emit("change", e);
|
|
374
374
|
},
|
|
375
375
|
makeInput() {
|
|
376
|
-
return v(
|
|
376
|
+
return v(O("ElInput"), x({
|
|
377
377
|
type: "text",
|
|
378
378
|
modelValue: this.fileList.map((t) => this.getSrc(t)).toString(),
|
|
379
379
|
readonly: !0
|
|
380
380
|
}, {
|
|
381
381
|
key: 1
|
|
382
382
|
}), {
|
|
383
|
-
append: () => v(
|
|
384
|
-
icon:
|
|
383
|
+
append: () => v(O("ElButton"), {
|
|
384
|
+
icon: O(this.icon),
|
|
385
385
|
onClick: () => this.showModel()
|
|
386
386
|
}, null),
|
|
387
|
-
suffix: () => this.fileList.length && !this.disabled ? v(
|
|
387
|
+
suffix: () => this.fileList.length && !this.disabled ? v(O("ElIcon"), {
|
|
388
388
|
class: "el-input__icon _fc-upload-icon",
|
|
389
389
|
onClick: () => {
|
|
390
390
|
this.fileList = [], this.input();
|
|
391
391
|
}
|
|
392
392
|
}, {
|
|
393
|
-
default: () => [v(
|
|
393
|
+
default: () => [v(Hr, null, null)]
|
|
394
394
|
}) : null
|
|
395
395
|
});
|
|
396
396
|
},
|
|
@@ -420,8 +420,8 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
makeHandleIcon(t, e) {
|
|
423
|
-
const r =
|
|
424
|
-
return v(
|
|
423
|
+
const r = O(this.handleIcon === !0 || this.handleIcon === void 0 ? "icon-view" : this.handleIcon);
|
|
424
|
+
return v(O("ElIcon"), {
|
|
425
425
|
onClick: () => this.handleClick(t),
|
|
426
426
|
key: "5" + e
|
|
427
427
|
}, {
|
|
@@ -429,18 +429,18 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
429
429
|
});
|
|
430
430
|
},
|
|
431
431
|
makeRemoveIcon(t, e) {
|
|
432
|
-
return v(
|
|
432
|
+
return v(O("ElIcon"), {
|
|
433
433
|
onClick: () => this.handleRemove(t),
|
|
434
434
|
key: "6" + e
|
|
435
435
|
}, {
|
|
436
|
-
default: () => [v(
|
|
436
|
+
default: () => [v(Qr, null, null)]
|
|
437
437
|
});
|
|
438
438
|
},
|
|
439
439
|
makeFiles() {
|
|
440
|
-
return this.makeGroup(this.fileList.map((t, e) => this.makeItem(e, [v(
|
|
440
|
+
return this.makeGroup(this.fileList.map((t, e) => this.makeItem(e, [v(O("ElIcon"), {
|
|
441
441
|
onClick: () => this.handleClick(t)
|
|
442
442
|
}, {
|
|
443
|
-
default: () => [v(
|
|
443
|
+
default: () => [v(Yr, null, null)]
|
|
444
444
|
}), this.makeIcons(t, e)])));
|
|
445
445
|
},
|
|
446
446
|
makeImages() {
|
|
@@ -449,12 +449,12 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
449
449
|
}, null), this.makeIcons(t, e)])));
|
|
450
450
|
},
|
|
451
451
|
makeBtn() {
|
|
452
|
-
const t =
|
|
452
|
+
const t = O(this.icon);
|
|
453
453
|
return v("div", {
|
|
454
454
|
class: "_fc-upload-btn",
|
|
455
455
|
onClick: () => this.showModel(),
|
|
456
456
|
key: 7
|
|
457
|
-
}, [v(
|
|
457
|
+
}, [v(O("ElIcon"), null, {
|
|
458
458
|
default: () => [v(t, null, null)]
|
|
459
459
|
})]);
|
|
460
460
|
},
|
|
@@ -497,11 +497,11 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
497
497
|
footer: s
|
|
498
498
|
} = this.$props;
|
|
499
499
|
if (s)
|
|
500
|
-
return v("div", null, [r ? v(
|
|
500
|
+
return v("div", null, [r ? v(O("ElButton"), {
|
|
501
501
|
onClick: () => this.onCancel() !== !1 && (this.frameVisible = !1)
|
|
502
502
|
}, {
|
|
503
503
|
default: () => [e || this.formCreateInject.t("close") || "关闭"]
|
|
504
|
-
}) : null, n ? v(
|
|
504
|
+
}) : null, n ? v(O("ElButton"), {
|
|
505
505
|
type: "primary",
|
|
506
506
|
onClick: () => this.onOk() !== !1 && this.closeModel()
|
|
507
507
|
}, {
|
|
@@ -527,7 +527,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
527
527
|
"_fc-frame": !0,
|
|
528
528
|
"_fc-disabled": this.disabled
|
|
529
529
|
}
|
|
530
|
-
}, [e, v(
|
|
530
|
+
}, [e, v(O("ElDialog"), {
|
|
531
531
|
appendToBody: !0,
|
|
532
532
|
modal: this.previewMask,
|
|
533
533
|
title: o,
|
|
@@ -538,7 +538,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
538
538
|
style: "width: 100%",
|
|
539
539
|
src: this.previewImage
|
|
540
540
|
}, null)]
|
|
541
|
-
}), v(
|
|
541
|
+
}), v(O("ElDialog"), x({
|
|
542
542
|
appendToBody: !0
|
|
543
543
|
}, _({
|
|
544
544
|
width: r,
|
|
@@ -576,8 +576,8 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
576
576
|
} = this.formCreateInject;
|
|
577
577
|
t && r.off("fc:closeModal:" + t, this.close), e && r.off("fc:closeModal:" + e, this.close);
|
|
578
578
|
}
|
|
579
|
-
}),
|
|
580
|
-
name:
|
|
579
|
+
}), un = "fcRadio", fn = /* @__PURE__ */ re({
|
|
580
|
+
name: un,
|
|
581
581
|
inheritAttrs: !1,
|
|
582
582
|
props: {
|
|
583
583
|
formCreateInject: Object,
|
|
@@ -592,29 +592,29 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
592
592
|
},
|
|
593
593
|
emits: ["update:modelValue", "fc.el"],
|
|
594
594
|
setup(t, e) {
|
|
595
|
-
const r =
|
|
596
|
-
|
|
595
|
+
const r = L(t.formCreateInject, "options", []), n = L(t, "options"), s = L(t, "modelValue"), i = L(t, "inputValue", ""), o = ot(i.value), a = L(t, "input", !1);
|
|
596
|
+
B(i, (c) => {
|
|
597
597
|
if (!a.value) {
|
|
598
|
-
o.value =
|
|
598
|
+
o.value = c;
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
|
-
f(
|
|
601
|
+
f(c);
|
|
602
602
|
});
|
|
603
603
|
const l = se(() => {
|
|
604
|
-
let
|
|
605
|
-
return n.value && (
|
|
604
|
+
let c = r.value || [];
|
|
605
|
+
return n.value && (c = n.value || []), Array.isArray(c) ? c : [];
|
|
606
606
|
});
|
|
607
|
-
|
|
607
|
+
B(s, (c) => {
|
|
608
608
|
let h = !1;
|
|
609
|
-
!i.value &&
|
|
609
|
+
!i.value && c != null && a.value && (h = l.value.map((p) => p.value).indexOf(c) === -1), h && (o.value = c);
|
|
610
610
|
}, {
|
|
611
611
|
immediate: !0
|
|
612
612
|
});
|
|
613
|
-
const u = (
|
|
614
|
-
e.emit("update:modelValue",
|
|
615
|
-
}, f = (
|
|
613
|
+
const u = (c) => {
|
|
614
|
+
e.emit("update:modelValue", c);
|
|
615
|
+
}, f = (c) => {
|
|
616
616
|
const h = o.value;
|
|
617
|
-
o.value =
|
|
617
|
+
o.value = c, s.value === h && u(c);
|
|
618
618
|
};
|
|
619
619
|
return {
|
|
620
620
|
options: l,
|
|
@@ -622,14 +622,14 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
622
622
|
onInput: u,
|
|
623
623
|
updateCustomValue: f,
|
|
624
624
|
customValue: o,
|
|
625
|
-
makeInput(
|
|
625
|
+
makeInput(c) {
|
|
626
626
|
if (a.value)
|
|
627
|
-
return v(
|
|
627
|
+
return v(c, {
|
|
628
628
|
checked: !1,
|
|
629
629
|
value: o.value || void 0,
|
|
630
630
|
label: o.value || void 0
|
|
631
631
|
}, {
|
|
632
|
-
default: () => [v(
|
|
632
|
+
default: () => [v(O("ElInput"), {
|
|
633
633
|
size: "small",
|
|
634
634
|
modelValue: o.value,
|
|
635
635
|
"onUpdate:modelValue": f
|
|
@@ -639,8 +639,8 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
639
639
|
};
|
|
640
640
|
},
|
|
641
641
|
render() {
|
|
642
|
-
const t = this.type === "button" ? "ElRadioButton" : "ElRadio", e =
|
|
643
|
-
return v(
|
|
642
|
+
const t = this.type === "button" ? "ElRadioButton" : "ElRadio", e = O(t);
|
|
643
|
+
return v(O("ElRadioGroup"), x(this.$attrs, {
|
|
644
644
|
modelValue: this.value,
|
|
645
645
|
"onUpdate:modelValue": this.onInput,
|
|
646
646
|
ref: "el"
|
|
@@ -649,7 +649,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
649
649
|
var r, n;
|
|
650
650
|
return [this.options.map((s, i) => {
|
|
651
651
|
const o = _({}, s), a = o.value, l = o.label;
|
|
652
|
-
return delete o.value, delete o.label, v(e,
|
|
652
|
+
return delete o.value, delete o.label, v(e, x(o, {
|
|
653
653
|
label: a,
|
|
654
654
|
value: a,
|
|
655
655
|
key: t + i + "-" + a
|
|
@@ -658,7 +658,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
658
658
|
});
|
|
659
659
|
}), (n = (r = this.$slots).default) == null ? void 0 : n.call(r), this.makeInput(e)];
|
|
660
660
|
}
|
|
661
|
-
},
|
|
661
|
+
}, at(this.$slots, ["default"])));
|
|
662
662
|
},
|
|
663
663
|
mounted() {
|
|
664
664
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -696,8 +696,8 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
696
696
|
function D(t, e) {
|
|
697
697
|
return {}.hasOwnProperty.call(t, e);
|
|
698
698
|
}
|
|
699
|
-
const
|
|
700
|
-
name:
|
|
699
|
+
const cn = "fcSelect", dn = re({
|
|
700
|
+
name: cn,
|
|
701
701
|
inheritAttrs: !1,
|
|
702
702
|
props: {
|
|
703
703
|
formCreateInject: Object,
|
|
@@ -709,7 +709,7 @@ const ln = "fcSelect", un = re({
|
|
|
709
709
|
},
|
|
710
710
|
emits: ["update:modelValue", "fc.el"],
|
|
711
711
|
setup(t, { emit: e }) {
|
|
712
|
-
const r =
|
|
712
|
+
const r = L(t.formCreateInject, "options", []), n = L(t, "modelValue");
|
|
713
713
|
return {
|
|
714
714
|
options: se(() => Array.isArray(r.value) ? r.value : []),
|
|
715
715
|
value: n,
|
|
@@ -724,36 +724,36 @@ const ln = "fcSelect", un = re({
|
|
|
724
724
|
this.$emit("fc.el", this.$refs.el);
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
|
-
function
|
|
728
|
-
const o =
|
|
729
|
-
return
|
|
727
|
+
function hn(t, e, r, n, s, i) {
|
|
728
|
+
const o = O("el-option"), a = O("el-option-group"), l = O("el-select");
|
|
729
|
+
return U(), Te(l, x(t.$attrs, {
|
|
730
730
|
"model-value": t.value,
|
|
731
731
|
"onUpdate:modelValue": t.handleUpdate,
|
|
732
732
|
ref: "el"
|
|
733
733
|
}), {
|
|
734
|
-
default:
|
|
735
|
-
(
|
|
736
|
-
t.hasProperty(u, "options") ? (
|
|
734
|
+
default: bt(() => [
|
|
735
|
+
(U(!0), X(Ye, null, $t(t.options, (u, f) => (U(), X(Ye, null, [
|
|
736
|
+
t.hasProperty(u, "options") ? (U(), Te(a, {
|
|
737
737
|
label: u.label,
|
|
738
738
|
key: `${f}-${u.label}`
|
|
739
739
|
}, {
|
|
740
|
-
default:
|
|
741
|
-
(
|
|
742
|
-
key: `${h}-${
|
|
743
|
-
}, { ref_for: !0 },
|
|
740
|
+
default: bt(() => [
|
|
741
|
+
(U(!0), X(Ye, null, $t(t.is.trueArray(u.options) ? u.options : [], (c, h) => (U(), Te(o, x({
|
|
742
|
+
key: `${h}-${c.value}`
|
|
743
|
+
}, { ref_for: !0 }, c), null, 16))), 128))
|
|
744
744
|
]),
|
|
745
745
|
_: 2
|
|
746
|
-
}, 1032, ["label"])) : (
|
|
746
|
+
}, 1032, ["label"])) : (U(), Te(o, x({
|
|
747
747
|
key: `${f}-${u.value}`
|
|
748
748
|
}, { ref_for: !0 }, u), null, 16))
|
|
749
749
|
], 64))), 256)),
|
|
750
|
-
|
|
750
|
+
Vr(t.$slots, "default")
|
|
751
751
|
]),
|
|
752
752
|
_: 3
|
|
753
753
|
}, 16, ["model-value", "onUpdate:modelValue"]);
|
|
754
754
|
}
|
|
755
|
-
const
|
|
756
|
-
name:
|
|
755
|
+
const pn = /* @__PURE__ */ me(dn, [["render", hn]]), mn = "fcTree", gn = /* @__PURE__ */ re({
|
|
756
|
+
name: mn,
|
|
757
757
|
inheritAttrs: !1,
|
|
758
758
|
formCreateParser: {
|
|
759
759
|
mergeProp(t) {
|
|
@@ -784,11 +784,11 @@ const cn = /* @__PURE__ */ ge(un, [["render", fn]]), dn = "fcTree", hn = /* @__P
|
|
|
784
784
|
},
|
|
785
785
|
setValue() {
|
|
786
786
|
if (!this.$refs.tree) return;
|
|
787
|
-
this.type === "selected" ? this.$refs.tree.setCurrentKey(this.modelValue) : this.$refs.tree.setCheckedKeys(
|
|
787
|
+
this.type === "selected" ? this.$refs.tree.setCurrentKey(this.modelValue) : this.$refs.tree.setCheckedKeys(q(this.modelValue));
|
|
788
788
|
}
|
|
789
789
|
},
|
|
790
790
|
render() {
|
|
791
|
-
return v(
|
|
791
|
+
return v(O("ElTree"), x(this.$attrs, {
|
|
792
792
|
ref: "tree",
|
|
793
793
|
onCheck: this.updateValue,
|
|
794
794
|
onNodeClick: this.updateValue
|
|
@@ -797,45 +797,45 @@ const cn = /* @__PURE__ */ ge(un, [["render", fn]]), dn = "fcTree", hn = /* @__P
|
|
|
797
797
|
mounted() {
|
|
798
798
|
this.setValue(), this.$emit("fc.el", this.$refs.tree);
|
|
799
799
|
}
|
|
800
|
-
}),
|
|
800
|
+
}), yn = {
|
|
801
801
|
name: "IconUpload"
|
|
802
|
-
},
|
|
802
|
+
}, bn = {
|
|
803
803
|
class: "icon",
|
|
804
804
|
viewBox: "0 0 1024 1024",
|
|
805
805
|
xmlns: "http://www.w3.org/2000/svg"
|
|
806
806
|
};
|
|
807
|
-
function
|
|
808
|
-
return
|
|
809
|
-
|
|
807
|
+
function $n(t, e, r, n, s, i) {
|
|
808
|
+
return U(), X("svg", bn, [...e[0] || (e[0] = [
|
|
809
|
+
de("path", {
|
|
810
810
|
fill: "currentColor",
|
|
811
811
|
d: "M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"
|
|
812
812
|
}, null, -1)
|
|
813
813
|
])]);
|
|
814
814
|
}
|
|
815
|
-
const
|
|
816
|
-
function
|
|
815
|
+
const vn = /* @__PURE__ */ me(yn, [["render", $n]]);
|
|
816
|
+
function _t(t, e) {
|
|
817
817
|
return typeof t == "object" ? t : {
|
|
818
818
|
url: t,
|
|
819
819
|
is_string: !0,
|
|
820
|
-
name:
|
|
820
|
+
name: _n(t),
|
|
821
821
|
uid: e
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
return
|
|
824
|
+
function wt(t) {
|
|
825
|
+
return z(_({}, t), {
|
|
826
826
|
file: t,
|
|
827
827
|
value: t
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function _n(t) {
|
|
831
831
|
return ("" + t).split("/").pop();
|
|
832
832
|
}
|
|
833
|
-
const
|
|
834
|
-
name:
|
|
833
|
+
const wn = "fcUpload", Cn = /* @__PURE__ */ re({
|
|
834
|
+
name: wn,
|
|
835
835
|
inheritAttrs: !1,
|
|
836
836
|
formCreateParser: {
|
|
837
837
|
toFormValue(t) {
|
|
838
|
-
return
|
|
838
|
+
return q(t);
|
|
839
839
|
},
|
|
840
840
|
toValue(t, e) {
|
|
841
841
|
return e.prop.props.limit === 1 ? t[0] || "" : t;
|
|
@@ -860,11 +860,11 @@ const $n = "fcUpload", vn = /* @__PURE__ */ re({
|
|
|
860
860
|
};
|
|
861
861
|
},
|
|
862
862
|
created() {
|
|
863
|
-
this.fileList =
|
|
863
|
+
this.fileList = q(this.modelValue).map(_t).map(wt);
|
|
864
864
|
},
|
|
865
865
|
watch: {
|
|
866
866
|
modelValue(t) {
|
|
867
|
-
this.fileList =
|
|
867
|
+
this.fileList = q(t).map(_t).map(wt);
|
|
868
868
|
}
|
|
869
869
|
},
|
|
870
870
|
methods: {
|
|
@@ -891,10 +891,10 @@ const $n = "fcUpload", vn = /* @__PURE__ */ re({
|
|
|
891
891
|
}
|
|
892
892
|
},
|
|
893
893
|
render() {
|
|
894
|
-
const t =
|
|
894
|
+
const t = q(this.modelValue).length;
|
|
895
895
|
return v("div", {
|
|
896
896
|
class: "_fc-upload"
|
|
897
|
-
}, [v(
|
|
897
|
+
}, [v(O("ElUpload"), x({
|
|
898
898
|
key: t
|
|
899
899
|
}, this.$attrs, {
|
|
900
900
|
listType: this.listType || "picture-card",
|
|
@@ -910,15 +910,15 @@ const $n = "fcUpload", vn = /* @__PURE__ */ re({
|
|
|
910
910
|
}), _({
|
|
911
911
|
default: () => {
|
|
912
912
|
var e, r;
|
|
913
|
-
return [((r = (e = this.$slots).default) == null ? void 0 : r.call(e)) || (["text", "picture"].indexOf(this.listType) === -1 ? v(
|
|
914
|
-
default: () => [v(
|
|
915
|
-
}) : v(
|
|
913
|
+
return [((r = (e = this.$slots).default) == null ? void 0 : r.call(e)) || (["text", "picture"].indexOf(this.listType) === -1 ? v(O("ElIcon"), null, {
|
|
914
|
+
default: () => [v(vn, null, null)]
|
|
915
|
+
}) : v(O("ElButton"), {
|
|
916
916
|
type: "primary"
|
|
917
917
|
}, {
|
|
918
918
|
default: () => [this.formCreateInject.t("clickToUpload") || this.uploadText || "点击上传"]
|
|
919
919
|
}))];
|
|
920
920
|
}
|
|
921
|
-
},
|
|
921
|
+
}, at(this.$slots, ["default"]))), v(O("ElDialog"), {
|
|
922
922
|
appendToBody: !0,
|
|
923
923
|
modal: this.previewMask,
|
|
924
924
|
title: this.modalTitle,
|
|
@@ -935,13 +935,13 @@ const $n = "fcUpload", vn = /* @__PURE__ */ re({
|
|
|
935
935
|
this.$emit("fc.el", this.$refs.upload);
|
|
936
936
|
}
|
|
937
937
|
});
|
|
938
|
-
function
|
|
938
|
+
function K(t, e, r) {
|
|
939
939
|
t[e] = r;
|
|
940
940
|
}
|
|
941
941
|
function we(t, e) {
|
|
942
942
|
delete t[e];
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function Ae(t, e = {}, r) {
|
|
945
945
|
let n = !1;
|
|
946
946
|
for (let s in e)
|
|
947
947
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
@@ -949,90 +949,90 @@ function ke(t, e = {}, r) {
|
|
|
949
949
|
if ((n = Array.isArray(i)) || m.Object(i)) {
|
|
950
950
|
let o = t[s] === void 0;
|
|
951
951
|
if (n)
|
|
952
|
-
n = !1, o &&
|
|
952
|
+
n = !1, o && K(t, s, []);
|
|
953
953
|
else if (i._clone && r !== void 0)
|
|
954
954
|
if (r)
|
|
955
|
-
i = i.getRule(), o &&
|
|
955
|
+
i = i.getRule(), o && K(t, s, {});
|
|
956
956
|
else {
|
|
957
|
-
|
|
957
|
+
K(t, s, i._clone());
|
|
958
958
|
continue;
|
|
959
959
|
}
|
|
960
960
|
else
|
|
961
|
-
o &&
|
|
962
|
-
t[s] =
|
|
961
|
+
o && K(t, s, {});
|
|
962
|
+
t[s] = Ae(t[s], i, r);
|
|
963
963
|
} else
|
|
964
|
-
|
|
964
|
+
K(t, s, i), m.Undef(i) || (m.Undef(i.__json) || (t[s].__json = i.__json), m.Undef(i.__origin) || (t[s].__origin = i.__origin));
|
|
965
965
|
}
|
|
966
966
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
967
967
|
}
|
|
968
968
|
function ee(t) {
|
|
969
|
-
return
|
|
969
|
+
return Ae({}, { value: t }).value;
|
|
970
970
|
}
|
|
971
|
-
const
|
|
971
|
+
const Sn = Object.assign || function(t) {
|
|
972
972
|
for (let e, r = 1; r < arguments.length; r++)
|
|
973
973
|
for (let n in e = arguments[r], e)
|
|
974
|
-
Object.prototype.hasOwnProperty.call(e, n) &&
|
|
974
|
+
Object.prototype.hasOwnProperty.call(e, n) && K(t, n, e[n]);
|
|
975
975
|
return t;
|
|
976
976
|
};
|
|
977
977
|
function w() {
|
|
978
|
-
return
|
|
978
|
+
return Sn.apply(this, arguments);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function rt(t) {
|
|
981
981
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : _({}, t);
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function ce(t, e) {
|
|
984
984
|
var r = null;
|
|
985
985
|
return function(...n) {
|
|
986
986
|
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...n), e);
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function qt(t) {
|
|
990
990
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function Vn(t) {
|
|
993
993
|
return t && typeof t == "object" && typeof t.then == "function";
|
|
994
994
|
}
|
|
995
|
-
function
|
|
996
|
-
return
|
|
995
|
+
function qe(t) {
|
|
996
|
+
return Vn(t) ? t : Promise.resolve(t);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function ke(t) {
|
|
999
999
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1000
1000
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Ht(t) {
|
|
1003
1003
|
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function zt(t, e, r) {
|
|
1006
1006
|
return `[form-create ${t}]: ${e}`;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1009
|
-
console.error(
|
|
1008
|
+
function lt(t, e) {
|
|
1009
|
+
console.error(zt("err", t));
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1011
|
+
function Fn(t) {
|
|
1012
|
+
lt(t.toString()), console.error(t);
|
|
1013
1013
|
}
|
|
1014
|
-
const
|
|
1015
|
-
function
|
|
1016
|
-
return JSON.stringify(
|
|
1014
|
+
const nt = "[[FORM-CREATE-PREFIX-", it = "-FORM-CREATE-SUFFIX]]";
|
|
1015
|
+
function De(t, e) {
|
|
1016
|
+
return JSON.stringify(Ae(Array.isArray(t) ? [] : {}, t, !0), function(r, n) {
|
|
1017
1017
|
if (!(n && n._isVue === !0)) {
|
|
1018
1018
|
if (typeof n != "function")
|
|
1019
1019
|
return n;
|
|
1020
1020
|
if (n.__json)
|
|
1021
1021
|
return n.__json;
|
|
1022
1022
|
if (n.__origin && (n = n.__origin), !n.__emit)
|
|
1023
|
-
return
|
|
1023
|
+
return nt + n + it;
|
|
1024
1024
|
}
|
|
1025
1025
|
}, e);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Ke(t) {
|
|
1028
1028
|
return new Function("return " + t)();
|
|
1029
1029
|
}
|
|
1030
1030
|
function te(t, e) {
|
|
1031
1031
|
if (t && m.String(t) && t.length > 4) {
|
|
1032
1032
|
let r = t.trim(), n = !1;
|
|
1033
1033
|
try {
|
|
1034
|
-
if (r.indexOf(
|
|
1035
|
-
r = r.replace(
|
|
1034
|
+
if (r.indexOf(it) > 0 && r.indexOf(nt) === 0)
|
|
1035
|
+
r = r.replace(it, "").replace(nt, ""), n = !0;
|
|
1036
1036
|
else if (r.indexOf("$FN:") === 0)
|
|
1037
1037
|
r = r.substring(4), n = !0;
|
|
1038
1038
|
else if (r.indexOf("$EXEC:") === 0)
|
|
@@ -1046,7 +1046,7 @@ function te(t, e) {
|
|
|
1046
1046
|
}, r.__json = t, r.__inject = !0, r;
|
|
1047
1047
|
} else {
|
|
1048
1048
|
if (r.indexOf("$FNX:") === 0)
|
|
1049
|
-
return r =
|
|
1049
|
+
return r = Ke(`function($inject){
|
|
1050
1050
|
` + r.substring(5) + `
|
|
1051
1051
|
}`), r.__json = t, r.__inject = !0, r;
|
|
1052
1052
|
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (n = !0);
|
|
@@ -1054,13 +1054,13 @@ function te(t, e) {
|
|
|
1054
1054
|
if (!n) return t;
|
|
1055
1055
|
let s;
|
|
1056
1056
|
try {
|
|
1057
|
-
s =
|
|
1057
|
+
s = Ke(r);
|
|
1058
1058
|
} catch (i) {
|
|
1059
|
-
s =
|
|
1059
|
+
s = Ke("function " + r);
|
|
1060
1060
|
}
|
|
1061
1061
|
return s.__json = t, s;
|
|
1062
1062
|
} catch (s) {
|
|
1063
|
-
|
|
1063
|
+
lt(`解析失败:${r}
|
|
1064
1064
|
|
|
1065
1065
|
err: ${s}`);
|
|
1066
1066
|
return;
|
|
@@ -1068,24 +1068,24 @@ err: ${s}`);
|
|
|
1068
1068
|
}
|
|
1069
1069
|
return t;
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function xt(t, e) {
|
|
1072
1072
|
return JSON.parse(t, function(r, n) {
|
|
1073
1073
|
return m.Undef(n) || !n.indexOf ? n : te(n, e);
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
|
-
let
|
|
1077
|
-
function
|
|
1078
|
-
const t = 370 + ++
|
|
1076
|
+
let On = 0;
|
|
1077
|
+
function He() {
|
|
1078
|
+
const t = 370 + ++On;
|
|
1079
1079
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function he(t, e, r) {
|
|
1082
1082
|
let n = t, s;
|
|
1083
1083
|
return (e || "").split(".").forEach((i) => {
|
|
1084
1084
|
s && ((!n[s] || typeof n[s] != "object") && (n[s] = {}), n = n[s]), s = i;
|
|
1085
1085
|
}), n[s] = r, n;
|
|
1086
1086
|
}
|
|
1087
|
-
const
|
|
1088
|
-
name:
|
|
1087
|
+
const En = "fcGroup", Rn = /* @__PURE__ */ re({
|
|
1088
|
+
name: En,
|
|
1089
1089
|
props: {
|
|
1090
1090
|
field: String,
|
|
1091
1091
|
rule: Array,
|
|
@@ -1147,7 +1147,7 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1147
1147
|
cacheRule: {},
|
|
1148
1148
|
cacheValue: {},
|
|
1149
1149
|
sort: [],
|
|
1150
|
-
form:
|
|
1150
|
+
form: fe(this.formCreateInject.form.$form())
|
|
1151
1151
|
};
|
|
1152
1152
|
},
|
|
1153
1153
|
emits: ["update:modelValue", "change", "itemMounted", "remove", "add"],
|
|
@@ -1160,7 +1160,7 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1160
1160
|
const s = n.$f.formData();
|
|
1161
1161
|
if (t === e)
|
|
1162
1162
|
n.$f.deferSyncValue(() => {
|
|
1163
|
-
|
|
1163
|
+
Ae(n.rule, t), n.$f.setValue(s);
|
|
1164
1164
|
}, !0);
|
|
1165
1165
|
else {
|
|
1166
1166
|
const i = n.$f.formData();
|
|
@@ -1268,7 +1268,7 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1268
1268
|
const n = [...this.modelValue];
|
|
1269
1269
|
n.splice(t, 1), this.input(n);
|
|
1270
1270
|
};
|
|
1271
|
-
|
|
1271
|
+
qe(this.onBeforeRemove(this.modelValue, t)).then((n) => {
|
|
1272
1272
|
n !== !1 && r();
|
|
1273
1273
|
});
|
|
1274
1274
|
},
|
|
@@ -1356,23 +1356,23 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1356
1356
|
const {
|
|
1357
1357
|
rule: l,
|
|
1358
1358
|
options: u
|
|
1359
|
-
} = this.cacheRule[o], f = e && !n ? this.makeIcon(t.length, a, o) : [],
|
|
1359
|
+
} = this.cacheRule[o], f = e && !n ? this.makeIcon(t.length, a, o) : [], c = this.getTitle(a, o);
|
|
1360
1360
|
return s ? v("div", {
|
|
1361
1361
|
class: "_fc-group-container",
|
|
1362
1362
|
key: o
|
|
1363
1363
|
}, [v("div", {
|
|
1364
1364
|
class: "_fc-group-header"
|
|
1365
|
-
}, [
|
|
1365
|
+
}, [c === !1 ? v("div", {
|
|
1366
1366
|
class: "_fc-group-idx"
|
|
1367
|
-
}, [a + 1]) : null,
|
|
1367
|
+
}, [a + 1]) : null, c !== !1 ? v("div", {
|
|
1368
1368
|
class: "_fc-group-title"
|
|
1369
|
-
}, [
|
|
1369
|
+
}, [c]) : null, v("div", {
|
|
1370
1370
|
class: "_fc-group-handle fc-clock"
|
|
1371
1371
|
}, [f.length ? f : null])]), v("div", {
|
|
1372
1372
|
class: "_fc-group-content"
|
|
1373
|
-
}, [v(r,
|
|
1373
|
+
}, [v(r, x({
|
|
1374
1374
|
key: o
|
|
1375
|
-
},
|
|
1375
|
+
}, z(_({}, this.$attrs), {
|
|
1376
1376
|
disabled: n,
|
|
1377
1377
|
"onUpdate:modelValue": (h) => this.formData(o, h),
|
|
1378
1378
|
"onUpdate:api": (h) => this.add$f(a, o, h),
|
|
@@ -1386,9 +1386,9 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1386
1386
|
})), null)])]) : v("div", {
|
|
1387
1387
|
class: "_fc-group-container",
|
|
1388
1388
|
key: o
|
|
1389
|
-
}, [v(r,
|
|
1389
|
+
}, [v(r, x({
|
|
1390
1390
|
key: o
|
|
1391
|
-
},
|
|
1391
|
+
}, z(_({}, this.$attrs), {
|
|
1392
1392
|
disabled: n,
|
|
1393
1393
|
"onUpdate:modelValue": (h) => this.formData(o, h),
|
|
1394
1394
|
"onUpdate:api": (h) => this.add$f(a, o, h),
|
|
@@ -1410,13 +1410,13 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1410
1410
|
class: "_fc-group " + (n ? "_fc-group-disabled" : "") + (s ? " _fc-group-card" : "")
|
|
1411
1411
|
}, [i]);
|
|
1412
1412
|
}
|
|
1413
|
-
}),
|
|
1414
|
-
name:
|
|
1413
|
+
}), kn = "fcSubForm", Dn = /* @__PURE__ */ re({
|
|
1414
|
+
name: kn,
|
|
1415
1415
|
props: {
|
|
1416
1416
|
rule: Array,
|
|
1417
1417
|
options: {
|
|
1418
1418
|
type: Object,
|
|
1419
|
-
default: () =>
|
|
1419
|
+
default: () => Z({
|
|
1420
1420
|
submitBtn: !1,
|
|
1421
1421
|
resetBtn: !1
|
|
1422
1422
|
})
|
|
@@ -1439,7 +1439,7 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1439
1439
|
return {
|
|
1440
1440
|
cacheValue: {},
|
|
1441
1441
|
subApi: {},
|
|
1442
|
-
form:
|
|
1442
|
+
form: fe(this.formCreateInject.form.$form())
|
|
1443
1443
|
};
|
|
1444
1444
|
},
|
|
1445
1445
|
emits: ["fc:subform", "update:modelValue", "change", "itemMounted"],
|
|
@@ -1474,33 +1474,33 @@ const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
|
1474
1474
|
extendOption: !0
|
|
1475
1475
|
}, null);
|
|
1476
1476
|
}
|
|
1477
|
-
}),
|
|
1477
|
+
}), An = {
|
|
1478
1478
|
name: "IconWarning"
|
|
1479
|
-
},
|
|
1479
|
+
}, jn = {
|
|
1480
1480
|
class: "icon",
|
|
1481
1481
|
viewBox: "0 0 1024 1024",
|
|
1482
1482
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1483
1483
|
};
|
|
1484
|
-
function
|
|
1485
|
-
return
|
|
1486
|
-
|
|
1484
|
+
function In(t, e, r, n, s, i) {
|
|
1485
|
+
return U(), X("svg", jn, [...e[0] || (e[0] = [
|
|
1486
|
+
de("path", {
|
|
1487
1487
|
fill: "currentColor",
|
|
1488
1488
|
d: "M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z"
|
|
1489
1489
|
}, null, -1)
|
|
1490
1490
|
])]);
|
|
1491
1491
|
}
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
],
|
|
1503
|
-
const n = [...
|
|
1492
|
+
const Pn = /* @__PURE__ */ me(An, [["render", In]]), Bn = [
|
|
1493
|
+
Mr,
|
|
1494
|
+
ln,
|
|
1495
|
+
fn,
|
|
1496
|
+
pn,
|
|
1497
|
+
gn,
|
|
1498
|
+
Cn,
|
|
1499
|
+
Rn,
|
|
1500
|
+
Dn,
|
|
1501
|
+
Pn
|
|
1502
|
+
], Gt = ["props"], Yt = ["class", "style", "directives"], Kt = ["on", "hook"], oe = (t, e = {}, r = {}) => {
|
|
1503
|
+
const n = [...Gt, ...r.normal || []], s = [...Yt, ...r.array || []], i = [...Kt, ...r.functional || []], o = r.props || [];
|
|
1504
1504
|
return t.reduce((a, l) => {
|
|
1505
1505
|
for (const u in l)
|
|
1506
1506
|
if (a[u])
|
|
@@ -1509,40 +1509,40 @@ const An = /* @__PURE__ */ ge(Rn, [["render", Dn]]), jn = [
|
|
|
1509
1509
|
else if (n.indexOf(u) > -1)
|
|
1510
1510
|
a[u] = _(_({}, a[u]), l[u]);
|
|
1511
1511
|
else if (s.indexOf(u) > -1) {
|
|
1512
|
-
const f = a[u] instanceof Array ? a[u] : [a[u]],
|
|
1513
|
-
a[u] = [...f, ...
|
|
1512
|
+
const f = a[u] instanceof Array ? a[u] : [a[u]], c = l[u] instanceof Array ? l[u] : [l[u]];
|
|
1513
|
+
a[u] = [...f, ...c];
|
|
1514
1514
|
} else if (i.indexOf(u) > -1)
|
|
1515
1515
|
for (const f in l[u])
|
|
1516
1516
|
if (a[u][f]) {
|
|
1517
|
-
const
|
|
1518
|
-
a[u][f] = [...
|
|
1517
|
+
const c = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], h = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
|
|
1518
|
+
a[u][f] = [...c, ...h];
|
|
1519
1519
|
} else
|
|
1520
1520
|
a[u][f] = l[u][f];
|
|
1521
1521
|
else if (u === "hook")
|
|
1522
1522
|
for (let f in l[u])
|
|
1523
|
-
a[u][f] ? a[u][f] =
|
|
1523
|
+
a[u][f] ? a[u][f] = Tn(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1524
1524
|
else
|
|
1525
1525
|
a[u] = l[u];
|
|
1526
1526
|
else
|
|
1527
1527
|
n.indexOf(u) > -1 || i.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = _({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? _({}, l[u]) : l[u] : a[u] = l[u];
|
|
1528
1528
|
return a;
|
|
1529
1529
|
}, e);
|
|
1530
|
-
},
|
|
1530
|
+
}, Tn = (t, e) => function() {
|
|
1531
1531
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1532
|
-
},
|
|
1533
|
-
function
|
|
1534
|
-
return [...
|
|
1532
|
+
}, Wt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache", "modelEmit"], ut = ["validate", "children", "control"], ft = ["effect", "deep", "renderSlots"];
|
|
1533
|
+
function Jt() {
|
|
1534
|
+
return [...Wt, ...Gt, ...Yt, ...Kt, ...ut, ...ft];
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function H(t) {
|
|
1537
1537
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
1538
1538
|
return r.replace("-", "").toLocaleUpperCase();
|
|
1539
1539
|
});
|
|
1540
|
-
return
|
|
1540
|
+
return Qt(e);
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function Qt(t) {
|
|
1543
1543
|
return t.replace(t[0], t[0].toLowerCase());
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function st(t, e) {
|
|
1546
1546
|
return {
|
|
1547
1547
|
value: t,
|
|
1548
1548
|
enumerable: !1,
|
|
@@ -1550,43 +1550,44 @@ function nt(t, e) {
|
|
|
1550
1550
|
writable: !0
|
|
1551
1551
|
};
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1554
|
-
return
|
|
1553
|
+
function Xt(t, e) {
|
|
1554
|
+
return Zt([t], e || !1)[0];
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1557
|
-
return
|
|
1556
|
+
function Zt(t, e) {
|
|
1557
|
+
return Ae([], [...t], e || !1);
|
|
1558
1558
|
}
|
|
1559
|
+
const Ln = { array: ut, normal: ft };
|
|
1559
1560
|
function ae(t, e) {
|
|
1560
|
-
return oe(Array.isArray(e) ? e : [e], t,
|
|
1561
|
+
return oe(Array.isArray(e) ? e : [e], t, Ln), t;
|
|
1561
1562
|
}
|
|
1562
|
-
function
|
|
1563
|
+
function Ct(t) {
|
|
1563
1564
|
const e = m.Function(t.getRule) ? t.getRule() : t;
|
|
1564
1565
|
return e.type || (e.type = "input"), e;
|
|
1565
1566
|
}
|
|
1566
|
-
function
|
|
1567
|
+
function Mn(t, e) {
|
|
1567
1568
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1568
1569
|
e[r] && (t[r] = ae(t[r] || {}, e[r]));
|
|
1569
1570
|
}), t) : e;
|
|
1570
1571
|
}
|
|
1571
|
-
function
|
|
1572
|
+
function er(t, e) {
|
|
1572
1573
|
Object.defineProperties(t, Object.keys(e).reduce((r, n) => (r[n] = {
|
|
1573
1574
|
get() {
|
|
1574
1575
|
return e[n]();
|
|
1575
1576
|
}
|
|
1576
1577
|
}, r), {}));
|
|
1577
1578
|
}
|
|
1578
|
-
function
|
|
1579
|
+
function Q(t) {
|
|
1579
1580
|
return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
|
|
1580
1581
|
}
|
|
1581
|
-
function
|
|
1582
|
+
function V(t, e) {
|
|
1582
1583
|
try {
|
|
1583
1584
|
e = t();
|
|
1584
1585
|
} catch (r) {
|
|
1585
|
-
|
|
1586
|
+
Fn(r);
|
|
1586
1587
|
}
|
|
1587
1588
|
return e;
|
|
1588
1589
|
}
|
|
1589
|
-
function
|
|
1590
|
+
function Le() {
|
|
1590
1591
|
const t = {}, e = (r) => r || "default";
|
|
1591
1592
|
return {
|
|
1592
1593
|
setSlot(r, n) {
|
|
@@ -1616,32 +1617,32 @@ function Te() {
|
|
|
1616
1617
|
mergeBag(r) {
|
|
1617
1618
|
if (!r) return this;
|
|
1618
1619
|
const n = m.Function(r.getSlots) ? r.getSlots() : r;
|
|
1619
|
-
return Array.isArray(r) ||
|
|
1620
|
+
return Array.isArray(r) || Fr(r) ? this.setSlot(void 0, () => r) : Object.keys(n).forEach((s) => {
|
|
1620
1621
|
this.setSlot(s, n[s]);
|
|
1621
1622
|
}), this;
|
|
1622
1623
|
}
|
|
1623
1624
|
};
|
|
1624
1625
|
}
|
|
1625
|
-
function
|
|
1626
|
+
function St(t) {
|
|
1626
1627
|
const e = _({}, t.props || {});
|
|
1627
1628
|
return Object.keys(t.on || {}).forEach((r) => {
|
|
1628
|
-
r.indexOf("-") > 0 && (r =
|
|
1629
|
-
const n = `on${
|
|
1629
|
+
r.indexOf("-") > 0 && (r = H(r));
|
|
1630
|
+
const n = `on${Ht(r)}`;
|
|
1630
1631
|
Array.isArray(e[n]) ? e[n] = [...e[n], t.on[r]] : e[n] ? e[n] = [e[n], t.on[r]] : e[n] = t.on[r];
|
|
1631
1632
|
}), e.key = t.key, e.ref = t.ref, e.class = t.class, e.id = t.id, e.style = t.style, e.slot && delete e.slot, e;
|
|
1632
1633
|
}
|
|
1633
|
-
function
|
|
1634
|
+
function Me(t, e) {
|
|
1634
1635
|
return Object.setPrototypeOf(t, e), t;
|
|
1635
1636
|
}
|
|
1636
|
-
const
|
|
1637
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1637
|
+
const Vt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, Ce = {
|
|
1638
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(Vt(t, e)),
|
|
1638
1639
|
"!=": (t, e) => !Ce["=="](t, e),
|
|
1639
1640
|
">": (t, e) => t > e,
|
|
1640
1641
|
">=": (t, e) => t >= e,
|
|
1641
1642
|
"<": (t, e) => t < e,
|
|
1642
1643
|
"<=": (t, e) => t <= e,
|
|
1643
1644
|
on(t, e) {
|
|
1644
|
-
return t && t.indexOf && t.indexOf(
|
|
1645
|
+
return t && t.indexOf && t.indexOf(Vt(t[0], e)) > -1;
|
|
1645
1646
|
},
|
|
1646
1647
|
notOn(t, e) {
|
|
1647
1648
|
return !Ce.on(t, e);
|
|
@@ -1668,12 +1669,12 @@ const Ct = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
|
|
|
1668
1669
|
return new RegExp(e, "g").test(t);
|
|
1669
1670
|
}
|
|
1670
1671
|
};
|
|
1671
|
-
function
|
|
1672
|
+
function M(t, e) {
|
|
1672
1673
|
return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
|
|
1673
1674
|
t != null && (t = t[r]);
|
|
1674
1675
|
}), t;
|
|
1675
1676
|
}
|
|
1676
|
-
function
|
|
1677
|
+
function Nn(t) {
|
|
1677
1678
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1678
1679
|
let r;
|
|
1679
1680
|
const n = {};
|
|
@@ -1681,33 +1682,55 @@ function Bn(t) {
|
|
|
1681
1682
|
r[1] && (n[r[1]] = !0);
|
|
1682
1683
|
return Object.keys(n);
|
|
1683
1684
|
}
|
|
1684
|
-
function
|
|
1685
|
+
function Ft(t) {
|
|
1685
1686
|
let e = t.split("."), r = [], n = "";
|
|
1686
1687
|
return e.forEach((s, i) => {
|
|
1687
1688
|
i === 0 ? n = s : n += "." + s, r.push(n);
|
|
1688
1689
|
}), r.join(" && ");
|
|
1689
1690
|
}
|
|
1690
|
-
function
|
|
1691
|
+
function tr(t) {
|
|
1691
1692
|
const e = [];
|
|
1692
1693
|
let r = "", n = 0;
|
|
1693
1694
|
for (let s = 0; s < t.length; s++) {
|
|
1694
1695
|
const i = t[s];
|
|
1695
1696
|
i === "[" ? (n === 0 && r && (e.push({ type: "key", value: r }), r = ""), n++, r += i) : i === "]" ? (n--, r += i, n === 0 && (e.push({
|
|
1696
1697
|
type: "bracket",
|
|
1697
|
-
value:
|
|
1698
|
+
value: tr(r.slice(1, -1))
|
|
1698
1699
|
}), r = "")) : i === "." && n === 0 ? r && (e.push({ type: "key", value: r }), r = "") : r += i;
|
|
1699
1700
|
}
|
|
1700
1701
|
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
1701
1702
|
}
|
|
1702
|
-
const
|
|
1703
|
+
const Ue = (t, e) => {
|
|
1703
1704
|
if (!(!t || t === e)) {
|
|
1704
1705
|
if (t.props.formCreateInject)
|
|
1705
1706
|
return t.props.formCreateInject;
|
|
1706
1707
|
if (t.parent)
|
|
1707
|
-
return
|
|
1708
|
+
return Ue(t.parent, e);
|
|
1708
1709
|
}
|
|
1709
1710
|
};
|
|
1710
|
-
function
|
|
1711
|
+
function Un(t, e) {
|
|
1712
|
+
if (t === e)
|
|
1713
|
+
return !0;
|
|
1714
|
+
if (t == null || e == null)
|
|
1715
|
+
return t === e;
|
|
1716
|
+
const r = typeof t;
|
|
1717
|
+
return r !== typeof e || r === "string" || r === "boolean" ? !1 : r === "number" ? Number.isNaN(t) && Number.isNaN(e) : De(t) === De(e);
|
|
1718
|
+
}
|
|
1719
|
+
function Ot(t, e) {
|
|
1720
|
+
if (t === e)
|
|
1721
|
+
return !0;
|
|
1722
|
+
t = t || {}, e = e || {};
|
|
1723
|
+
const r = Object.keys(t), n = Object.keys(e);
|
|
1724
|
+
if (r.length !== n.length)
|
|
1725
|
+
return !1;
|
|
1726
|
+
for (let s = 0; s < r.length; s++) {
|
|
1727
|
+
const i = r[s];
|
|
1728
|
+
if (!Object.prototype.hasOwnProperty.call(e, i) || !Un(t[i], e[i]))
|
|
1729
|
+
return !1;
|
|
1730
|
+
}
|
|
1731
|
+
return !0;
|
|
1732
|
+
}
|
|
1733
|
+
function qn(t, e, r) {
|
|
1711
1734
|
return re({
|
|
1712
1735
|
name: "FormCreate" + (t.isMobile ? "Mobile" : ""),
|
|
1713
1736
|
components: e,
|
|
@@ -1749,110 +1772,109 @@ function Tn(t, e, r) {
|
|
|
1749
1772
|
return this.fc.render();
|
|
1750
1773
|
},
|
|
1751
1774
|
setup(n) {
|
|
1752
|
-
const s =
|
|
1753
|
-
|
|
1754
|
-
const i =
|
|
1775
|
+
const s = tt();
|
|
1776
|
+
Or("parentFC", s);
|
|
1777
|
+
const i = Er("parentFC", null);
|
|
1755
1778
|
let o = i;
|
|
1756
1779
|
if (i)
|
|
1757
1780
|
for (; o.setupState.parent; )
|
|
1758
1781
|
o = o.setupState.parent;
|
|
1759
1782
|
else
|
|
1760
1783
|
o = s;
|
|
1761
|
-
const { rule: a, modelValue: l, subForm: u, inFor: f } =
|
|
1784
|
+
const { rule: a, modelValue: l, subForm: u, inFor: f } = vt(n), c = Z({
|
|
1762
1785
|
ctxInject: {},
|
|
1763
1786
|
destroyed: !1,
|
|
1764
1787
|
isShow: !0,
|
|
1765
1788
|
unique: 1,
|
|
1766
|
-
renderRule: [...a.value || []]
|
|
1767
|
-
|
|
1768
|
-
|
|
1789
|
+
renderRule: [...a.value || []]
|
|
1790
|
+
});
|
|
1791
|
+
let h = l.value || {};
|
|
1792
|
+
const p = new t(s), y = p.api(), C = f.value, F = () => {
|
|
1769
1793
|
if (i) {
|
|
1770
|
-
const
|
|
1771
|
-
if (
|
|
1772
|
-
let
|
|
1773
|
-
|
|
1794
|
+
const R = Ue(s, i);
|
|
1795
|
+
if (R) {
|
|
1796
|
+
let j;
|
|
1797
|
+
C ? (j = q(R.getSubForm()), j.push(y)) : j = y, R.subForm(j);
|
|
1774
1798
|
}
|
|
1775
1799
|
}
|
|
1776
|
-
},
|
|
1777
|
-
const
|
|
1778
|
-
if (
|
|
1779
|
-
if (
|
|
1780
|
-
const
|
|
1781
|
-
|
|
1800
|
+
}, G = () => {
|
|
1801
|
+
const R = Ue(s, i);
|
|
1802
|
+
if (R)
|
|
1803
|
+
if (C) {
|
|
1804
|
+
const j = q(R.getSubForm()), W = j.indexOf(y);
|
|
1805
|
+
W > -1 && j.splice(W, 1);
|
|
1782
1806
|
} else
|
|
1783
|
-
|
|
1807
|
+
R.subForm();
|
|
1784
1808
|
};
|
|
1785
1809
|
let P = null;
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
let
|
|
1789
|
-
const
|
|
1790
|
-
Object.keys(
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
}),
|
|
1795
|
-
}), n.option && n.option.style && (
|
|
1810
|
+
Rr(() => {
|
|
1811
|
+
kr(() => {
|
|
1812
|
+
let R = "";
|
|
1813
|
+
const j = n.option && n.option.globalClass || {};
|
|
1814
|
+
Object.keys(j).forEach((W) => {
|
|
1815
|
+
let Fe = "";
|
|
1816
|
+
j[W].style && Object.keys(j[W].style).forEach((je) => {
|
|
1817
|
+
Fe += ke(je) + ":" + j[W].style[je] + ";";
|
|
1818
|
+
}), j[W].content && (Fe += j[W].content + ";"), Fe && (R += `.${W}{${Fe}}`);
|
|
1819
|
+
}), n.option && n.option.style && (R += n.option.style), P || (P = document.createElement("style"), P.type = "text/css", document.head.appendChild(P)), P.innerHTML = R || "";
|
|
1796
1820
|
});
|
|
1797
1821
|
});
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1800
|
-
}, 100),
|
|
1801
|
-
|
|
1802
|
-
}, 100),
|
|
1803
|
-
|
|
1804
|
-
}, 100),
|
|
1805
|
-
|
|
1822
|
+
const N = ce(() => {
|
|
1823
|
+
p.bus.$emit("$loadData.$topForm");
|
|
1824
|
+
}, 100), Se = ce(function() {
|
|
1825
|
+
p.bus.$emit("$loadData.$scopeForm");
|
|
1826
|
+
}, 100), ze = ce(() => {
|
|
1827
|
+
p.bus.$emit("$loadData.$form");
|
|
1828
|
+
}, 100), Ve = (R) => {
|
|
1829
|
+
p.bus.$emit("change-$form." + R);
|
|
1806
1830
|
};
|
|
1807
|
-
return
|
|
1808
|
-
i && (
|
|
1809
|
-
}),
|
|
1810
|
-
i && (
|
|
1811
|
-
}),
|
|
1812
|
-
|
|
1813
|
-
}),
|
|
1814
|
-
|
|
1815
|
-
}, { deep: !0, flush: "sync" }),
|
|
1816
|
-
|
|
1817
|
-
}),
|
|
1818
|
-
|
|
1819
|
-
}),
|
|
1820
|
-
|
|
1821
|
-
}, { deep: !0, flush: "post" }),
|
|
1822
|
-
|
|
1831
|
+
return Dr(() => {
|
|
1832
|
+
i && (y.top.bus.$on("$loadData.$form", N), y.top.bus.$on("change", Ve)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", Se), p.mounted();
|
|
1833
|
+
}), Ar(() => {
|
|
1834
|
+
i && (y.top.bus.$off("$loadData.$form", N), y.top.bus.$off("change", Ve)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", Se), G(), c.destroyed = !0, p.unmount(), P && (P.parentNode || P.parentElement) && document.head.removeChild(P);
|
|
1835
|
+
}), jr(() => {
|
|
1836
|
+
p.updated();
|
|
1837
|
+
}), F(), B(() => n.option, () => {
|
|
1838
|
+
p.initOptions(), y.refresh();
|
|
1839
|
+
}, { deep: !0, flush: "sync" }), B(() => [...a.value], (R) => {
|
|
1840
|
+
p.$handle.isBreakWatch() || R.length === c.renderRule.length && R.every((j) => c.renderRule.indexOf(j) > -1) || (p.$handle.updateAppendData(), p.$handle.reloadRule(a.value), s.setupState.renderRule());
|
|
1841
|
+
}), B(() => [n.disabled, n.preview], () => {
|
|
1842
|
+
y.refresh();
|
|
1843
|
+
}), B(l, (R) => {
|
|
1844
|
+
Ot(R || {}, h) || (y.config.forceCoverValue ? y.coverValue(R || {}) : y.setValue(R || {}));
|
|
1845
|
+
}, { deep: !0, flush: "post" }), B(() => n.index, () => {
|
|
1846
|
+
y.coverValue({}), p.$handle.updateAppendData(), I(() => {
|
|
1823
1847
|
I(() => {
|
|
1824
|
-
|
|
1848
|
+
y.clearValidateState();
|
|
1825
1849
|
});
|
|
1826
1850
|
});
|
|
1827
|
-
}, { flush: "sync" }),
|
|
1828
|
-
fc:
|
|
1829
|
-
parent: i &&
|
|
1830
|
-
top:
|
|
1831
|
-
fapi:
|
|
1832
|
-
},
|
|
1833
|
-
getGroupInject: () =>
|
|
1851
|
+
}, { flush: "sync" }), z(_({
|
|
1852
|
+
fc: fe(p),
|
|
1853
|
+
parent: i && fe(i),
|
|
1854
|
+
top: fe(o),
|
|
1855
|
+
fapi: fe(y)
|
|
1856
|
+
}, vt(c)), {
|
|
1857
|
+
getGroupInject: () => Ue(s, i),
|
|
1834
1858
|
refresh() {
|
|
1835
|
-
++
|
|
1859
|
+
++c.unique;
|
|
1836
1860
|
},
|
|
1837
1861
|
renderRule() {
|
|
1838
|
-
|
|
1862
|
+
c.renderRule = [...a.value || []];
|
|
1839
1863
|
},
|
|
1840
|
-
updateValue(
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
d.updateValue !== A && (d.updateValue = A, s.emit("update:modelValue", E), I(() => {
|
|
1844
|
-
qe(), i ? u.value || M() : (U(), M());
|
|
1864
|
+
updateValue(R) {
|
|
1865
|
+
c.destroyed || Ot(R, h) || (h = R, s.emit("update:modelValue", R), I(() => {
|
|
1866
|
+
ze(), i ? u.value || Se() : (N(), Se());
|
|
1845
1867
|
}));
|
|
1846
1868
|
}
|
|
1847
1869
|
});
|
|
1848
1870
|
},
|
|
1849
1871
|
created() {
|
|
1850
|
-
const n =
|
|
1872
|
+
const n = tt();
|
|
1851
1873
|
n.emit("update:api", n.setupState.fapi), n.setupState.fc.init();
|
|
1852
1874
|
}
|
|
1853
1875
|
});
|
|
1854
1876
|
}
|
|
1855
|
-
function
|
|
1877
|
+
function rr() {
|
|
1856
1878
|
return {
|
|
1857
1879
|
props: {},
|
|
1858
1880
|
on: {},
|
|
@@ -1863,54 +1885,54 @@ function Zt() {
|
|
|
1863
1885
|
value: void 0
|
|
1864
1886
|
};
|
|
1865
1887
|
}
|
|
1866
|
-
function
|
|
1888
|
+
function T(t, e) {
|
|
1867
1889
|
return (r, n, s, i = {}) => {
|
|
1868
|
-
const o = new
|
|
1890
|
+
const o = new ct(t, r, n, s, i);
|
|
1869
1891
|
return e && (m.Function(e) ? e(o) : o.props(e)), o;
|
|
1870
1892
|
};
|
|
1871
1893
|
}
|
|
1872
|
-
function
|
|
1873
|
-
this._data = w(
|
|
1894
|
+
function ct(t, e, r, n, s) {
|
|
1895
|
+
this._data = w(rr(), { type: t, title: e, field: r, value: n, props: s || {} }), this.event = this.on;
|
|
1874
1896
|
}
|
|
1875
|
-
w(
|
|
1897
|
+
w(ct.prototype, {
|
|
1876
1898
|
getRule() {
|
|
1877
1899
|
return this._data;
|
|
1878
1900
|
},
|
|
1879
1901
|
setProp(t, e) {
|
|
1880
|
-
return
|
|
1902
|
+
return K(this._data, t, e), this;
|
|
1881
1903
|
},
|
|
1882
1904
|
modelField(t) {
|
|
1883
1905
|
return this._data.modelField = t, this;
|
|
1884
1906
|
},
|
|
1885
1907
|
_clone() {
|
|
1886
1908
|
const t = new this.constructor();
|
|
1887
|
-
return t._data =
|
|
1909
|
+
return t._data = Xt(this._data), t;
|
|
1888
1910
|
}
|
|
1889
1911
|
});
|
|
1890
|
-
function
|
|
1912
|
+
function nr(t) {
|
|
1891
1913
|
t.forEach((e) => {
|
|
1892
|
-
|
|
1914
|
+
ct.prototype[e] = function(r) {
|
|
1893
1915
|
return ae(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1894
1916
|
};
|
|
1895
1917
|
});
|
|
1896
1918
|
}
|
|
1897
|
-
|
|
1898
|
-
const
|
|
1899
|
-
function
|
|
1900
|
-
let n =
|
|
1919
|
+
nr(Jt());
|
|
1920
|
+
const Hn = T("");
|
|
1921
|
+
function zn(t, e, r) {
|
|
1922
|
+
let n = Hn("", e);
|
|
1901
1923
|
return n._data.type = t, n._data.title = r, n;
|
|
1902
1924
|
}
|
|
1903
|
-
function
|
|
1925
|
+
function xn() {
|
|
1904
1926
|
return {
|
|
1905
|
-
create:
|
|
1906
|
-
factory:
|
|
1927
|
+
create: zn,
|
|
1928
|
+
factory: T
|
|
1907
1929
|
};
|
|
1908
1930
|
}
|
|
1909
|
-
function
|
|
1931
|
+
function Gn(t, e, r) {
|
|
1910
1932
|
const n = `fail to ${t} ${r.status}'`, s = new Error(n);
|
|
1911
1933
|
return s.status = r.status, s.url = t, s;
|
|
1912
1934
|
}
|
|
1913
|
-
function
|
|
1935
|
+
function Et(t) {
|
|
1914
1936
|
const e = t.responseText || t.response;
|
|
1915
1937
|
if (!e)
|
|
1916
1938
|
return e;
|
|
@@ -1920,7 +1942,7 @@ function St(t) {
|
|
|
1920
1942
|
return e;
|
|
1921
1943
|
}
|
|
1922
1944
|
}
|
|
1923
|
-
function
|
|
1945
|
+
function ir(t) {
|
|
1924
1946
|
if (typeof XMLHttpRequest == "undefined")
|
|
1925
1947
|
return;
|
|
1926
1948
|
const e = new XMLHttpRequest();
|
|
@@ -1935,8 +1957,8 @@ function er(t) {
|
|
|
1935
1957
|
t.onError(o);
|
|
1936
1958
|
}, e.onload = function() {
|
|
1937
1959
|
if (e.status < 200 || e.status >= 300)
|
|
1938
|
-
return t.onError(
|
|
1939
|
-
t.onSuccess(
|
|
1960
|
+
return t.onError(Gn(r, t, e), Et(e));
|
|
1961
|
+
t.onSuccess(Et(e));
|
|
1940
1962
|
}, e.open(t.method || "get", r, !0);
|
|
1941
1963
|
let n;
|
|
1942
1964
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (n = new FormData(), Object.keys(t.data || {}).map((i) => {
|
|
@@ -1947,13 +1969,13 @@ function er(t) {
|
|
|
1947
1969
|
s[i] != null && e.setRequestHeader(i, s[i]);
|
|
1948
1970
|
}), e.send(n);
|
|
1949
1971
|
}
|
|
1950
|
-
function
|
|
1972
|
+
function Rt(t, e, r) {
|
|
1951
1973
|
return new Promise((n, s) => {
|
|
1952
|
-
(e ||
|
|
1974
|
+
(e || ir)(z(_({}, t), {
|
|
1953
1975
|
onSuccess(i) {
|
|
1954
1976
|
let o = (l) => l;
|
|
1955
1977
|
const a = te(t.parse);
|
|
1956
|
-
m.Function(a) ? o = a : a && m.String(a) && (o = (l) =>
|
|
1978
|
+
m.Function(a) ? o = a : a && m.String(a) && (o = (l) => M(l, a)), qe(o(i, t.targetRule, r)).then((l) => {
|
|
1957
1979
|
n(l);
|
|
1958
1980
|
});
|
|
1959
1981
|
},
|
|
@@ -1963,10 +1985,10 @@ function Ot(t, e, r) {
|
|
|
1963
1985
|
}));
|
|
1964
1986
|
});
|
|
1965
1987
|
}
|
|
1966
|
-
function
|
|
1988
|
+
function Oe(t) {
|
|
1967
1989
|
return ee(t);
|
|
1968
1990
|
}
|
|
1969
|
-
function
|
|
1991
|
+
function Yn(t) {
|
|
1970
1992
|
function e(i) {
|
|
1971
1993
|
return m.Undef(i) ? i = t.fields() : Array.isArray(i) || (i = [i]), i;
|
|
1972
1994
|
}
|
|
@@ -1974,7 +1996,7 @@ function qn(t) {
|
|
|
1974
1996
|
m.Undef(i) ? i = Object.keys(_(_({}, t.fieldCtx), t.nameCtx)) : Array.isArray(i) || (i = [i]), i.forEach((l) => {
|
|
1975
1997
|
const u = t.fieldCtx[l] || t.nameCtx[l];
|
|
1976
1998
|
u && u.forEach((f) => {
|
|
1977
|
-
|
|
1999
|
+
K(f.rule, o, a), t.$render.clearCache(f);
|
|
1978
2000
|
});
|
|
1979
2001
|
});
|
|
1980
2002
|
}
|
|
@@ -2050,14 +2072,14 @@ function qn(t) {
|
|
|
2050
2072
|
if (i == null || typeof i == "boolean") {
|
|
2051
2073
|
const o = {};
|
|
2052
2074
|
return Object.keys(t.form).forEach((a) => {
|
|
2053
|
-
(i === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] =
|
|
2075
|
+
(i === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = Oe(t.form[a]));
|
|
2054
2076
|
}), o;
|
|
2055
2077
|
} else
|
|
2056
2078
|
return e(i).reduce((o, a) => (o[a] = s.getValue(a), o), {});
|
|
2057
2079
|
},
|
|
2058
2080
|
getValue(i) {
|
|
2059
2081
|
const o = t.getFieldCtx(i);
|
|
2060
|
-
return o ?
|
|
2082
|
+
return o ? Oe(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, i) ? Oe(t.appendData[i]) : void 0;
|
|
2061
2083
|
},
|
|
2062
2084
|
coverValue(i) {
|
|
2063
2085
|
const o = _({}, i || {});
|
|
@@ -2094,7 +2116,7 @@ function qn(t) {
|
|
|
2094
2116
|
}, !0), o ? o.origin : void 0;
|
|
2095
2117
|
},
|
|
2096
2118
|
removeRule(i) {
|
|
2097
|
-
const o = i &&
|
|
2119
|
+
const o = i && Q(i);
|
|
2098
2120
|
if (o)
|
|
2099
2121
|
return o.rm(), o.origin;
|
|
2100
2122
|
},
|
|
@@ -2141,7 +2163,7 @@ function qn(t) {
|
|
|
2141
2163
|
disabled(i, o) {
|
|
2142
2164
|
e(o).forEach((a) => {
|
|
2143
2165
|
t.getCtxs(a).forEach((l) => {
|
|
2144
|
-
|
|
2166
|
+
K(l.rule.props, "disabled", !!i);
|
|
2145
2167
|
});
|
|
2146
2168
|
}), t.refresh();
|
|
2147
2169
|
},
|
|
@@ -2180,7 +2202,7 @@ function qn(t) {
|
|
|
2180
2202
|
i.forEach((a) => s.sync(a));
|
|
2181
2203
|
return;
|
|
2182
2204
|
}
|
|
2183
|
-
let o = m.Object(i) ?
|
|
2205
|
+
let o = m.Object(i) ? Q(i) : t.getCtxs(i);
|
|
2184
2206
|
o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
|
|
2185
2207
|
if (!a.deleted) {
|
|
2186
2208
|
const l = t.subForm[a.id];
|
|
@@ -2258,7 +2280,7 @@ function qn(t) {
|
|
|
2258
2280
|
},
|
|
2259
2281
|
setEffect(i, o, a) {
|
|
2260
2282
|
const l = t.getCtx(i);
|
|
2261
|
-
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) &&
|
|
2283
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) && K(l.rule, "$" + o, a), D(l.rule, "effect") || (l.rule.effect = {}), K(l.rule.effect, o, a));
|
|
2262
2284
|
},
|
|
2263
2285
|
clearEffectData(i, o) {
|
|
2264
2286
|
const a = t.getCtx(i);
|
|
@@ -2278,7 +2300,7 @@ function qn(t) {
|
|
|
2278
2300
|
resetFields(i) {
|
|
2279
2301
|
e(i).forEach((o) => {
|
|
2280
2302
|
t.getCtxs(o).forEach((a) => {
|
|
2281
|
-
t.$render.clearCache(a), a.rule.value =
|
|
2303
|
+
t.$render.clearCache(a), a.rule.value = Oe(a.defaultValue);
|
|
2282
2304
|
});
|
|
2283
2305
|
}), I(() => {
|
|
2284
2306
|
I(() => {
|
|
@@ -2286,19 +2308,19 @@ function qn(t) {
|
|
|
2286
2308
|
s.clearValidateState(i);
|
|
2287
2309
|
});
|
|
2288
2310
|
});
|
|
2289
|
-
}), i == null && (m.Function(t.options.onReset) &&
|
|
2311
|
+
}), i == null && (m.Function(t.options.onReset) && V(() => t.options.onReset(s)), t.vm.emit("reset", s));
|
|
2290
2312
|
},
|
|
2291
2313
|
method(i, o) {
|
|
2292
2314
|
const a = s.el(i);
|
|
2293
2315
|
if (!a || !a[o])
|
|
2294
|
-
throw new Error(
|
|
2316
|
+
throw new Error(zt("err", `${o} 方法不存在`));
|
|
2295
2317
|
return (...l) => a[o](...l);
|
|
2296
2318
|
},
|
|
2297
2319
|
exec(i, o, ...a) {
|
|
2298
|
-
return
|
|
2320
|
+
return V(() => s.method(i, o)(...a));
|
|
2299
2321
|
},
|
|
2300
2322
|
toJson(i) {
|
|
2301
|
-
return
|
|
2323
|
+
return De(s.rule, i);
|
|
2302
2324
|
},
|
|
2303
2325
|
trigger(i, o, ...a) {
|
|
2304
2326
|
const l = s.el(i);
|
|
@@ -2319,7 +2341,7 @@ function qn(t) {
|
|
|
2319
2341
|
focus(i) {
|
|
2320
2342
|
const o = s.el(i);
|
|
2321
2343
|
if (!o) return;
|
|
2322
|
-
const a = (
|
|
2344
|
+
const a = (c) => !c || typeof c.focus != "function" ? !1 : (V(() => c.focus()), !0);
|
|
2323
2345
|
if (a(o)) return;
|
|
2324
2346
|
const l = o.$el !== void 0 ? o.$el : o;
|
|
2325
2347
|
if (a(l)) return;
|
|
@@ -2336,21 +2358,21 @@ function qn(t) {
|
|
|
2336
2358
|
return o ? t.subForm[o.id] : void 0;
|
|
2337
2359
|
},
|
|
2338
2360
|
getChildrenRuleList(i) {
|
|
2339
|
-
const o = typeof i == "object", a = o ?
|
|
2361
|
+
const o = typeof i == "object", a = o ? Q(i) : t.getCtx(i), l = a ? a.rule : o ? i : s.getRule(i);
|
|
2340
2362
|
if (!l)
|
|
2341
2363
|
return [];
|
|
2342
2364
|
const u = [];
|
|
2343
|
-
return ((
|
|
2344
|
-
|
|
2365
|
+
return ((c) => {
|
|
2366
|
+
c && c.forEach((h) => {
|
|
2345
2367
|
typeof h == "object" && (h.field && u.push(h), u.push(...s.getChildrenRuleList(h)));
|
|
2346
2368
|
});
|
|
2347
2369
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2348
2370
|
},
|
|
2349
2371
|
getParentRule(i) {
|
|
2350
|
-
return (typeof i == "object" ?
|
|
2372
|
+
return (typeof i == "object" ? Q(i) : t.getCtx(i)).parent.rule;
|
|
2351
2373
|
},
|
|
2352
2374
|
getParentSubRule(i) {
|
|
2353
|
-
const a = typeof i == "object" ?
|
|
2375
|
+
const a = typeof i == "object" ? Q(i) : t.getCtx(i);
|
|
2354
2376
|
if (a) {
|
|
2355
2377
|
const l = a.getParentGroup();
|
|
2356
2378
|
if (l)
|
|
@@ -2358,7 +2380,7 @@ function qn(t) {
|
|
|
2358
2380
|
}
|
|
2359
2381
|
},
|
|
2360
2382
|
getChildrenFormData(i, o) {
|
|
2361
|
-
return s.getChildrenRuleList(i).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] =
|
|
2383
|
+
return s.getChildrenRuleList(i).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = Oe(u.value)), l), {});
|
|
2362
2384
|
},
|
|
2363
2385
|
setChildrenFormData(i, o, a) {
|
|
2364
2386
|
const l = s.getChildrenRuleList(i);
|
|
@@ -2395,18 +2417,18 @@ function qn(t) {
|
|
|
2395
2417
|
s.setData("$var." + i, o);
|
|
2396
2418
|
},
|
|
2397
2419
|
renderRule(i, o, a) {
|
|
2398
|
-
const u = typeof i == "object" ?
|
|
2420
|
+
const u = typeof i == "object" ? Q(i) : t.getCtx(i);
|
|
2399
2421
|
return u ? t.$render.createRuleVnode(u, o, a) : void 0;
|
|
2400
2422
|
},
|
|
2401
2423
|
renderChildren(i, o, a) {
|
|
2402
|
-
const u = typeof i == "object" ?
|
|
2424
|
+
const u = typeof i == "object" ? Q(i) : t.getCtx(i);
|
|
2403
2425
|
return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
|
|
2404
2426
|
},
|
|
2405
2427
|
nextTick(i) {
|
|
2406
2428
|
t.bus.$once("next-tick", i), t.refresh();
|
|
2407
2429
|
},
|
|
2408
2430
|
nextRefresh(i) {
|
|
2409
|
-
t.nextRefresh(), i &&
|
|
2431
|
+
t.nextRefresh(), i && V(i);
|
|
2410
2432
|
},
|
|
2411
2433
|
deferSyncValue(i, o) {
|
|
2412
2434
|
t.deferSyncValue(i, o);
|
|
@@ -2424,10 +2446,10 @@ function qn(t) {
|
|
|
2424
2446
|
let l = _({}, i);
|
|
2425
2447
|
l = t.loadFetchVar(l);
|
|
2426
2448
|
const u = (f) => {
|
|
2427
|
-
|
|
2449
|
+
V(() => l.onError && l.onError(f)), a(f);
|
|
2428
2450
|
};
|
|
2429
|
-
t.beforeFetch(l).then(() =>
|
|
2430
|
-
|
|
2451
|
+
t.beforeFetch(l).then(() => Rt(l, t.fc.create.fetch, s).then((f) => {
|
|
2452
|
+
V(() => l.onSuccess && l.onSuccess(f)), o(f);
|
|
2431
2453
|
}).catch((f) => {
|
|
2432
2454
|
u(f);
|
|
2433
2455
|
})).catch((f) => {
|
|
@@ -2437,14 +2459,14 @@ function qn(t) {
|
|
|
2437
2459
|
},
|
|
2438
2460
|
watchFetch(i, o, a, l) {
|
|
2439
2461
|
return t.fc.watchLoadData((u, f) => {
|
|
2440
|
-
let
|
|
2441
|
-
if (
|
|
2462
|
+
let c = _({}, i);
|
|
2463
|
+
if (c = t.loadFetchVar(c, u), l && l(c, f) === !1)
|
|
2442
2464
|
return;
|
|
2443
2465
|
const h = (p) => {
|
|
2444
|
-
|
|
2466
|
+
V(() => c.onError && c.onError(p)), a && a(p);
|
|
2445
2467
|
};
|
|
2446
|
-
t.beforeFetch(
|
|
2447
|
-
|
|
2468
|
+
t.beforeFetch(c).then(() => Rt(c, t.fc.create.fetch, s).then((p) => {
|
|
2469
|
+
V(() => c.onSuccess && c.onSuccess(p)), o && o(p, f);
|
|
2448
2470
|
}).catch((p) => {
|
|
2449
2471
|
h(p);
|
|
2450
2472
|
})).catch((p) => {
|
|
@@ -2457,7 +2479,7 @@ function qn(t) {
|
|
|
2457
2479
|
},
|
|
2458
2480
|
watchData(i) {
|
|
2459
2481
|
return t.fc.watchLoadData((o, a) => {
|
|
2460
|
-
|
|
2482
|
+
V(() => i(o, a));
|
|
2461
2483
|
});
|
|
2462
2484
|
},
|
|
2463
2485
|
setData(i, o, a) {
|
|
@@ -2483,7 +2505,7 @@ function qn(t) {
|
|
|
2483
2505
|
};
|
|
2484
2506
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2485
2507
|
}
|
|
2486
|
-
function
|
|
2508
|
+
function Kn(t) {
|
|
2487
2509
|
w(t.prototype, {
|
|
2488
2510
|
initCache() {
|
|
2489
2511
|
this.clearCacheAll();
|
|
@@ -2515,7 +2537,7 @@ function Hn(t) {
|
|
|
2515
2537
|
}
|
|
2516
2538
|
});
|
|
2517
2539
|
}
|
|
2518
|
-
function
|
|
2540
|
+
function Wn(t) {
|
|
2519
2541
|
w(t.prototype, {
|
|
2520
2542
|
initRender() {
|
|
2521
2543
|
this.cacheConfig = {};
|
|
@@ -2524,7 +2546,7 @@ function zn(t) {
|
|
|
2524
2546
|
const r = (n) => {
|
|
2525
2547
|
if (n) {
|
|
2526
2548
|
let s;
|
|
2527
|
-
return e.rule.field && (s = n.slots["field-" +
|
|
2549
|
+
return e.rule.field && (s = n.slots["field-" + ke(e.rule.field)] || n.slots["field-" + e.rule.field]), s || (s = n.slots["type-" + ke(e.type)] || n.slots["type-" + e.type]), s || r(n.setupState.parent);
|
|
2528
2550
|
}
|
|
2529
2551
|
};
|
|
2530
2552
|
return r(this.vm);
|
|
@@ -2533,7 +2555,7 @@ function zn(t) {
|
|
|
2533
2555
|
if (!this.vm.setupState.isShow)
|
|
2534
2556
|
return;
|
|
2535
2557
|
this.$manager.beforeRender();
|
|
2536
|
-
const e =
|
|
2558
|
+
const e = Le();
|
|
2537
2559
|
return this.sort.forEach((r) => {
|
|
2538
2560
|
this.renderSlot(e, this.$handle.ctxs[r]);
|
|
2539
2561
|
}), this.$manager.render(e);
|
|
@@ -2547,19 +2569,21 @@ function zn(t) {
|
|
|
2547
2569
|
e.setSlot(r.rule.slot, this.renderCtx(r, n));
|
|
2548
2570
|
},
|
|
2549
2571
|
mergeGlobal(e) {
|
|
2550
|
-
this.$handle.options.global
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2572
|
+
if (!this.$handle.options.global) return;
|
|
2573
|
+
const { trueType: n, originType: s, type: i } = e;
|
|
2574
|
+
this.cacheConfig[n] || (this.cacheConfig[n] = se(() => {
|
|
2575
|
+
const o = this.$handle.options.global;
|
|
2576
|
+
return ae({}, [o["*"] || o.default || {}, o[s] || o[i] || {}]);
|
|
2577
|
+
})), e.prop = ae({}, [this.cacheConfig[e.trueType].value, e.prop]);
|
|
2554
2578
|
},
|
|
2555
2579
|
setOptions(e) {
|
|
2556
2580
|
const r = e.loadPending({ key: "options", origin: e.prop.options, def: [] });
|
|
2557
|
-
e.prop.options = r, e.prop.optionsTo && r &&
|
|
2581
|
+
e.prop.options = r, e.prop.optionsTo && r && he(e.prop, e.prop.optionsTo, r);
|
|
2558
2582
|
},
|
|
2559
2583
|
deepSet(e) {
|
|
2560
2584
|
const r = e.prop.deep;
|
|
2561
2585
|
r && Object.keys(r).sort((n, s) => n.length < s.length ? -1 : 1).forEach((n) => {
|
|
2562
|
-
|
|
2586
|
+
he(e.prop, n, r[n]);
|
|
2563
2587
|
});
|
|
2564
2588
|
},
|
|
2565
2589
|
parseSide(e, r) {
|
|
@@ -2589,7 +2613,7 @@ function zn(t) {
|
|
|
2589
2613
|
return;
|
|
2590
2614
|
}
|
|
2591
2615
|
s = (...l) => {
|
|
2592
|
-
var
|
|
2616
|
+
var y, C;
|
|
2593
2617
|
const u = {
|
|
2594
2618
|
rule: n,
|
|
2595
2619
|
prop: i,
|
|
@@ -2598,20 +2622,20 @@ function zn(t) {
|
|
|
2598
2622
|
model: i.model || {},
|
|
2599
2623
|
slotValue: l
|
|
2600
2624
|
};
|
|
2601
|
-
l.length && n.slotUpdate &&
|
|
2625
|
+
l.length && n.slotUpdate && V(() => n.slotUpdate(u));
|
|
2602
2626
|
let f = {};
|
|
2603
|
-
const
|
|
2604
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(
|
|
2605
|
-
f[
|
|
2606
|
-
if (m.Function(i.renderSlots[
|
|
2607
|
-
return
|
|
2608
|
-
const
|
|
2609
|
-
return this.renderRule(
|
|
2627
|
+
const c = e.loadChildrenPending();
|
|
2628
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(c, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(c, e)), Object.keys(i.renderSlots || {}).forEach((F) => {
|
|
2629
|
+
f[F] = (...G) => {
|
|
2630
|
+
if (m.Function(i.renderSlots[F]))
|
|
2631
|
+
return V(() => i.renderSlots[F](...G));
|
|
2632
|
+
const P = this.parseSide(i.renderSlots[F], e);
|
|
2633
|
+
return this.renderRule(P);
|
|
2610
2634
|
};
|
|
2611
2635
|
});
|
|
2612
2636
|
const h = this.getTypeSlot(e);
|
|
2613
2637
|
let p;
|
|
2614
|
-
return h ? (u.children = f, p = h(u)) : p = a ? e.parser.preview(
|
|
2638
|
+
return h ? (u.children = f, p = h(u)) : p = a ? e.parser.preview(rt(f), e) : e.parser.render(rt(f), e), p = this.renderSides(p, e), (y = i.title) != null && y.show && (i.wrap = _({ show: !0 }, i.wrap || {}), i.native || (i.native = !1)), (!(!e.input && m.Undef(i.native)) || ((C = i.col) == null ? void 0 : C.show) === !0) && i.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), p = this.$manager.makeWrap(e, p)), e.none && (Array.isArray(p) ? p = p.map((F) => !F || !F.__v_isVNode ? F : this.none(F)) : p = this.none(p)), o && this.setCache(e, () => this.stable(p), r), p;
|
|
2615
2639
|
}, this.setCache(e, s, r);
|
|
2616
2640
|
}
|
|
2617
2641
|
return (...s) => {
|
|
@@ -2681,52 +2705,67 @@ function zn(t) {
|
|
|
2681
2705
|
children: e.loadChildrenPending()
|
|
2682
2706
|
}), n;
|
|
2683
2707
|
},
|
|
2708
|
+
//事件回调挂在 ctx 上复用,避免 cache miss 时换新函数逼迫子组件更新
|
|
2709
|
+
ensureCtxHandlers(e) {
|
|
2710
|
+
if (e.handlers)
|
|
2711
|
+
return e.handlers;
|
|
2712
|
+
const r = this;
|
|
2713
|
+
return e.handlers = {
|
|
2714
|
+
vnodeMounted(n) {
|
|
2715
|
+
n.el.__rule__ = e.rule, r.onMounted(e, n.el);
|
|
2716
|
+
},
|
|
2717
|
+
vnodeBeforeUnmount() {
|
|
2718
|
+
r.$handle.effect(e, "beforeUnmount"), r.$handle.targetHook(e, "beforeUnmount");
|
|
2719
|
+
},
|
|
2720
|
+
fcUpdateValue(n) {
|
|
2721
|
+
r.$handle.onUpdateValue(e, n);
|
|
2722
|
+
},
|
|
2723
|
+
fcEl(n) {
|
|
2724
|
+
e.exportEl = n, n && ((n.$el || n).__rule__ = e.rule);
|
|
2725
|
+
},
|
|
2726
|
+
modelCallback(n) {
|
|
2727
|
+
r.tmpInput && r.tmpInput(e.field, n, e.rule), r.onInput(e, n);
|
|
2728
|
+
},
|
|
2729
|
+
modelEmit() {
|
|
2730
|
+
r.onEmitInput(e);
|
|
2731
|
+
}
|
|
2732
|
+
}, e.handlers;
|
|
2733
|
+
},
|
|
2684
2734
|
ctxProp(e) {
|
|
2685
2735
|
const { ref: r, key: n, rule: s } = e;
|
|
2686
2736
|
this.$manager.mergeProp(e), e.parser.mergeProp(e);
|
|
2687
|
-
const i = [
|
|
2737
|
+
const i = this.ensureCtxHandlers(e), o = [
|
|
2688
2738
|
{
|
|
2689
2739
|
ref: r,
|
|
2690
2740
|
key: s.key || `${n}fc`,
|
|
2691
2741
|
slot: void 0,
|
|
2692
2742
|
on: {
|
|
2693
|
-
vnodeMounted:
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
this.$handle.effect(e, "beforeUnmount"), this.$handle.targetHook(e, "beforeUnmount");
|
|
2698
|
-
},
|
|
2699
|
-
"fc.updateValue": (o) => {
|
|
2700
|
-
this.$handle.onUpdateValue(e, o);
|
|
2701
|
-
},
|
|
2702
|
-
"fc.el": (o) => {
|
|
2703
|
-
e.exportEl = o, o && ((o.$el || o).__rule__ = e.rule);
|
|
2704
|
-
}
|
|
2743
|
+
vnodeMounted: i.vnodeMounted,
|
|
2744
|
+
vnodeBeforeUnmount: i.vnodeBeforeUnmount,
|
|
2745
|
+
"fc.updateValue": i.fcUpdateValue,
|
|
2746
|
+
"fc.el": i.fcEl
|
|
2705
2747
|
}
|
|
2706
2748
|
}
|
|
2707
2749
|
];
|
|
2708
2750
|
if (e.input) {
|
|
2709
|
-
const o = this.tmpInput;
|
|
2710
2751
|
this.vm.props.disabled === !0 && (e.prop.props.disabled = !0);
|
|
2711
2752
|
const a = this.getModelField(e), l = {
|
|
2712
|
-
callback:
|
|
2713
|
-
o && o(e.field, u, e.rule), this.onInput(e, u);
|
|
2714
|
-
},
|
|
2753
|
+
callback: i.modelCallback,
|
|
2715
2754
|
modelField: a,
|
|
2716
2755
|
value: this.$handle.getFormData(e)
|
|
2717
2756
|
};
|
|
2718
|
-
|
|
2757
|
+
o.push({
|
|
2719
2758
|
on: _({
|
|
2720
2759
|
[`update:${a}`]: l.callback
|
|
2721
2760
|
}, e.prop.modelEmit ? {
|
|
2722
|
-
[e.prop.modelEmit]:
|
|
2761
|
+
[e.prop.modelEmit]: i.modelEmit
|
|
2723
2762
|
} : {}),
|
|
2724
2763
|
props: {
|
|
2725
2764
|
[a]: l.value
|
|
2726
2765
|
}
|
|
2727
2766
|
}), e.prop.model = l;
|
|
2728
2767
|
}
|
|
2729
|
-
return oe(
|
|
2768
|
+
return oe(o, e.prop), e.prop;
|
|
2730
2769
|
},
|
|
2731
2770
|
onMounted(e, r) {
|
|
2732
2771
|
e.el = this.vm.refs[e.ref] || r, e.parser.mounted(e), this.$handle.effect(e, "mounted"), this.$handle.targetHook(e, "mounted");
|
|
@@ -2743,7 +2782,7 @@ function zn(t) {
|
|
|
2743
2782
|
},
|
|
2744
2783
|
renderChildren(e, r) {
|
|
2745
2784
|
if (!m.trueArray(e)) return {};
|
|
2746
|
-
const n =
|
|
2785
|
+
const n = Le();
|
|
2747
2786
|
return e.map((s) => {
|
|
2748
2787
|
if (s) {
|
|
2749
2788
|
if (m.String(s) || m.Number(s)) return n.setSlot(null, `${s}`);
|
|
@@ -2757,7 +2796,7 @@ function zn(t) {
|
|
|
2757
2796
|
},
|
|
2758
2797
|
defaultRender(e, r) {
|
|
2759
2798
|
const n = e.prop;
|
|
2760
|
-
return n.component ? typeof n.component == "string" ? this.vNode.make(n.component, n, r) : this.vNode.makeComponent(n.component, n, r) : this.vNode[e.type] ? this.vNode[e.type](n, r) : this.vNode[e.originType] ? this.vNode[e.originType](n, r) : this.vNode.make(
|
|
2799
|
+
return n.component ? typeof n.component == "string" ? this.vNode.make(n.component, n, r) : this.vNode.makeComponent(n.component, n, r) : this.vNode[e.type] ? this.vNode[e.type](n, r) : this.vNode[e.originType] ? this.vNode[e.originType](n, r) : this.vNode.make(Qt(n.type), n, r);
|
|
2761
2800
|
},
|
|
2762
2801
|
createChildrenVnodes(e, r, n) {
|
|
2763
2802
|
this.force = n !== !1, this.tmpInput = r;
|
|
@@ -2766,7 +2805,7 @@ function zn(t) {
|
|
|
2766
2805
|
},
|
|
2767
2806
|
createRuleVnode(e, r, n) {
|
|
2768
2807
|
this.force = n !== !1, this.tmpInput = r;
|
|
2769
|
-
const s =
|
|
2808
|
+
const s = Le();
|
|
2770
2809
|
return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
|
|
2771
2810
|
},
|
|
2772
2811
|
renderRule(e, r, n) {
|
|
@@ -2776,12 +2815,12 @@ function zn(t) {
|
|
|
2776
2815
|
if (n)
|
|
2777
2816
|
s = e.type;
|
|
2778
2817
|
else if (s = e.is, e.type) {
|
|
2779
|
-
s =
|
|
2818
|
+
s = H(e.type);
|
|
2780
2819
|
const a = this.vNode.aliasMap[s];
|
|
2781
|
-
a && (s =
|
|
2820
|
+
a && (s = H(a));
|
|
2782
2821
|
}
|
|
2783
2822
|
if (!s) return;
|
|
2784
|
-
const i =
|
|
2823
|
+
const i = Le();
|
|
2785
2824
|
m.trueArray(e.children) && e.children.forEach((a) => {
|
|
2786
2825
|
a && i.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2787
2826
|
});
|
|
@@ -2790,8 +2829,8 @@ function zn(t) {
|
|
|
2790
2829
|
}
|
|
2791
2830
|
});
|
|
2792
2831
|
}
|
|
2793
|
-
let
|
|
2794
|
-
function
|
|
2832
|
+
let Jn = 1;
|
|
2833
|
+
function dt(t) {
|
|
2795
2834
|
w(this, {
|
|
2796
2835
|
$handle: t,
|
|
2797
2836
|
fc: t.fc,
|
|
@@ -2800,8 +2839,8 @@ function ft(t) {
|
|
|
2800
2839
|
vNode: new t.fc.CreateNode(t),
|
|
2801
2840
|
force: !1,
|
|
2802
2841
|
tmpInput: null,
|
|
2803
|
-
id:
|
|
2804
|
-
}),
|
|
2842
|
+
id: Jn++
|
|
2843
|
+
}), er(this, {
|
|
2805
2844
|
options() {
|
|
2806
2845
|
return t.options;
|
|
2807
2846
|
},
|
|
@@ -2810,9 +2849,9 @@ function ft(t) {
|
|
|
2810
2849
|
}
|
|
2811
2850
|
}), this.initCache(), this.initRender();
|
|
2812
2851
|
}
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
function
|
|
2852
|
+
Kn(dt);
|
|
2853
|
+
Wn(dt);
|
|
2854
|
+
function Qn(t) {
|
|
2816
2855
|
w(t.prototype, {
|
|
2817
2856
|
parseInjectEvent(e, r) {
|
|
2818
2857
|
const n = e.inject || this.options.injectEvent;
|
|
@@ -2839,16 +2878,16 @@ function Gn(t) {
|
|
|
2839
2878
|
let r = {}, n = e.rule, { emitPrefix: s, field: i, name: o, inject: a } = n, l = n.emit || [];
|
|
2840
2879
|
return m.trueArray(l) && l.forEach((u) => {
|
|
2841
2880
|
if (!u) return;
|
|
2842
|
-
let f,
|
|
2843
|
-
if (m.Object(u) && (f = u.inject, u = u.name,
|
|
2844
|
-
const h =
|
|
2845
|
-
this.vm.emitsOptions && !this.vm.emitsOptions[h] && (this.vm.emitsOptions[h] = null), this.vm.emit(h,
|
|
2881
|
+
let f, c = s || i || o;
|
|
2882
|
+
if (m.Object(u) && (f = u.inject, u = u.name, c = u.prefix || c), c) {
|
|
2883
|
+
const h = ke(`${c}-${u}`), p = (...y) => {
|
|
2884
|
+
this.vm.emitsOptions && !this.vm.emitsOptions[h] && (this.vm.emitsOptions[h] = null), this.vm.emit(h, ...y), this.vm.emit("emit-event", h, ...y), this.bus.$emit(h, ...y);
|
|
2846
2885
|
};
|
|
2847
2886
|
if (p.__emit = !0, !f && a === !1)
|
|
2848
|
-
r[
|
|
2887
|
+
r[H(u)] = p;
|
|
2849
2888
|
else {
|
|
2850
|
-
let
|
|
2851
|
-
r[
|
|
2889
|
+
let y = f || a || this.options.injectEvent;
|
|
2890
|
+
r[H(u)] = m.Undef(y) ? p : this.inject(n, p, y);
|
|
2852
2891
|
}
|
|
2853
2892
|
}
|
|
2854
2893
|
}), e.computed.on = r, r;
|
|
@@ -2878,33 +2917,33 @@ function Gn(t) {
|
|
|
2878
2917
|
},
|
|
2879
2918
|
loadStrVar(e, r, n) {
|
|
2880
2919
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2881
|
-
const s = e, i =
|
|
2882
|
-
let f = !1,
|
|
2920
|
+
const s = e, i = Nn(e), o = (u) => {
|
|
2921
|
+
let f = !1, c;
|
|
2883
2922
|
if (n && u.indexOf("$form.") === 0) {
|
|
2884
2923
|
const h = u.split(".");
|
|
2885
|
-
h.shift(), D(n.value, h[0]) && (f = !0,
|
|
2924
|
+
h.shift(), D(n.value, h[0]) && (f = !0, c = r ? r({
|
|
2886
2925
|
id: "$form." + h[0] + "_" + n.rule.__fc__.id,
|
|
2887
|
-
getValue: () =>
|
|
2888
|
-
}) :
|
|
2926
|
+
getValue: () => M(n.value, h)
|
|
2927
|
+
}) : M(n.value, h));
|
|
2889
2928
|
}
|
|
2890
|
-
return f || (
|
|
2929
|
+
return f || (c = r ? r(u) : this.fc.getLoadData(u)), c;
|
|
2891
2930
|
}, a = (u) => {
|
|
2892
2931
|
const f = [];
|
|
2893
2932
|
u.forEach((h) => {
|
|
2894
2933
|
h.key ? f.push(h.key) : h.children && f.push(a(h.children));
|
|
2895
2934
|
});
|
|
2896
|
-
let
|
|
2935
|
+
let c = !1;
|
|
2897
2936
|
return f.forEach((h, p) => {
|
|
2898
|
-
h != null && (h.indexOf("'") === 0 || h.indexOf('"') === 0) && (f[p] = h.slice(1, -1),
|
|
2899
|
-
}), f.length === 1 && (
|
|
2937
|
+
h != null && (h.indexOf("'") === 0 || h.indexOf('"') === 0) && (f[p] = h.slice(1, -1), c = !0);
|
|
2938
|
+
}), f.length === 1 && (c || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
|
|
2900
2939
|
};
|
|
2901
2940
|
let l;
|
|
2902
2941
|
if (i.forEach((u) => {
|
|
2903
|
-
const f = u.split("||"),
|
|
2904
|
-
if (
|
|
2905
|
-
const h = (f[1] || "").trim(), p =
|
|
2906
|
-
let
|
|
2907
|
-
(
|
|
2942
|
+
const f = u.split("||"), c = f[0].trim();
|
|
2943
|
+
if (c) {
|
|
2944
|
+
const h = (f[1] || "").trim(), p = tr(c);
|
|
2945
|
+
let y = V(() => a(p));
|
|
2946
|
+
(y == null || y === "") && f.length > 1 && (y = h), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2908
2947
|
}
|
|
2909
2948
|
}), i.length === 1 && s === `{{${i[0]}}}`)
|
|
2910
2949
|
return l;
|
|
@@ -2926,13 +2965,13 @@ function Gn(t) {
|
|
|
2926
2965
|
}
|
|
2927
2966
|
});
|
|
2928
2967
|
}
|
|
2929
|
-
const
|
|
2930
|
-
function
|
|
2968
|
+
const kt = ["hook:updated", "hook:mounted"];
|
|
2969
|
+
function Xn(t) {
|
|
2931
2970
|
w(t.prototype, {
|
|
2932
2971
|
usePage() {
|
|
2933
2972
|
const e = this.options.page;
|
|
2934
2973
|
if (!e) return;
|
|
2935
|
-
let r = 25, n =
|
|
2974
|
+
let r = 25, n = Zn(this.rules);
|
|
2936
2975
|
m.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (n = parseInt(e.limit, 10) || n)), w(this, {
|
|
2937
2976
|
first: r,
|
|
2938
2977
|
limit: n,
|
|
@@ -2941,16 +2980,16 @@ function Yn(t) {
|
|
|
2941
2980
|
},
|
|
2942
2981
|
pageLoad() {
|
|
2943
2982
|
const e = () => {
|
|
2944
|
-
this.pageEnd ? (this.bus.$off(
|
|
2983
|
+
this.pageEnd ? (this.bus.$off(kt, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2945
2984
|
};
|
|
2946
|
-
this.bus.$on(
|
|
2985
|
+
this.bus.$on(kt, e);
|
|
2947
2986
|
}
|
|
2948
2987
|
});
|
|
2949
2988
|
}
|
|
2950
|
-
function
|
|
2989
|
+
function Zn(t) {
|
|
2951
2990
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2952
2991
|
}
|
|
2953
|
-
function
|
|
2992
|
+
function ei(t) {
|
|
2954
2993
|
w(t.prototype, {
|
|
2955
2994
|
clearNextTick() {
|
|
2956
2995
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2965,15 +3004,15 @@ function Jn(t) {
|
|
|
2965
3004
|
}
|
|
2966
3005
|
});
|
|
2967
3006
|
}
|
|
2968
|
-
function
|
|
3007
|
+
function ti(t) {
|
|
2969
3008
|
Object.defineProperties(t.origin, {
|
|
2970
|
-
__fc__:
|
|
3009
|
+
__fc__: st(fe(t))
|
|
2971
3010
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2972
|
-
__fc__:
|
|
3011
|
+
__fc__: st(fe(t))
|
|
2973
3012
|
});
|
|
2974
3013
|
}
|
|
2975
|
-
function
|
|
2976
|
-
const n =
|
|
3014
|
+
function sr(t, e, r) {
|
|
3015
|
+
const n = He(), s = !!e.field;
|
|
2977
3016
|
w(this, {
|
|
2978
3017
|
id: n,
|
|
2979
3018
|
ref: n,
|
|
@@ -2995,14 +3034,15 @@ function tr(t, e, r) {
|
|
|
2995
3034
|
computed: {},
|
|
2996
3035
|
payload: {},
|
|
2997
3036
|
refRule: {},
|
|
3037
|
+
handlers: null,
|
|
2998
3038
|
input: s,
|
|
2999
3039
|
el: void 0,
|
|
3000
3040
|
exportEl: void 0,
|
|
3001
3041
|
defaultValue: s ? ee(r) : void 0,
|
|
3002
3042
|
field: e.field || void 0
|
|
3003
|
-
}), this.updateKey(),
|
|
3043
|
+
}), this.updateKey(), ti(this), this.update(t, !0);
|
|
3004
3044
|
}
|
|
3005
|
-
w(
|
|
3045
|
+
w(sr.prototype, {
|
|
3006
3046
|
getParentGroup() {
|
|
3007
3047
|
let t = this.parent;
|
|
3008
3048
|
for (; t; ) {
|
|
@@ -3035,12 +3075,12 @@ w(tr.prototype, {
|
|
|
3035
3075
|
delete this.pending[e];
|
|
3036
3076
|
let a = r;
|
|
3037
3077
|
if (m.Function(r)) {
|
|
3038
|
-
let l =
|
|
3078
|
+
let l = V(() => r({
|
|
3039
3079
|
rule: this.rule,
|
|
3040
3080
|
api: this.$api,
|
|
3041
3081
|
update: (u) => {
|
|
3042
|
-
const f = u || n,
|
|
3043
|
-
this.setPending(e, r, f), o && o(f,
|
|
3082
|
+
const f = u || n, c = this.getPending(e, n);
|
|
3083
|
+
this.setPending(e, r, f), o && o(f, c);
|
|
3044
3084
|
},
|
|
3045
3085
|
reload: () => {
|
|
3046
3086
|
const u = this.getPending(e, n);
|
|
@@ -3062,7 +3102,7 @@ w(tr.prototype, {
|
|
|
3062
3102
|
setPending(t, e, r) {
|
|
3063
3103
|
this.pending[t] = {
|
|
3064
3104
|
origin: e,
|
|
3065
|
-
value:
|
|
3105
|
+
value: Z(r)
|
|
3066
3106
|
};
|
|
3067
3107
|
},
|
|
3068
3108
|
effectData(t) {
|
|
@@ -3072,10 +3112,10 @@ w(tr.prototype, {
|
|
|
3072
3112
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
3073
3113
|
},
|
|
3074
3114
|
updateKey(t) {
|
|
3075
|
-
this.key =
|
|
3115
|
+
this.key = He(), t && this.parent && this.parent.updateKey(t);
|
|
3076
3116
|
},
|
|
3077
3117
|
updateType() {
|
|
3078
|
-
this.originType = this.rule.type, this.type =
|
|
3118
|
+
this.originType = this.rule.type, this.type = H(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
3079
3119
|
},
|
|
3080
3120
|
setParser(t) {
|
|
3081
3121
|
this.parser = t, t.init(this);
|
|
@@ -3118,7 +3158,12 @@ w(tr.prototype, {
|
|
|
3118
3158
|
parent: null,
|
|
3119
3159
|
children: [],
|
|
3120
3160
|
cacheConfig: null,
|
|
3121
|
-
none: !1
|
|
3161
|
+
none: !1,
|
|
3162
|
+
handlers: null,
|
|
3163
|
+
//rule.__fc__ 是不可配置的强引用,ctx 往往比表单活得更久,
|
|
3164
|
+
//这里必须主动释放 DOM,否则已卸载的节点会一直被规则树持有
|
|
3165
|
+
el: void 0,
|
|
3166
|
+
exportEl: void 0
|
|
3122
3167
|
});
|
|
3123
3168
|
},
|
|
3124
3169
|
rmCtrl() {
|
|
@@ -3154,7 +3199,7 @@ w(tr.prototype, {
|
|
|
3154
3199
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3155
3200
|
}
|
|
3156
3201
|
});
|
|
3157
|
-
function
|
|
3202
|
+
function ri(t) {
|
|
3158
3203
|
w(t.prototype, {
|
|
3159
3204
|
nextRefresh(e) {
|
|
3160
3205
|
const r = this.loadedId;
|
|
@@ -3163,10 +3208,10 @@ function Xn(t) {
|
|
|
3163
3208
|
});
|
|
3164
3209
|
},
|
|
3165
3210
|
parseRule(e) {
|
|
3166
|
-
const r =
|
|
3211
|
+
const r = Ct(e);
|
|
3167
3212
|
return Object.defineProperties(r, {
|
|
3168
|
-
__origin__:
|
|
3169
|
-
}),
|
|
3213
|
+
__origin__: st(e)
|
|
3214
|
+
}), ni(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((n) => {
|
|
3170
3215
|
n && this.loadFn(n, r);
|
|
3171
3216
|
}), this.loadCtrl(r), r.update && (r.update = te(r.update)), r;
|
|
3172
3217
|
},
|
|
@@ -3213,32 +3258,32 @@ function Xn(t) {
|
|
|
3213
3258
|
if (r && !m.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3214
3259
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3215
3260
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3216
|
-
let l =
|
|
3261
|
+
let l = Ct(o);
|
|
3217
3262
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3218
3263
|
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);
|
|
3219
|
-
let f,
|
|
3264
|
+
let f, c = !1, h = !!o.__fc__, p = l.value;
|
|
3220
3265
|
if (h) {
|
|
3221
3266
|
if (f = o.__fc__, p = f.defaultValue, f.deleted) {
|
|
3222
|
-
if (
|
|
3267
|
+
if (Dt(f))
|
|
3223
3268
|
return;
|
|
3224
3269
|
f.update(this);
|
|
3225
3270
|
} else if (!f.check(this)) {
|
|
3226
|
-
if (
|
|
3271
|
+
if (Dt(f))
|
|
3227
3272
|
return;
|
|
3228
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3273
|
+
e[a] = o = o._clone ? o._clone() : xt(De(o)), f = null, c = !0;
|
|
3229
3274
|
}
|
|
3230
3275
|
}
|
|
3231
3276
|
if (f)
|
|
3232
3277
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3233
3278
|
else {
|
|
3234
|
-
const
|
|
3235
|
-
f = new
|
|
3279
|
+
const F = this.parseRule(o);
|
|
3280
|
+
f = new sr(this, F, p), this.bindParser(f);
|
|
3236
3281
|
}
|
|
3237
|
-
this.parseEmit(f), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !
|
|
3238
|
-
const
|
|
3239
|
-
if (f.parser.loadChildren === !1 || s(
|
|
3240
|
-
const
|
|
3241
|
-
|
|
3282
|
+
this.parseEmit(f), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !c && !h && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3283
|
+
const y = f.loadChildrenPending();
|
|
3284
|
+
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3285
|
+
const F = n(a);
|
|
3286
|
+
F > -1 || !a ? this.sort.splice(F + 1, 0, f.id) : this.sort.push(f.id);
|
|
3242
3287
|
}
|
|
3243
3288
|
const C = f.rule;
|
|
3244
3289
|
return f.updated || (f.updated = !0, m.Function(C.update) && this.bus.$once("load-end", () => {
|
|
@@ -3251,16 +3296,16 @@ function Xn(t) {
|
|
|
3251
3296
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3252
3297
|
},
|
|
3253
3298
|
useCtrl(e) {
|
|
3254
|
-
const r =
|
|
3299
|
+
const r = ii(e), n = [], s = this.api;
|
|
3255
3300
|
if (!r.length) return !1;
|
|
3256
3301
|
for (let a = 0; a < r.length; a++) {
|
|
3257
|
-
const l = r[a], u = l.handle || function(
|
|
3258
|
-
return (Ce[l.condition || "=="] || Ce["=="])(
|
|
3302
|
+
const l = r[a], u = l.handle || function(c) {
|
|
3303
|
+
return (Ce[l.condition || "=="] || Ce["=="])(c, l.value);
|
|
3259
3304
|
};
|
|
3260
3305
|
if (!m.trueArray(l.rule)) continue;
|
|
3261
|
-
const f =
|
|
3262
|
-
valid:
|
|
3263
|
-
ctrl:
|
|
3306
|
+
const f = z(_({}, l), {
|
|
3307
|
+
valid: V(() => u(e.rule.value, s)),
|
|
3308
|
+
ctrl: si(e, l.rule),
|
|
3264
3309
|
isHidden: m.String(l.rule[0])
|
|
3265
3310
|
});
|
|
3266
3311
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || n.push(f);
|
|
@@ -3269,16 +3314,16 @@ function Xn(t) {
|
|
|
3269
3314
|
const i = [];
|
|
3270
3315
|
let o = !1;
|
|
3271
3316
|
return this.deferSyncValue(() => {
|
|
3272
|
-
n.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append:
|
|
3317
|
+
n.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: c, child: h, ctrl: p, method: y }) => {
|
|
3273
3318
|
if (a) {
|
|
3274
3319
|
l ? e.ctrlRule.push({
|
|
3275
3320
|
__ctrl: !0,
|
|
3276
3321
|
children: u,
|
|
3277
3322
|
valid: l
|
|
3278
3323
|
}) : p && e.ctrlRule.splice(e.ctrlRule.indexOf(p) >>> 0, 1), i[l ? "push" : "unshift"](() => {
|
|
3279
|
-
|
|
3324
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((C) => {
|
|
3280
3325
|
this.api.setEffect(C, "required", l);
|
|
3281
|
-
}), l || this.api.clearValidateState(u)) :
|
|
3326
|
+
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3282
3327
|
});
|
|
3283
3328
|
return;
|
|
3284
3329
|
}
|
|
@@ -3291,11 +3336,11 @@ function Xn(t) {
|
|
|
3291
3336
|
children: u
|
|
3292
3337
|
};
|
|
3293
3338
|
e.ctrlRule.push(C), this.bus.$once("load-start", () => {
|
|
3294
|
-
f ? s.prepend(C, f, h) :
|
|
3339
|
+
f ? s.prepend(C, f, h) : c || h ? s.append(C, c || e.id, h) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, C);
|
|
3295
3340
|
});
|
|
3296
3341
|
} else {
|
|
3297
3342
|
e.ctrlRule.splice(e.ctrlRule.indexOf(p), 1);
|
|
3298
|
-
const C =
|
|
3343
|
+
const C = Q(p);
|
|
3299
3344
|
C && C.rm();
|
|
3300
3345
|
}
|
|
3301
3346
|
});
|
|
@@ -3323,30 +3368,30 @@ function Xn(t) {
|
|
|
3323
3368
|
}
|
|
3324
3369
|
});
|
|
3325
3370
|
}
|
|
3326
|
-
function
|
|
3327
|
-
const e =
|
|
3371
|
+
function ni(t) {
|
|
3372
|
+
const e = rr();
|
|
3328
3373
|
return Object.keys(e).forEach((r) => {
|
|
3329
3374
|
D(t, r) || (t[r] = e[r]);
|
|
3330
3375
|
}), t;
|
|
3331
3376
|
}
|
|
3332
|
-
function
|
|
3377
|
+
function ii(t) {
|
|
3333
3378
|
const e = t.rule.control || [];
|
|
3334
3379
|
return m.Object(e) ? [e] : e;
|
|
3335
3380
|
}
|
|
3336
|
-
function
|
|
3381
|
+
function si(t, e) {
|
|
3337
3382
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3338
3383
|
const n = t.ctrlRule[r];
|
|
3339
3384
|
if (n.children === e)
|
|
3340
3385
|
return n;
|
|
3341
3386
|
}
|
|
3342
3387
|
}
|
|
3343
|
-
function
|
|
3388
|
+
function Dt(t) {
|
|
3344
3389
|
return !!t.rule.__ctrl;
|
|
3345
3390
|
}
|
|
3346
|
-
function
|
|
3391
|
+
function oi(t) {
|
|
3347
3392
|
w(t.prototype, {
|
|
3348
3393
|
setValue(e, r, n, s) {
|
|
3349
|
-
e.deleted || (e.rule.value = r, this.changeStatus = !0, this.
|
|
3394
|
+
e.deleted || (e.rule.value = r, this.changeStatus = !0, this.setFormData(e, n), this.$render.clearCache(e), this.nextRefresh(), this.syncValue(), this.valueChange(e, r), this.vm.emit("change", e.field, r, e.origin, this.api, s || !1), this.effect(e, "value"), this.targetHook(e, "value", { value: r }), this.emitEvent("change", e.field, r, {
|
|
3350
3395
|
rule: e.origin,
|
|
3351
3396
|
api: this.api,
|
|
3352
3397
|
setFlag: s || !1
|
|
@@ -3371,12 +3416,12 @@ function ti(t) {
|
|
|
3371
3416
|
});
|
|
3372
3417
|
},
|
|
3373
3418
|
onBaseInput(e, r) {
|
|
3374
|
-
this.setFormData(e, r),
|
|
3419
|
+
this.setFormData(e, r), this.$render.clearCache(e), this.nextRefresh();
|
|
3375
3420
|
},
|
|
3376
3421
|
setFormData(e, r) {
|
|
3377
3422
|
e.modelValue = r;
|
|
3378
3423
|
const n = e.getParentGroup();
|
|
3379
|
-
n && (this.subRuleData[n.id] || (this.subRuleData[n.id] = {}), this.subRuleData[n.id][e.field] = e.rule.value),
|
|
3424
|
+
n && (this.subRuleData[n.id] || (this.subRuleData[n.id] = {}), this.subRuleData[n.id][e.field] = e.rule.value), K(this.formData, e.id, r);
|
|
3380
3425
|
},
|
|
3381
3426
|
rmSubRuleData(e) {
|
|
3382
3427
|
const r = e.getParentGroup();
|
|
@@ -3386,10 +3431,10 @@ function ti(t) {
|
|
|
3386
3431
|
return this.formData[e.id];
|
|
3387
3432
|
},
|
|
3388
3433
|
syncForm() {
|
|
3389
|
-
const e =
|
|
3390
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, i) => (r.indexOf(i) === -1 && (s[i] =
|
|
3434
|
+
const e = Z({}), r = this.fields(), n = [];
|
|
3435
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, i) => (r.indexOf(i) === -1 && (s[i] = L(this.appendData, i)), s), e), r.reduce((s, i) => {
|
|
3391
3436
|
let o = (this.fieldCtx[i] || []).filter((a) => !this.isIgnore(a))[0];
|
|
3392
|
-
return o || (o = this.fieldCtx[i][0], n.push(i)), s[i] =
|
|
3437
|
+
return o || (o = this.fieldCtx[i][0], n.push(i)), s[i] = L(o.rule, "value"), s;
|
|
3393
3438
|
}, e), this.form = e, this.ignoreFields = n, this.syncValue();
|
|
3394
3439
|
},
|
|
3395
3440
|
isIgnore(e) {
|
|
@@ -3402,7 +3447,7 @@ function ti(t) {
|
|
|
3402
3447
|
this.subForm[e.id] = r;
|
|
3403
3448
|
},
|
|
3404
3449
|
deferSyncValue(e, r) {
|
|
3405
|
-
this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r),
|
|
3450
|
+
this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), V(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
|
|
3406
3451
|
},
|
|
3407
3452
|
syncValue() {
|
|
3408
3453
|
if (this.deferSyncFn)
|
|
@@ -3413,14 +3458,18 @@ function ti(t) {
|
|
|
3413
3458
|
}), this.vm.setupState.updateValue(e);
|
|
3414
3459
|
},
|
|
3415
3460
|
isChange(e, r) {
|
|
3416
|
-
|
|
3461
|
+
const n = this.getFormData(e);
|
|
3462
|
+
if (n === r)
|
|
3463
|
+
return !1;
|
|
3464
|
+
const s = typeof n;
|
|
3465
|
+
return s === typeof r && (s === "string" || s === "boolean" || s === "number" && Number.isFinite(n) && Number.isFinite(r)) ? !0 : JSON.stringify(n, At) !== JSON.stringify(r, At);
|
|
3417
3466
|
},
|
|
3418
3467
|
isQuote(e, r) {
|
|
3419
3468
|
return (r instanceof Function || m.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
3420
3469
|
},
|
|
3421
3470
|
refreshUpdate(e, r, n, s) {
|
|
3422
3471
|
if (m.Function(e.rule.update)) {
|
|
3423
|
-
const i =
|
|
3472
|
+
const i = V(() => e.rule.update(r, e.origin, this.api, {
|
|
3424
3473
|
origin: n || "change",
|
|
3425
3474
|
linkField: s
|
|
3426
3475
|
}));
|
|
@@ -3446,10 +3495,10 @@ function ti(t) {
|
|
|
3446
3495
|
}
|
|
3447
3496
|
});
|
|
3448
3497
|
}
|
|
3449
|
-
function
|
|
3498
|
+
function At(t, e) {
|
|
3450
3499
|
return typeof e == "function" ? "" + e : e;
|
|
3451
3500
|
}
|
|
3452
|
-
const
|
|
3501
|
+
const Re = {
|
|
3453
3502
|
init(t) {
|
|
3454
3503
|
},
|
|
3455
3504
|
toFormValue(t, e) {
|
|
@@ -3468,9 +3517,31 @@ const Fe = {
|
|
|
3468
3517
|
},
|
|
3469
3518
|
mergeProp(t) {
|
|
3470
3519
|
}
|
|
3471
|
-
},
|
|
3472
|
-
function
|
|
3520
|
+
}, ai = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Ee = Symbol("oldValue"), li = ["$condition", "$variableVal", "$val", "$form", "$scope", "$group", "$rule"], ui = ["$formulas", "$form", "$scope", "$group", "$rule", "$api"], Ne = /* @__PURE__ */ new Map(), fi = 1e3;
|
|
3521
|
+
function jt(t, e) {
|
|
3522
|
+
const r = t.join(",") + "|" + e;
|
|
3523
|
+
let n = Ne.get(r);
|
|
3524
|
+
return n || (Ne.size >= fi && Ne.clear(), n = new Function(...t, e), Ne.set(r, n)), n;
|
|
3525
|
+
}
|
|
3526
|
+
function ci(t) {
|
|
3473
3527
|
w(t.prototype, {
|
|
3528
|
+
//computed 更新原先各自 setTimeout(0),N 个字段同时联动就会拆成 N 个宏任务,
|
|
3529
|
+
//Vue 在任务之间各 flush 一次,render 被放大 N 倍。
|
|
3530
|
+
//这里改成按入队顺序在同一个宏任务里串行执行,并在 flush 期间继续吞掉级联入队,
|
|
3531
|
+
//相对顺序与原先一致,只是把中间多余的渲染合并掉。
|
|
3532
|
+
scheduleComputedUpdate(e) {
|
|
3533
|
+
(this._computedQueue || (this._computedQueue = [])).push(e), !(this._computedFlushing || this._computedScheduled) && (this._computedScheduled = !0, setTimeout(() => {
|
|
3534
|
+
this._computedScheduled = !1, this._computedFlushing = !0;
|
|
3535
|
+
try {
|
|
3536
|
+
const r = this._computedQueue || [];
|
|
3537
|
+
this._computedQueue = [];
|
|
3538
|
+
for (let n = 0; n < r.length; n++)
|
|
3539
|
+
V(r[n]), this._computedQueue && this._computedQueue.length && (r.push(...this._computedQueue), this._computedQueue = []);
|
|
3540
|
+
} finally {
|
|
3541
|
+
this._computedFlushing = !1;
|
|
3542
|
+
}
|
|
3543
|
+
}));
|
|
3544
|
+
},
|
|
3474
3545
|
getCtx(e) {
|
|
3475
3546
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
3476
3547
|
},
|
|
@@ -3500,119 +3571,126 @@ function ni(t) {
|
|
|
3500
3571
|
getParser(e) {
|
|
3501
3572
|
const r = this.fc.parsers, n = this.fc.renderDriver;
|
|
3502
3573
|
if (n) {
|
|
3503
|
-
const s = n.parsers || {}, i = s[e.originType] || s[
|
|
3574
|
+
const s = n.parsers || {}, i = s[e.originType] || s[H(e.type)] || s[e.trueType];
|
|
3504
3575
|
if (i)
|
|
3505
3576
|
return i;
|
|
3506
3577
|
}
|
|
3507
|
-
return r[e.originType] || r[
|
|
3578
|
+
return r[e.originType] || r[H(e.type)] || r[e.trueType] || Re;
|
|
3508
3579
|
},
|
|
3509
3580
|
bindParser(e) {
|
|
3510
3581
|
e.setParser(this.getParser(e));
|
|
3511
3582
|
},
|
|
3512
3583
|
getType(e) {
|
|
3513
|
-
const r = this.fc.CreateNode.aliasMap, n = r[e] || r[
|
|
3514
|
-
return
|
|
3584
|
+
const r = this.fc.CreateNode.aliasMap, n = r[e] || r[H(e)] || e;
|
|
3585
|
+
return H(n);
|
|
3515
3586
|
},
|
|
3516
3587
|
noWatch(e) {
|
|
3517
|
-
this.noWatchFn || (this.noWatchFn = e),
|
|
3588
|
+
this.noWatchFn || (this.noWatchFn = e), V(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3518
3589
|
},
|
|
3519
3590
|
watchCtx(e) {
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
this.$render.clearCache(e), this.nextRefresh();
|
|
3527
|
-
return;
|
|
3528
|
-
}
|
|
3529
|
-
if (this.watching = !0, I(() => {
|
|
3530
|
-
this.targetHook(e, "watch", { key: n, oldValue: a, newValue: l });
|
|
3531
|
-
}), n === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), I(() => {
|
|
3532
|
-
this.targetHook(e, "hidden", { value: l });
|
|
3533
|
-
})), n === "ignore" && e.input || n === "hidden" && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
|
|
3534
|
-
this.syncForm();
|
|
3535
|
-
else if (n === "link") {
|
|
3536
|
-
e.link();
|
|
3537
|
-
return;
|
|
3538
|
-
} else ["props", "on", "deep"].indexOf(n) > -1 ? (this.parseInjectEvent(e.rule, l || {}), n === "props" && e.input && this.setFormData(e, e.parser.toFormValue(e.rule.value, e))) : n === "emit" ? this.parseEmit(e) : ["prefix", "suffix"].indexOf(n) > -1 ? l && this.loadFn(l, e.rule) : n === "type" ? (e.updateType(), this.bindParser(e)) : i && (m.Function(a) && (a = e.getPending("children", [])), m.Function(l) && (l = e.loadChildrenPending()), this.updateChildren(e, l, a));
|
|
3539
|
-
this.$render.clearCache(e), this.refresh(), this.watching = !1;
|
|
3591
|
+
const r = Jt().filter((o) => o[0] !== "_" && o[0] !== "$" && ai.indexOf(o) === -1), n = {}, s = (o, a, l) => (u, f) => {
|
|
3592
|
+
let c = a.value;
|
|
3593
|
+
if (!this.isBreakWatch()) {
|
|
3594
|
+
if (l && e.parser.loadChildren === !1) {
|
|
3595
|
+
this.$render.clearCache(e), this.nextRefresh();
|
|
3596
|
+
return;
|
|
3540
3597
|
}
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3598
|
+
if (this.watching = !0, I(() => {
|
|
3599
|
+
this.targetHook(e, "watch", { key: o, oldValue: f, newValue: c });
|
|
3600
|
+
}), o === "hidden" && !!c != !!f && I(() => {
|
|
3601
|
+
this.targetHook(e, "hidden", { value: c });
|
|
3602
|
+
}), o === "ignore" && e.input || o === "hidden" && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
|
|
3603
|
+
this.syncForm();
|
|
3604
|
+
else if (o === "link") {
|
|
3605
|
+
e.link();
|
|
3606
|
+
return;
|
|
3607
|
+
} else ["props", "on", "deep"].indexOf(o) > -1 ? (this.parseInjectEvent(e.rule, c || {}), o === "props" && e.input && this.setFormData(e, e.parser.toFormValue(e.rule.value, e))) : o === "emit" ? this.parseEmit(e) : ["prefix", "suffix"].indexOf(o) > -1 ? c && this.loadFn(c, e.rule) : o === "type" ? (e.updateType(), this.bindParser(e)) : l && (m.Function(f) && (f = e.getPending("children", [])), m.Function(c) && (c = e.loadChildrenPending()), this.updateChildren(e, c, f));
|
|
3608
|
+
this.$render.clearCache(e), this.refresh(), this.watching = !1;
|
|
3547
3609
|
}
|
|
3548
|
-
|
|
3610
|
+
}, i = (o, a) => {
|
|
3611
|
+
if (n[o]) return;
|
|
3612
|
+
n[o] = !0;
|
|
3613
|
+
const l = e.refRule[o], u = o === "children", f = s(o, l, u);
|
|
3614
|
+
e.watch.push(B(u ? () => m.Function(l.value) ? l.value : [...l.value || []] : () => l.value, f, { deep: !u, sync: u })), a && f(l.value, void 0);
|
|
3615
|
+
};
|
|
3616
|
+
if (r.forEach((o) => {
|
|
3617
|
+
e.refRule[o] = L(e.rule, o), D(e.rule, o) && i(o);
|
|
3618
|
+
}), e.watch.push(B(() => Object.keys(e.rule).join("|"), () => {
|
|
3619
|
+
r.forEach((o) => {
|
|
3620
|
+
!n[o] && D(e.rule, o) && i(o, !0);
|
|
3621
|
+
});
|
|
3622
|
+
})), e.refRule.__$title = se(() => {
|
|
3623
|
+
let o = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
|
|
3624
|
+
if (o) {
|
|
3625
|
+
const a = o.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3626
|
+
a && (o = this.api.t(a[1]));
|
|
3627
|
+
}
|
|
3628
|
+
return o;
|
|
3549
3629
|
}), e.refRule.__$info = se(() => {
|
|
3550
|
-
let
|
|
3551
|
-
if (
|
|
3552
|
-
const
|
|
3553
|
-
|
|
3630
|
+
let o = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
|
|
3631
|
+
if (o) {
|
|
3632
|
+
const a = o.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3633
|
+
a && (o = this.api.t(a[1]));
|
|
3554
3634
|
}
|
|
3555
|
-
return
|
|
3635
|
+
return o;
|
|
3556
3636
|
}), e.refRule.__$validate = se(() => {
|
|
3557
|
-
const
|
|
3558
|
-
var
|
|
3559
|
-
const
|
|
3560
|
-
return
|
|
3637
|
+
const o = (a) => {
|
|
3638
|
+
var u, f;
|
|
3639
|
+
const l = a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3640
|
+
return l ? this.api.t(l[1], { title: (f = (u = e.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value }) : a;
|
|
3561
3641
|
};
|
|
3562
|
-
return
|
|
3563
|
-
const
|
|
3564
|
-
if (
|
|
3565
|
-
const
|
|
3566
|
-
|
|
3567
|
-
return
|
|
3642
|
+
return q(e.rule.validate).map((a) => {
|
|
3643
|
+
const l = _({}, a);
|
|
3644
|
+
if (l.message && (l.message = o(l.message)), m.Function(l.validator)) {
|
|
3645
|
+
const u = e;
|
|
3646
|
+
l.validator = function(...f) {
|
|
3647
|
+
return a.validator.call({
|
|
3568
3648
|
that: this,
|
|
3569
|
-
id:
|
|
3570
|
-
field:
|
|
3571
|
-
rule:
|
|
3572
|
-
api:
|
|
3573
|
-
}, ...
|
|
3649
|
+
id: u.id,
|
|
3650
|
+
field: u.field,
|
|
3651
|
+
rule: u.rule,
|
|
3652
|
+
api: u.$handle.api
|
|
3653
|
+
}, ...f);
|
|
3574
3654
|
};
|
|
3575
3655
|
}
|
|
3576
|
-
if (
|
|
3577
|
-
if (typeof
|
|
3578
|
-
const
|
|
3579
|
-
Object.keys(
|
|
3580
|
-
|
|
3581
|
-
}),
|
|
3656
|
+
if (l.adapter) {
|
|
3657
|
+
if (typeof l.error == "object") {
|
|
3658
|
+
const u = _({}, l.error);
|
|
3659
|
+
Object.keys(u).forEach((f) => {
|
|
3660
|
+
u[f] = o(u[f]);
|
|
3661
|
+
}), l.error = u;
|
|
3582
3662
|
}
|
|
3583
|
-
return this.adapterValidate(
|
|
3663
|
+
return this.adapterValidate(l, e);
|
|
3584
3664
|
}
|
|
3585
|
-
return
|
|
3665
|
+
return l;
|
|
3586
3666
|
});
|
|
3587
3667
|
}), e.input) {
|
|
3588
|
-
const
|
|
3589
|
-
e.watch.push(
|
|
3590
|
-
let
|
|
3591
|
-
this.isChange(e,
|
|
3668
|
+
const o = L(e.rule, "value");
|
|
3669
|
+
e.watch.push(B(() => o.value, () => {
|
|
3670
|
+
let a = e.parser.toFormValue(o.value, e);
|
|
3671
|
+
this.isChange(e, a) && this.setValue(e, o.value, a, !0);
|
|
3592
3672
|
}));
|
|
3593
3673
|
}
|
|
3594
3674
|
this.bus.$once("load-end", () => {
|
|
3595
|
-
let
|
|
3596
|
-
|
|
3597
|
-
const
|
|
3598
|
-
const
|
|
3599
|
-
if (!
|
|
3600
|
-
const
|
|
3601
|
-
return (
|
|
3602
|
-
}),
|
|
3603
|
-
|
|
3675
|
+
let o = e.rule.computed;
|
|
3676
|
+
o && (typeof o != "object" && (o = { value: o }), Object.keys(o).forEach((a) => {
|
|
3677
|
+
const l = se(() => {
|
|
3678
|
+
const f = o[a];
|
|
3679
|
+
if (!f) return;
|
|
3680
|
+
const c = this.compute(e, f);
|
|
3681
|
+
return (f.linkage || f.linkageVariable) && c === Ee ? Ee : c;
|
|
3682
|
+
}), u = (f) => {
|
|
3683
|
+
a === "value" ? this.onInput(e, f) : a[0] === "$" ? this.api.setEffect(e.id, a, f) : he(e.rule, a, f);
|
|
3604
3684
|
};
|
|
3605
|
-
(
|
|
3606
|
-
|
|
3607
|
-
o(a);
|
|
3608
|
-
});
|
|
3685
|
+
(a === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : l.value !== M(e.rule, a)) && u(l.value), e.watch.push(B(l, (f) => {
|
|
3686
|
+
f !== Ee && this.scheduleComputedUpdate(() => u(f));
|
|
3609
3687
|
}, { deep: !0 }));
|
|
3610
3688
|
}));
|
|
3611
3689
|
}), this.watchEffect(e);
|
|
3612
3690
|
},
|
|
3613
3691
|
adapterValidate(e, r) {
|
|
3614
3692
|
const n = (s, i) => {
|
|
3615
|
-
if ((e.beforeValidate &&
|
|
3693
|
+
if ((e.beforeValidate && V(() => e.beforeValidate({
|
|
3616
3694
|
value: s,
|
|
3617
3695
|
api: this.api,
|
|
3618
3696
|
validate: e,
|
|
@@ -3625,7 +3703,7 @@ function ni(t) {
|
|
|
3625
3703
|
let l = "";
|
|
3626
3704
|
typeof e.error == "object" && (l = e.error[a] || e.error.default), !l && typeof e.message == "string" && (l = e.message), l || (l = this.getValidateMessage(r, { key: a, rule: e[a] })), i(l);
|
|
3627
3705
|
} else if (e.validator) {
|
|
3628
|
-
const l = e.validator &&
|
|
3706
|
+
const l = e.validator && V(() => e.validator(s, i));
|
|
3629
3707
|
l && m.Function(l.then) && l.then(() => i()).catch((u) => i(u));
|
|
3630
3708
|
} else
|
|
3631
3709
|
i();
|
|
@@ -3653,7 +3731,7 @@ function ni(t) {
|
|
|
3653
3731
|
case "len":
|
|
3654
3732
|
case "maxLen":
|
|
3655
3733
|
case "minLen":
|
|
3656
|
-
const a = (
|
|
3734
|
+
const a = (y) => i === "len" ? y === o : i === "maxLen" ? y <= o : y >= o;
|
|
3657
3735
|
if (Array.isArray(r)) {
|
|
3658
3736
|
if (!a(r.length))
|
|
3659
3737
|
return i;
|
|
@@ -3695,7 +3773,7 @@ function ni(t) {
|
|
|
3695
3773
|
return i;
|
|
3696
3774
|
break;
|
|
3697
3775
|
case "hasKeys":
|
|
3698
|
-
if (typeof r != "object" || Array.isArray(o) && o.some((
|
|
3776
|
+
if (typeof r != "object" || Array.isArray(o) && o.some((y) => !(y in r)))
|
|
3699
3777
|
return i;
|
|
3700
3778
|
break;
|
|
3701
3779
|
case "email":
|
|
@@ -3732,30 +3810,30 @@ function ni(t) {
|
|
|
3732
3810
|
const l = a.mode === "OR";
|
|
3733
3811
|
let u = !0;
|
|
3734
3812
|
for (let f = 0; f < a.group.length; f++) {
|
|
3735
|
-
const
|
|
3736
|
-
let h, p = null,
|
|
3737
|
-
if (
|
|
3738
|
-
|
|
3739
|
-
else if (
|
|
3740
|
-
p =
|
|
3741
|
-
else if (!
|
|
3813
|
+
const c = a.group[f];
|
|
3814
|
+
let h, p = null, y = null;
|
|
3815
|
+
if (c.variable)
|
|
3816
|
+
y = this.fc.getLoadData(c.variable);
|
|
3817
|
+
else if (c.field)
|
|
3818
|
+
p = Ft(c.field || "");
|
|
3819
|
+
else if (!c.mode)
|
|
3742
3820
|
return !0;
|
|
3743
|
-
let C =
|
|
3744
|
-
if (C && (C =
|
|
3821
|
+
let C = c.compare;
|
|
3822
|
+
if (C && (C = Ft(C || "")), c.mode ? h = i(c) : Ce[c.condition] ? m.Function(c.handler) ? h = V(() => c.handler(this.api, e.rule)) : h = V(() => jt(li, `with($form){with($scope){with(this){with($group){ return $condition['${c.condition}'](${c.variable ? "$variableVal" : p}, ${C || "$val"}); }}}}`).call(this.api.form, Ce, y, c.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : h = !1, l && h)
|
|
3745
3823
|
return !0;
|
|
3746
3824
|
l || (u = u && h);
|
|
3747
3825
|
}
|
|
3748
3826
|
return l ? !1 : u;
|
|
3749
3827
|
};
|
|
3750
3828
|
let o = i(r);
|
|
3751
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ?
|
|
3829
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? V(() => this.computeValue(r.linkage, e, s), void 0) : Ee : r.linkageVariable ? o ? V(() => this.fc.getLoadData(r.linkageVariable), void 0) : Ee : o;
|
|
3752
3830
|
} else if (m.Function(r))
|
|
3753
3831
|
n = () => r(this.api.form, this.api, e.rule);
|
|
3754
3832
|
else {
|
|
3755
3833
|
const s = e.getParentGroup();
|
|
3756
3834
|
n = () => this.computeValue(r, e, s);
|
|
3757
3835
|
}
|
|
3758
|
-
return
|
|
3836
|
+
return V(n, void 0);
|
|
3759
3837
|
},
|
|
3760
3838
|
computeValue(e, r, n) {
|
|
3761
3839
|
const s = this, i = Object.keys(this.fc.formulas).reduce((o, a) => (o[a] = function(...l) {
|
|
@@ -3766,7 +3844,7 @@ function ni(t) {
|
|
|
3766
3844
|
fc: s.fc
|
|
3767
3845
|
}, ...l);
|
|
3768
3846
|
}, o), {});
|
|
3769
|
-
return
|
|
3847
|
+
return V(() => jt(ui, `with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form, i, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, n ? this.subRuleData[n.id] || {} : {}, r.rule, this.api), void 0);
|
|
3770
3848
|
},
|
|
3771
3849
|
updateChildren(e, r, n) {
|
|
3772
3850
|
this.deferSyncValue(() => {
|
|
@@ -3799,7 +3877,7 @@ function ni(t) {
|
|
|
3799
3877
|
}
|
|
3800
3878
|
});
|
|
3801
3879
|
}
|
|
3802
|
-
function
|
|
3880
|
+
function di(t) {
|
|
3803
3881
|
w(t.prototype, {
|
|
3804
3882
|
mounted() {
|
|
3805
3883
|
const e = () => {
|
|
@@ -3811,36 +3889,36 @@ function ii(t) {
|
|
|
3811
3889
|
this.fc.targetFormDriver(e, this.api, this.fc), this.vm.emit(e, this.api), this.emitEvent(e, this.api);
|
|
3812
3890
|
},
|
|
3813
3891
|
emitEvent(e, ...r) {
|
|
3814
|
-
const n = this.options[e] || this.options[
|
|
3892
|
+
const n = this.options[e] || this.options[H("on-" + e)];
|
|
3815
3893
|
if (n) {
|
|
3816
3894
|
const s = te(n);
|
|
3817
|
-
m.Function(s) &&
|
|
3895
|
+
m.Function(s) && V(() => s(...r));
|
|
3818
3896
|
}
|
|
3819
3897
|
this.bus.$emit(e, ...r);
|
|
3820
3898
|
},
|
|
3821
3899
|
targetHook(e, r, n) {
|
|
3822
|
-
var l, u, f,
|
|
3900
|
+
var l, u, f, c;
|
|
3823
3901
|
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], i = (h, p) => {
|
|
3824
|
-
h && (h = Array.isArray(h) ? h : [h], h.forEach((
|
|
3825
|
-
|
|
3902
|
+
h && (h = Array.isArray(h) ? h : [h], h.forEach((y) => {
|
|
3903
|
+
V(() => y(z(_({ args: Object.values(n || {}) }, n || {}), { self: e.rule, rule: e.rule, parent: p == null ? void 0 : p.rule, $f: this.api, api: this.api, option: this.vm.props.option })));
|
|
3826
3904
|
}));
|
|
3827
3905
|
};
|
|
3828
3906
|
i(s);
|
|
3829
|
-
let o = "deep" +
|
|
3907
|
+
let o = "deep" + Ht(r), a = e.parent;
|
|
3830
3908
|
for (; a; ) {
|
|
3831
|
-
let h = (
|
|
3909
|
+
let h = (c = (f = a.prop) == null ? void 0 : f.hook) == null ? void 0 : c[o];
|
|
3832
3910
|
i(h, a), a = a.parent;
|
|
3833
3911
|
}
|
|
3834
3912
|
}
|
|
3835
3913
|
});
|
|
3836
3914
|
}
|
|
3837
|
-
function
|
|
3915
|
+
function hi(t) {
|
|
3838
3916
|
w(t.prototype, {
|
|
3839
3917
|
useProvider() {
|
|
3840
3918
|
const e = this.fc.providers;
|
|
3841
3919
|
Object.keys(e).forEach((r) => {
|
|
3842
3920
|
let n = e[r];
|
|
3843
|
-
m.Function(n) && (n = n(this.fc)), n._c =
|
|
3921
|
+
m.Function(n) && (n = n(this.fc)), n._c = mi(n), this.onEffect(n, r), this.providers[r] = n;
|
|
3844
3922
|
});
|
|
3845
3923
|
},
|
|
3846
3924
|
onEffect(e, r) {
|
|
@@ -3864,7 +3942,7 @@ function si(t) {
|
|
|
3864
3942
|
}), Object.keys(e.rule).forEach((n) => {
|
|
3865
3943
|
n[0] === "$" && (r[n.substr(1)] = () => e.rule[n]);
|
|
3866
3944
|
}), Object.keys(r).forEach((n) => {
|
|
3867
|
-
e.watch.push(
|
|
3945
|
+
e.watch.push(B(r[n], (s) => {
|
|
3868
3946
|
this.effect(e, "watch", { [n]: s });
|
|
3869
3947
|
}, { deep: !0 }));
|
|
3870
3948
|
});
|
|
@@ -3897,33 +3975,33 @@ function si(t) {
|
|
|
3897
3975
|
Object.keys(l).forEach((u) => {
|
|
3898
3976
|
const f = this.providers[u];
|
|
3899
3977
|
if (!f || f.input && !n) return;
|
|
3900
|
-
let
|
|
3978
|
+
let c;
|
|
3901
3979
|
if (!f._c)
|
|
3902
|
-
|
|
3980
|
+
c = "*";
|
|
3903
3981
|
else if (f._used.indexOf(s) > -1)
|
|
3904
|
-
|
|
3982
|
+
c = s;
|
|
3905
3983
|
else
|
|
3906
3984
|
return;
|
|
3907
3985
|
const h = _({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3908
|
-
e && (h.getProp = () => e.effectData(u), h.clearProp = () => e.clearEffectData(u), h.mergeProp = (p) => ae(h.getProp(), [p]), h.id = e.id), this.bus.$emit(`p:${u}:${
|
|
3986
|
+
e && (h.getProp = () => e.effectData(u), h.clearProp = () => e.clearEffectData(u), h.mergeProp = (p) => ae(h.getProp(), [p]), h.id = e.id), this.bus.$emit(`p:${u}:${c}:${f.input ? 1 : 0}`, o, [h, r, this.api]);
|
|
3909
3987
|
});
|
|
3910
3988
|
}
|
|
3911
3989
|
});
|
|
3912
3990
|
}
|
|
3913
|
-
function
|
|
3991
|
+
function pi(t) {
|
|
3914
3992
|
return t.filter(function(e, r, n) {
|
|
3915
3993
|
return n.indexOf(e, 0) === r;
|
|
3916
3994
|
});
|
|
3917
3995
|
}
|
|
3918
|
-
function
|
|
3996
|
+
function mi(t) {
|
|
3919
3997
|
const e = t.components;
|
|
3920
3998
|
if (Array.isArray(e)) {
|
|
3921
|
-
const r =
|
|
3999
|
+
const r = pi(e.filter((n) => n !== "*"));
|
|
3922
4000
|
return r.length ? r : !1;
|
|
3923
4001
|
} else return m.String(e) ? [e] : !1;
|
|
3924
4002
|
}
|
|
3925
4003
|
function ne(t) {
|
|
3926
|
-
|
|
4004
|
+
er(this, {
|
|
3927
4005
|
options() {
|
|
3928
4006
|
return t.options.value || {};
|
|
3929
4007
|
},
|
|
@@ -3942,10 +4020,10 @@ function ne(t) {
|
|
|
3942
4020
|
noWatchFn: null,
|
|
3943
4021
|
deferSyncFn: null,
|
|
3944
4022
|
isMounted: !1,
|
|
3945
|
-
formData:
|
|
3946
|
-
subRuleData:
|
|
4023
|
+
formData: Z({}),
|
|
4024
|
+
subRuleData: Z({}),
|
|
3947
4025
|
subForm: {},
|
|
3948
|
-
form:
|
|
4026
|
+
form: Z({}),
|
|
3949
4027
|
appendData: {},
|
|
3950
4028
|
ignoreFields: [],
|
|
3951
4029
|
providers: {},
|
|
@@ -3957,10 +4035,10 @@ function ne(t) {
|
|
|
3957
4035
|
nextReload: () => {
|
|
3958
4036
|
this.lifecycle("reload");
|
|
3959
4037
|
}
|
|
3960
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3961
|
-
const n =
|
|
4038
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new dt(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
4039
|
+
const n = V(() => r(e, this));
|
|
3962
4040
|
return n && n !== e && w(e, n), e;
|
|
3963
|
-
},
|
|
4041
|
+
}, Yn(this));
|
|
3964
4042
|
}
|
|
3965
4043
|
w(ne.prototype, {
|
|
3966
4044
|
initData(t) {
|
|
@@ -3983,42 +4061,42 @@ w(ne.prototype, {
|
|
|
3983
4061
|
},
|
|
3984
4062
|
globalBeforeFetch(t) {
|
|
3985
4063
|
return new Promise((e, r) => {
|
|
3986
|
-
const n = this.options.beforeFetch &&
|
|
4064
|
+
const n = this.options.beforeFetch && V(() => this.options.beforeFetch(t, { api: this.api }));
|
|
3987
4065
|
n && m.Function(n.then) ? n.then(e).catch(r) : e();
|
|
3988
4066
|
});
|
|
3989
4067
|
},
|
|
3990
4068
|
beforeFetch(t) {
|
|
3991
4069
|
return new Promise((e, r) => {
|
|
3992
|
-
const n = t && t.beforeFetch &&
|
|
4070
|
+
const n = t && t.beforeFetch && V(() => t.beforeFetch(t, { api: this.api }));
|
|
3993
4071
|
n && m.Function(n.then) ? n.then(e).catch(r) : n === !1 ? r() : e();
|
|
3994
4072
|
}).then(() => this.globalBeforeFetch(t));
|
|
3995
4073
|
},
|
|
3996
4074
|
beforeSubmit(t) {
|
|
3997
4075
|
return new Promise((e, r) => {
|
|
3998
|
-
const n = this.options.beforeSubmit &&
|
|
4076
|
+
const n = this.options.beforeSubmit && V(() => this.options.beforeSubmit(t, { api: this.api }));
|
|
3999
4077
|
n && m.Function(n.then) ? n.then(e).catch(r) : n === !1 ? r() : e();
|
|
4000
4078
|
});
|
|
4001
4079
|
}
|
|
4002
4080
|
});
|
|
4003
|
-
|
|
4004
|
-
Yn(ne);
|
|
4005
|
-
Jn(ne);
|
|
4081
|
+
Qn(ne);
|
|
4006
4082
|
Xn(ne);
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4083
|
+
ei(ne);
|
|
4084
|
+
ri(ne);
|
|
4085
|
+
oi(ne);
|
|
4086
|
+
ci(ne);
|
|
4087
|
+
di(ne);
|
|
4088
|
+
hi(ne);
|
|
4089
|
+
const gi = "fcFragment", We = re({
|
|
4090
|
+
name: gi,
|
|
4013
4091
|
inheritAttrs: !1,
|
|
4014
4092
|
props: ["vnode"],
|
|
4015
4093
|
render() {
|
|
4016
4094
|
return this.vnode;
|
|
4017
4095
|
}
|
|
4018
4096
|
});
|
|
4019
|
-
function
|
|
4097
|
+
function yi(t) {
|
|
4020
4098
|
return Object.keys(t).map((e) => {
|
|
4021
|
-
const r = t[e], n =
|
|
4099
|
+
const r = t[e], n = Pr(e);
|
|
4022
4100
|
if (n)
|
|
4023
4101
|
return [
|
|
4024
4102
|
n,
|
|
@@ -4028,31 +4106,31 @@ function ui(t) {
|
|
|
4028
4106
|
];
|
|
4029
4107
|
}).filter((e) => !!e);
|
|
4030
4108
|
}
|
|
4031
|
-
function
|
|
4109
|
+
function It(t, e) {
|
|
4032
4110
|
let r = t.directives;
|
|
4033
|
-
return r ? (Array.isArray(r) || (r = [r]),
|
|
4111
|
+
return r ? (Array.isArray(r) || (r = [r]), Ir(e, r.reduce((n, s) => n.concat(yi(s)), []))) : e;
|
|
4034
4112
|
}
|
|
4035
|
-
function
|
|
4113
|
+
function bi() {
|
|
4036
4114
|
const t = {};
|
|
4037
4115
|
function e(r) {
|
|
4038
4116
|
this.vm = r.vm, this.handle = r;
|
|
4039
4117
|
}
|
|
4040
4118
|
return w(e.prototype, {
|
|
4041
4119
|
make(r, n, s) {
|
|
4042
|
-
return
|
|
4120
|
+
return It(n, this.h(r, St(n), s));
|
|
4043
4121
|
},
|
|
4044
4122
|
makeComponent(r, n, s) {
|
|
4045
4123
|
try {
|
|
4046
|
-
return
|
|
4124
|
+
return It(n, v(r, St(n), s));
|
|
4047
4125
|
} catch (i) {
|
|
4048
4126
|
return console.error(i), v("");
|
|
4049
4127
|
}
|
|
4050
4128
|
},
|
|
4051
4129
|
h(r, n, s) {
|
|
4052
|
-
const o = (this.vm ||
|
|
4130
|
+
const o = (this.vm || tt()).appContext.config.isNativeTag(r), a = this.handle.fc.prop.components[r];
|
|
4053
4131
|
!a && o && delete n.formCreateInject;
|
|
4054
4132
|
try {
|
|
4055
|
-
return v(a || (o ? r :
|
|
4133
|
+
return v(a || (o ? r : O(r)), n, s);
|
|
4056
4134
|
} catch (l) {
|
|
4057
4135
|
return console.error(l), v("");
|
|
4058
4136
|
}
|
|
@@ -4065,7 +4143,7 @@ function fi() {
|
|
|
4065
4143
|
},
|
|
4066
4144
|
use(r) {
|
|
4067
4145
|
Object.keys(r).forEach((n) => {
|
|
4068
|
-
const s =
|
|
4146
|
+
const s = ke(n), i = qt(n).toLocaleLowerCase(), o = r[n];
|
|
4069
4147
|
e.alias(n, o), [n, s, i].forEach((a) => {
|
|
4070
4148
|
e.prototype[a] = function(l, u) {
|
|
4071
4149
|
return this.make(t[n] || a, l, u);
|
|
@@ -4075,12 +4153,12 @@ function fi() {
|
|
|
4075
4153
|
}
|
|
4076
4154
|
}), e;
|
|
4077
4155
|
}
|
|
4078
|
-
function
|
|
4079
|
-
class e extends
|
|
4156
|
+
function $i(t) {
|
|
4157
|
+
class e extends or {
|
|
4080
4158
|
}
|
|
4081
4159
|
return Object.assign(e.prototype, t), e;
|
|
4082
4160
|
}
|
|
4083
|
-
function
|
|
4161
|
+
function or(t) {
|
|
4084
4162
|
w(this, {
|
|
4085
4163
|
$handle: t,
|
|
4086
4164
|
vm: t.vm,
|
|
@@ -4091,12 +4169,12 @@ function rr(t) {
|
|
|
4091
4169
|
}
|
|
4092
4170
|
}), this.updateKey(), this.init();
|
|
4093
4171
|
}
|
|
4094
|
-
w(
|
|
4172
|
+
w(or.prototype, {
|
|
4095
4173
|
__init() {
|
|
4096
4174
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
4097
4175
|
},
|
|
4098
4176
|
updateKey() {
|
|
4099
|
-
this.key =
|
|
4177
|
+
this.key = He();
|
|
4100
4178
|
},
|
|
4101
4179
|
//TODO interface
|
|
4102
4180
|
init() {
|
|
@@ -4141,26 +4219,26 @@ w(rr.prototype, {
|
|
|
4141
4219
|
render(t) {
|
|
4142
4220
|
}
|
|
4143
4221
|
});
|
|
4144
|
-
const
|
|
4222
|
+
const vi = function(t) {
|
|
4145
4223
|
const e = {
|
|
4146
4224
|
name: "loadData",
|
|
4147
4225
|
_fn: [],
|
|
4148
4226
|
loaded(r, n, s) {
|
|
4149
4227
|
this.deleted(r), I(() => {
|
|
4150
|
-
let i =
|
|
4228
|
+
let i = q(r.getValue());
|
|
4151
4229
|
const o = [];
|
|
4152
4230
|
i.forEach((a) => {
|
|
4153
|
-
if (a && (a.attr || a.template)) {
|
|
4154
|
-
let l = (
|
|
4231
|
+
if (a && (a.attr || a.template || a.handler)) {
|
|
4232
|
+
let l = (c) => {
|
|
4155
4233
|
let h;
|
|
4156
4234
|
n && n.__fc__ && (h = n.__fc__.getParentGroup());
|
|
4157
4235
|
let p;
|
|
4158
|
-
a.template ? p = t.$handle.loadStrVar(a.template,
|
|
4159
|
-
const
|
|
4160
|
-
a.to === "child" ?
|
|
4161
|
-
}, u = (
|
|
4236
|
+
a.template ? p = t.$handle.loadStrVar(a.template, c, h ? { rule: n, value: t.$handle.subRuleData[h.id] || {} } : null) : a.handler && m.Function(a.handler) ? p = a.handler(c, n, s) : p = t.$handle.loadStrVar(`{{${a.attr}}}`, c, h ? { rule: n, value: t.$handle.subRuleData[h.id] || {} } : null), (p == null || p === "") && a.default != null && (p = a.default), a.copy !== !1 && (p = ee(p));
|
|
4237
|
+
const y = a.modify ? n : r.getProp();
|
|
4238
|
+
a.to === "child" ? y.children ? y.children[0] = p : y.children = [p] : he(y, a.to || "options", p), s.sync(n);
|
|
4239
|
+
}, u = (c) => l(c);
|
|
4162
4240
|
const f = t.watchLoadData(u);
|
|
4163
|
-
l =
|
|
4241
|
+
l = ce(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
4164
4242
|
}
|
|
4165
4243
|
}), this._fn[r.id] = o;
|
|
4166
4244
|
});
|
|
@@ -4172,7 +4250,7 @@ const di = function(t) {
|
|
|
4172
4250
|
}
|
|
4173
4251
|
};
|
|
4174
4252
|
return e.watch = e.loaded, e;
|
|
4175
|
-
},
|
|
4253
|
+
}, _i = function(t) {
|
|
4176
4254
|
const e = {
|
|
4177
4255
|
name: "t",
|
|
4178
4256
|
_fn: [],
|
|
@@ -4185,12 +4263,12 @@ const di = function(t) {
|
|
|
4185
4263
|
if (l) {
|
|
4186
4264
|
const u = typeof l == "object";
|
|
4187
4265
|
let f = (p) => {
|
|
4188
|
-
let
|
|
4266
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, p);
|
|
4189
4267
|
const C = u && l.modify ? n : r.getProp();
|
|
4190
|
-
a === "child" ? C.children ? C.children[0] =
|
|
4191
|
-
},
|
|
4192
|
-
const h = t.watchLoadData(
|
|
4193
|
-
f =
|
|
4268
|
+
a === "child" ? C.children ? C.children[0] = y : C.children = [y] : he(C, a, y), s.sync(n);
|
|
4269
|
+
}, c = (p) => f(p);
|
|
4270
|
+
const h = t.watchLoadData(c);
|
|
4271
|
+
f = ce(f, l.wait || 300), l.watch !== !1 ? o.push(h) : h();
|
|
4194
4272
|
}
|
|
4195
4273
|
}), this._fn[r.id] = o;
|
|
4196
4274
|
},
|
|
@@ -4201,7 +4279,7 @@ const di = function(t) {
|
|
|
4201
4279
|
}
|
|
4202
4280
|
};
|
|
4203
4281
|
return e.watch = e.loaded, e;
|
|
4204
|
-
},
|
|
4282
|
+
}, ar = {
|
|
4205
4283
|
name: "componentValidate",
|
|
4206
4284
|
load(t, e, r) {
|
|
4207
4285
|
let n = t.getValue();
|
|
@@ -4209,9 +4287,9 @@ const di = function(t) {
|
|
|
4209
4287
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
4210
4288
|
else {
|
|
4211
4289
|
m.Object(n) || (n = { method: n });
|
|
4212
|
-
const s = n.method, i =
|
|
4290
|
+
const s = n.method, i = z(_({}, n), {
|
|
4213
4291
|
validator(...o) {
|
|
4214
|
-
const a =
|
|
4292
|
+
const a = Q(e);
|
|
4215
4293
|
if (a)
|
|
4216
4294
|
return r.exec(a.id, m.String(s) ? s : "formCreateValidate", ...o, {
|
|
4217
4295
|
attr: t,
|
|
@@ -4224,9 +4302,9 @@ const di = function(t) {
|
|
|
4224
4302
|
}
|
|
4225
4303
|
},
|
|
4226
4304
|
watch(...t) {
|
|
4227
|
-
|
|
4305
|
+
ar.load(...t);
|
|
4228
4306
|
}
|
|
4229
|
-
},
|
|
4307
|
+
}, wi = function(t) {
|
|
4230
4308
|
function e(s) {
|
|
4231
4309
|
return m.String(s) && (s = {
|
|
4232
4310
|
action: s,
|
|
@@ -4236,8 +4314,8 @@ const di = function(t) {
|
|
|
4236
4314
|
function r(s, i, o) {
|
|
4237
4315
|
let a = s.value;
|
|
4238
4316
|
n.deleted(s), m.Function(a) && (a = a(i, o)), a = e(a);
|
|
4239
|
-
const l = (
|
|
4240
|
-
|
|
4317
|
+
const l = (c) => {
|
|
4318
|
+
c === void 0 ? s.clearProp() : he(s.getProp(), a.to || "options", c), c != null && a && a.key && t.$handle.options.globalData[a.key] && t.fetchCache.set(t.$handle.options.globalData[a.key], { status: !0, data: c }), o.sync(i);
|
|
4241
4319
|
};
|
|
4242
4320
|
if (!a || !a.action && !a.key) {
|
|
4243
4321
|
l(void 0);
|
|
@@ -4248,43 +4326,43 @@ const di = function(t) {
|
|
|
4248
4326
|
if (!s.getValue())
|
|
4249
4327
|
return s.clearProp(), o.sync(i), !0;
|
|
4250
4328
|
};
|
|
4251
|
-
n._fn[s.id] = t.watchLoadData(
|
|
4329
|
+
n._fn[s.id] = t.watchLoadData(ce((c, h) => {
|
|
4252
4330
|
if (h && a.watch === !1)
|
|
4253
4331
|
return n._fn[s.id]();
|
|
4254
4332
|
if (a.key) {
|
|
4255
4333
|
t.targetRule = i;
|
|
4256
|
-
const C =
|
|
4334
|
+
const C = c("$globalData." + a.key);
|
|
4257
4335
|
if (delete t.targetRule, C) {
|
|
4258
4336
|
if (f()) return;
|
|
4259
4337
|
l(C);
|
|
4260
4338
|
}
|
|
4261
4339
|
return;
|
|
4262
4340
|
}
|
|
4263
|
-
const p = t.$handle.loadFetchVar(ee(a),
|
|
4341
|
+
const p = t.$handle.loadFetchVar(ee(a), c, i), y = z(_({
|
|
4264
4342
|
headers: {}
|
|
4265
4343
|
}, p), {
|
|
4266
|
-
onSuccess(C,
|
|
4344
|
+
onSuccess(C, F) {
|
|
4267
4345
|
if (f()) return;
|
|
4268
|
-
let
|
|
4269
|
-
const
|
|
4270
|
-
m.Function(
|
|
4271
|
-
l(
|
|
4346
|
+
let G = (N) => F ? N : D(N, "data") ? N.data : N;
|
|
4347
|
+
const P = te(p.parse);
|
|
4348
|
+
m.Function(P) ? G = P : P && m.String(P) && (G = (N) => M(N, P)), qe(G(C, i, o)).then((N) => {
|
|
4349
|
+
l(N);
|
|
4272
4350
|
});
|
|
4273
4351
|
},
|
|
4274
4352
|
onError(C) {
|
|
4275
|
-
l(void 0), !f() && (u || ((
|
|
4353
|
+
l(void 0), !f() && (u || ((F) => lt(F.message || "fetch fail " + p.action)))(C, i, o);
|
|
4276
4354
|
}
|
|
4277
4355
|
});
|
|
4278
|
-
t.$handle.beforeFetch(
|
|
4356
|
+
t.$handle.beforeFetch(y, { rule: i, api: o }).then(() => {
|
|
4279
4357
|
if (m.Function(p.action)) {
|
|
4280
|
-
|
|
4281
|
-
|
|
4358
|
+
qe(p.action(i, o)).then((C) => {
|
|
4359
|
+
y.onSuccess(C, !0);
|
|
4282
4360
|
}).catch((C) => {
|
|
4283
|
-
|
|
4361
|
+
y.onError(C);
|
|
4284
4362
|
});
|
|
4285
4363
|
return;
|
|
4286
4364
|
}
|
|
4287
|
-
|
|
4365
|
+
V(() => t.create.fetch(y, { inject: s, rule: i, api: o }));
|
|
4288
4366
|
}).catch((C) => {
|
|
4289
4367
|
});
|
|
4290
4368
|
}, a.wait || 600));
|
|
@@ -4303,13 +4381,13 @@ const di = function(t) {
|
|
|
4303
4381
|
}
|
|
4304
4382
|
};
|
|
4305
4383
|
return n;
|
|
4306
|
-
},
|
|
4307
|
-
fetch:
|
|
4308
|
-
loadData:
|
|
4309
|
-
t:
|
|
4310
|
-
componentValidate:
|
|
4311
|
-
},
|
|
4312
|
-
name:
|
|
4384
|
+
}, Ci = {
|
|
4385
|
+
fetch: wi,
|
|
4386
|
+
loadData: vi,
|
|
4387
|
+
t: _i,
|
|
4388
|
+
componentValidate: ar
|
|
4389
|
+
}, Si = "html", Vi = {
|
|
4390
|
+
name: Si,
|
|
4313
4391
|
loadChildren: !1,
|
|
4314
4392
|
render(t, e) {
|
|
4315
4393
|
return e.prop.props.innerHTML = t.default(), e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4320,7 +4398,7 @@ const di = function(t) {
|
|
|
4320
4398
|
};
|
|
4321
4399
|
}
|
|
4322
4400
|
};
|
|
4323
|
-
function
|
|
4401
|
+
function Fi(t) {
|
|
4324
4402
|
t = t + "=";
|
|
4325
4403
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4326
4404
|
for (let n = 0; n < r.length; n++) {
|
|
@@ -4338,7 +4416,7 @@ function bi(t) {
|
|
|
4338
4416
|
}
|
|
4339
4417
|
return null;
|
|
4340
4418
|
}
|
|
4341
|
-
function
|
|
4419
|
+
function Oi(t) {
|
|
4342
4420
|
const e = localStorage.getItem(t);
|
|
4343
4421
|
if (e)
|
|
4344
4422
|
try {
|
|
@@ -4348,7 +4426,7 @@ function $i(t) {
|
|
|
4348
4426
|
}
|
|
4349
4427
|
return null;
|
|
4350
4428
|
}
|
|
4351
|
-
function
|
|
4429
|
+
function Ei(t) {
|
|
4352
4430
|
const e = sessionStorage.getItem(t);
|
|
4353
4431
|
if (e)
|
|
4354
4432
|
try {
|
|
@@ -4358,23 +4436,23 @@ function vi(t) {
|
|
|
4358
4436
|
}
|
|
4359
4437
|
return null;
|
|
4360
4438
|
}
|
|
4361
|
-
function
|
|
4439
|
+
function ht(t, e) {
|
|
4362
4440
|
if (!e)
|
|
4363
4441
|
return null;
|
|
4364
4442
|
const r = e.split(".");
|
|
4365
4443
|
let n = t(r.shift());
|
|
4366
|
-
return r.length ? n == null ? null :
|
|
4444
|
+
return r.length ? n == null ? null : M(n, r) : n;
|
|
4367
4445
|
}
|
|
4368
|
-
function
|
|
4369
|
-
return
|
|
4446
|
+
function Ri(t) {
|
|
4447
|
+
return ht(Fi, t);
|
|
4370
4448
|
}
|
|
4371
|
-
function
|
|
4372
|
-
return
|
|
4449
|
+
function ki(t) {
|
|
4450
|
+
return ht(Oi, t);
|
|
4373
4451
|
}
|
|
4374
|
-
function
|
|
4375
|
-
return
|
|
4452
|
+
function Di(t) {
|
|
4453
|
+
return ht(Ei, t);
|
|
4376
4454
|
}
|
|
4377
|
-
const
|
|
4455
|
+
const Ai = {
|
|
4378
4456
|
en: {
|
|
4379
4457
|
required: "{title} is required",
|
|
4380
4458
|
validate: {
|
|
@@ -4424,109 +4502,109 @@ const Vi = {
|
|
|
4424
4502
|
}
|
|
4425
4503
|
}
|
|
4426
4504
|
};
|
|
4427
|
-
function
|
|
4505
|
+
function ji(t, e) {
|
|
4428
4506
|
let r;
|
|
4429
4507
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4430
4508
|
}
|
|
4431
|
-
function
|
|
4432
|
-
return
|
|
4509
|
+
function Je() {
|
|
4510
|
+
return ji("name", ...arguments);
|
|
4433
4511
|
}
|
|
4434
|
-
function
|
|
4512
|
+
function Ii(t) {
|
|
4435
4513
|
const e = t.key || [], r = t.array || [], n = t.normal || [];
|
|
4436
|
-
|
|
4514
|
+
Wt.push(...e), ut.push(...r), ft.push(...n), nr([...e, ...r, ...n]);
|
|
4437
4515
|
}
|
|
4438
|
-
let
|
|
4439
|
-
const
|
|
4440
|
-
function
|
|
4516
|
+
let Pi = 1;
|
|
4517
|
+
const Y = {}, Pt = Symbol("defValue");
|
|
4518
|
+
function lr(t) {
|
|
4441
4519
|
const e = {
|
|
4442
|
-
[
|
|
4520
|
+
[We.name]: We
|
|
4443
4521
|
}, r = {}, n = {}, s = {}, i = {}, o = [], a = [], l = [
|
|
4444
4522
|
t.extendApi
|
|
4445
|
-
], u = _({},
|
|
4446
|
-
let
|
|
4447
|
-
const h = t.isMobile === !0, p =
|
|
4523
|
+
], u = _({}, Ci), f = xn();
|
|
4524
|
+
let c = { global: {} };
|
|
4525
|
+
const h = t.isMobile === !0, p = Z({
|
|
4448
4526
|
$mobile: h
|
|
4449
|
-
}),
|
|
4450
|
-
|
|
4451
|
-
function
|
|
4452
|
-
const g =
|
|
4527
|
+
}), y = bi(), C = {}, F = {};
|
|
4528
|
+
Ii(t.attrs || {});
|
|
4529
|
+
function G(d) {
|
|
4530
|
+
const g = Y[d];
|
|
4453
4531
|
if (Array.isArray(g))
|
|
4454
|
-
return g.map((
|
|
4532
|
+
return g.map((b) => b.api());
|
|
4455
4533
|
if (g)
|
|
4456
4534
|
return g.api();
|
|
4457
4535
|
}
|
|
4458
|
-
function
|
|
4459
|
-
o.push(
|
|
4536
|
+
function P(d) {
|
|
4537
|
+
o.push(d);
|
|
4460
4538
|
}
|
|
4461
|
-
function
|
|
4462
|
-
const
|
|
4463
|
-
|
|
4539
|
+
function N() {
|
|
4540
|
+
const d = Je(...arguments);
|
|
4541
|
+
d.id && d.prop && (n[d.id] = d.prop);
|
|
4464
4542
|
}
|
|
4465
|
-
function
|
|
4466
|
-
const
|
|
4467
|
-
|
|
4468
|
-
name:
|
|
4543
|
+
function Se() {
|
|
4544
|
+
const d = Je(...arguments);
|
|
4545
|
+
d.id && d.prop && (u[d.id] = m.Function(d.prop) ? d.prop : z(_({}, d.prop), {
|
|
4546
|
+
name: d.id
|
|
4469
4547
|
}));
|
|
4470
4548
|
}
|
|
4471
|
-
function
|
|
4472
|
-
|
|
4549
|
+
function ze(d) {
|
|
4550
|
+
y.use(d);
|
|
4473
4551
|
}
|
|
4474
|
-
function
|
|
4552
|
+
function Ve(d) {
|
|
4475
4553
|
if (arguments.length === 0)
|
|
4476
|
-
return
|
|
4477
|
-
if (typeof
|
|
4478
|
-
return r[
|
|
4479
|
-
const g =
|
|
4480
|
-
if (!g.id || !g.prop) return
|
|
4481
|
-
const
|
|
4482
|
-
r[
|
|
4554
|
+
return Re;
|
|
4555
|
+
if (typeof d == "string" && arguments.length === 1)
|
|
4556
|
+
return r[H(d)];
|
|
4557
|
+
const g = Je(...arguments);
|
|
4558
|
+
if (!g.id || !g.prop) return Re;
|
|
4559
|
+
const b = H(g.id), $ = g.prop, S = $.merge === !0 ? r[b] : void 0;
|
|
4560
|
+
r[b] = Me($, S || Re), f[b] = T(b), $.maker && w(f, $.maker);
|
|
4483
4561
|
}
|
|
4484
|
-
function
|
|
4485
|
-
let
|
|
4486
|
-
if (m.String(
|
|
4487
|
-
if (
|
|
4488
|
-
return e[
|
|
4562
|
+
function R(d, g) {
|
|
4563
|
+
let b;
|
|
4564
|
+
if (m.String(d)) {
|
|
4565
|
+
if (b = d, g === void 0)
|
|
4566
|
+
return e[b];
|
|
4489
4567
|
} else
|
|
4490
|
-
|
|
4491
|
-
if (!
|
|
4492
|
-
const
|
|
4493
|
-
e[
|
|
4568
|
+
b = d.displayName || d.name, g = d;
|
|
4569
|
+
if (!b || !g) return;
|
|
4570
|
+
const $ = H(b);
|
|
4571
|
+
e[b] = g, e[$] = g, delete y.aliasMap[b], delete y.aliasMap[$], delete r[b], delete r[$], g.formCreateParser && Ve(b, g.formCreateParser);
|
|
4494
4572
|
}
|
|
4495
|
-
function
|
|
4496
|
-
return
|
|
4573
|
+
function j() {
|
|
4574
|
+
return qn(Ge, e, n);
|
|
4497
4575
|
}
|
|
4498
|
-
function
|
|
4499
|
-
const
|
|
4500
|
-
return
|
|
4576
|
+
function W(d, g) {
|
|
4577
|
+
const b = j();
|
|
4578
|
+
return Br({
|
|
4501
4579
|
data() {
|
|
4502
|
-
return
|
|
4503
|
-
rule:
|
|
4580
|
+
return Z({
|
|
4581
|
+
rule: d,
|
|
4504
4582
|
option: g
|
|
4505
4583
|
});
|
|
4506
4584
|
},
|
|
4507
4585
|
render() {
|
|
4508
|
-
return
|
|
4586
|
+
return Tr(b, _({ ref: "fc" }, this.$data));
|
|
4509
4587
|
}
|
|
4510
4588
|
});
|
|
4511
4589
|
}
|
|
4512
|
-
function
|
|
4513
|
-
return
|
|
4590
|
+
function Fe() {
|
|
4591
|
+
return We;
|
|
4514
4592
|
}
|
|
4515
|
-
function
|
|
4516
|
-
return m.Function(
|
|
4593
|
+
function je(d, g) {
|
|
4594
|
+
return m.Function(d.install) ? d.install(le, g) : m.Function(d) && d(le, g), this;
|
|
4517
4595
|
}
|
|
4518
|
-
function le(
|
|
4519
|
-
let
|
|
4520
|
-
o.forEach((
|
|
4521
|
-
|
|
4596
|
+
function le(d, g) {
|
|
4597
|
+
let b = W(d, g || {});
|
|
4598
|
+
o.forEach((A) => {
|
|
4599
|
+
V(() => A(le, b));
|
|
4522
4600
|
});
|
|
4523
|
-
const
|
|
4524
|
-
return ((g == null ? void 0 : g.el) || document.body).appendChild(
|
|
4601
|
+
const $ = document.createElement("div");
|
|
4602
|
+
return ((g == null ? void 0 : g.el) || document.body).appendChild($), b.mount($).$refs.fc.fapi;
|
|
4525
4603
|
}
|
|
4526
|
-
|
|
4527
|
-
function
|
|
4604
|
+
Me(le, F);
|
|
4605
|
+
function cr(d) {
|
|
4528
4606
|
let g = _({}, t);
|
|
4529
|
-
return
|
|
4607
|
+
return d ? g.inherit = {
|
|
4530
4608
|
components: e,
|
|
4531
4609
|
parsers: r,
|
|
4532
4610
|
directives: n,
|
|
@@ -4536,67 +4614,67 @@ function ir(t) {
|
|
|
4536
4614
|
maker: f,
|
|
4537
4615
|
formulas: C,
|
|
4538
4616
|
loadData: p
|
|
4539
|
-
} : delete g.inherit,
|
|
4617
|
+
} : delete g.inherit, lr(g);
|
|
4540
4618
|
}
|
|
4541
|
-
function
|
|
4542
|
-
s[
|
|
4619
|
+
function dr(d, g) {
|
|
4620
|
+
s[d] = g;
|
|
4543
4621
|
}
|
|
4544
|
-
function
|
|
4545
|
-
C[
|
|
4622
|
+
function hr(d, g) {
|
|
4623
|
+
C[d] = g;
|
|
4546
4624
|
}
|
|
4547
|
-
function
|
|
4548
|
-
const
|
|
4549
|
-
g.parsers && Object.keys(g.parsers).forEach((
|
|
4550
|
-
|
|
4551
|
-
}), g.name =
|
|
4625
|
+
function pr(d, g) {
|
|
4626
|
+
const b = i[d] || {}, $ = b.parsers || {};
|
|
4627
|
+
g.parsers && Object.keys(g.parsers).forEach((S) => {
|
|
4628
|
+
$[S] = Me(g.parsers[S], Re);
|
|
4629
|
+
}), g.name = d, i[d] = z(_(_({}, b), g), { parsers: $ });
|
|
4552
4630
|
}
|
|
4553
|
-
function
|
|
4554
|
-
|
|
4555
|
-
(Array.isArray(
|
|
4556
|
-
|
|
4631
|
+
function Ie(d) {
|
|
4632
|
+
d && Object.keys(Y).forEach((g) => {
|
|
4633
|
+
(Array.isArray(Y[g]) ? Y[g] : [Y[g]]).forEach(($) => {
|
|
4634
|
+
$.bus.$emit("$loadData." + d);
|
|
4557
4635
|
});
|
|
4558
4636
|
});
|
|
4559
4637
|
}
|
|
4560
|
-
function
|
|
4561
|
-
|
|
4638
|
+
function xe(d, g) {
|
|
4639
|
+
he(p, d, g), Ie(d);
|
|
4562
4640
|
}
|
|
4563
|
-
function
|
|
4564
|
-
const
|
|
4565
|
-
|
|
4641
|
+
function Pe(d, g) {
|
|
4642
|
+
const b = (...$) => V(() => g(...$));
|
|
4643
|
+
b._driver = !0, xe(d, b);
|
|
4566
4644
|
}
|
|
4567
|
-
function
|
|
4568
|
-
const
|
|
4569
|
-
|
|
4570
|
-
const
|
|
4571
|
-
if (D(p,
|
|
4572
|
-
let
|
|
4573
|
-
return
|
|
4645
|
+
function pt(d, g) {
|
|
4646
|
+
const b = (d || "").split(".");
|
|
4647
|
+
d = b.shift();
|
|
4648
|
+
const $ = b.join(".");
|
|
4649
|
+
if (D(p, d) || (p[d] = Pt), p[d] !== Pt) {
|
|
4650
|
+
let S = p[d];
|
|
4651
|
+
return S && S._driver ? S = S($) : b.length && (S = M(S, b)), S == null || S === "" ? g : S;
|
|
4574
4652
|
} else
|
|
4575
4653
|
return g;
|
|
4576
4654
|
}
|
|
4577
|
-
function
|
|
4578
|
-
l.push(
|
|
4655
|
+
function mr(d) {
|
|
4656
|
+
l.push(d);
|
|
4579
4657
|
}
|
|
4580
|
-
function
|
|
4581
|
-
delete p[
|
|
4658
|
+
function gr(d) {
|
|
4659
|
+
delete p[d], Ie(d);
|
|
4582
4660
|
}
|
|
4583
|
-
function
|
|
4584
|
-
a.push({ name:
|
|
4661
|
+
function yr(d, g) {
|
|
4662
|
+
a.push({ name: d, callback: g });
|
|
4585
4663
|
}
|
|
4586
|
-
function
|
|
4664
|
+
function Ge(d) {
|
|
4587
4665
|
w(this, {
|
|
4588
|
-
id:
|
|
4666
|
+
id: Pi++,
|
|
4589
4667
|
create: le,
|
|
4590
|
-
vm:
|
|
4591
|
-
manager:
|
|
4668
|
+
vm: d,
|
|
4669
|
+
manager: $i(t.manager),
|
|
4592
4670
|
parsers: r,
|
|
4593
4671
|
providers: u,
|
|
4594
4672
|
modelFields: s,
|
|
4595
4673
|
formulas: C,
|
|
4596
4674
|
isMobile: h,
|
|
4597
|
-
rules:
|
|
4598
|
-
name:
|
|
4599
|
-
inFor:
|
|
4675
|
+
rules: d.props.rule,
|
|
4676
|
+
name: d.props.name || He(),
|
|
4677
|
+
inFor: d.props.inFor,
|
|
4600
4678
|
prop: {
|
|
4601
4679
|
components: e,
|
|
4602
4680
|
directives: n
|
|
@@ -4604,192 +4682,193 @@ function ir(t) {
|
|
|
4604
4682
|
get: null,
|
|
4605
4683
|
drivers: i,
|
|
4606
4684
|
renderDriver: null,
|
|
4607
|
-
refreshData:
|
|
4685
|
+
refreshData: Ie,
|
|
4608
4686
|
loadData: p,
|
|
4609
|
-
CreateNode:
|
|
4610
|
-
bus: new
|
|
4611
|
-
|
|
4612
|
-
|
|
4687
|
+
CreateNode: y,
|
|
4688
|
+
bus: new Ut(),
|
|
4689
|
+
//使用 Set 保存,停止侦听时可以自行摘除,避免长期运行下无限堆积
|
|
4690
|
+
unwatch: /* @__PURE__ */ new Set(),
|
|
4691
|
+
options: ot({}),
|
|
4613
4692
|
extendApiFn: l,
|
|
4614
4693
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4615
|
-
tmpData:
|
|
4616
|
-
}), a.forEach((g) => {
|
|
4694
|
+
tmpData: Z({})
|
|
4695
|
+
}), this.unwatch.push = this.unwatch.add, a.forEach((g) => {
|
|
4617
4696
|
this.bus.$on(g.name, g.callback);
|
|
4618
4697
|
}), I(() => {
|
|
4619
|
-
|
|
4698
|
+
B(this.options, () => {
|
|
4620
4699
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4621
4700
|
}, { deep: !0 });
|
|
4622
|
-
}), w(
|
|
4701
|
+
}), w(d.appContext.components, e), w(d.appContext.directives, n), this.$handle = new ne(this), this.name && (this.inFor ? (Y[this.name] || (Y[this.name] = []), Y[this.name].push(this)) : Y[this.name] = this);
|
|
4623
4702
|
}
|
|
4624
|
-
|
|
4703
|
+
Ge.isMobile = h, w(Ge.prototype, {
|
|
4625
4704
|
init() {
|
|
4626
|
-
this.isSub() && this.unwatch.
|
|
4705
|
+
this.isSub() && this.unwatch.add(B(() => this.vm.setupState.parent.setupState.fc.options.value, () => {
|
|
4627
4706
|
this.initOptions(), this.$handle.api.refresh();
|
|
4628
4707
|
}, { deep: !0, flush: "sync" })), this.vm.props.driver && (this.renderDriver = typeof this.vm.props.driver == "object" ? this.vm.props.driver : this.drivers[this.vm.props.driver]), !this.renderDriver && this.vm.setupState.parent && (this.renderDriver = this.vm.setupState.parent.setupState.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4629
4708
|
},
|
|
4630
|
-
targetFormDriver(
|
|
4631
|
-
if (this.bus.$emit(
|
|
4632
|
-
return
|
|
4633
|
-
},
|
|
4634
|
-
t(
|
|
4635
|
-
let
|
|
4636
|
-
return
|
|
4637
|
-
const
|
|
4638
|
-
|
|
4639
|
-
}),
|
|
4640
|
-
},
|
|
4641
|
-
globalDataDriver(
|
|
4642
|
-
let g =
|
|
4643
|
-
const
|
|
4644
|
-
if (
|
|
4645
|
-
if (
|
|
4646
|
-
return
|
|
4709
|
+
targetFormDriver(d, ...g) {
|
|
4710
|
+
if (this.bus.$emit(d, ...g), this.renderDriver && this.renderDriver[d])
|
|
4711
|
+
return V(() => this.renderDriver[d](...g));
|
|
4712
|
+
},
|
|
4713
|
+
t(d, g, b) {
|
|
4714
|
+
let $ = b ? b("$t." + d) : this.globalLanguageDriver(d);
|
|
4715
|
+
return $ == null && ($ = ""), $ && g && Object.keys(g).forEach((S) => {
|
|
4716
|
+
const A = new RegExp(`{${S}}`, "g");
|
|
4717
|
+
$ = $.replace(A, g[S]);
|
|
4718
|
+
}), $;
|
|
4719
|
+
},
|
|
4720
|
+
globalDataDriver(d) {
|
|
4721
|
+
let g = d.split(".");
|
|
4722
|
+
const b = g.shift(), $ = this.options.value.globalData && this.options.value.globalData[b];
|
|
4723
|
+
if ($) {
|
|
4724
|
+
if ($.type === "static")
|
|
4725
|
+
return M($.data, g);
|
|
4647
4726
|
{
|
|
4648
|
-
let
|
|
4649
|
-
const
|
|
4650
|
-
if (
|
|
4651
|
-
if (
|
|
4652
|
-
return
|
|
4653
|
-
|
|
4727
|
+
let S;
|
|
4728
|
+
const A = this.fetchCache.get($);
|
|
4729
|
+
if (A) {
|
|
4730
|
+
if (A.status && (S = M(A.data, g)), !A.loading)
|
|
4731
|
+
return S;
|
|
4732
|
+
A.loading = !1, this.fetchCache.set($, A);
|
|
4654
4733
|
} else
|
|
4655
|
-
this.fetchCache.set(
|
|
4656
|
-
const k =
|
|
4657
|
-
|
|
4658
|
-
const
|
|
4659
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(
|
|
4660
|
-
},
|
|
4661
|
-
this.fetchCache.set(
|
|
4662
|
-
},
|
|
4663
|
-
if ($e &&
|
|
4664
|
-
return
|
|
4734
|
+
this.fetchCache.set($, { status: !1 });
|
|
4735
|
+
const k = ce(() => {
|
|
4736
|
+
be();
|
|
4737
|
+
const J = this.fetchCache.get($);
|
|
4738
|
+
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (J && (J.loading = !0, this.fetchCache.set($, J)), this.bus.$emit("$loadData.$globalData." + b)) : this.fetchCache.delete($);
|
|
4739
|
+
}, $.wait || 600), ge = (J) => {
|
|
4740
|
+
this.fetchCache.set($, { status: !0, data: J }), this.bus.$emit("$loadData.$globalData." + b);
|
|
4741
|
+
}, ye = (J, $e) => {
|
|
4742
|
+
if ($e && $.watch === !1)
|
|
4743
|
+
return be();
|
|
4665
4744
|
if ($e) {
|
|
4666
4745
|
k();
|
|
4667
4746
|
return;
|
|
4668
4747
|
}
|
|
4669
|
-
const ve = this.$handle.loadFetchVar(
|
|
4670
|
-
ve.targetRule = this.targetRule, this.$handle.api.fetch(ve).then((
|
|
4671
|
-
|
|
4672
|
-
}).catch((
|
|
4673
|
-
|
|
4748
|
+
const ve = this.$handle.loadFetchVar(rt($), J);
|
|
4749
|
+
ve.targetRule = this.targetRule, this.$handle.api.fetch(ve).then((ue) => {
|
|
4750
|
+
ge(ue);
|
|
4751
|
+
}).catch((ue) => {
|
|
4752
|
+
ge(null);
|
|
4674
4753
|
});
|
|
4675
|
-
},
|
|
4676
|
-
return
|
|
4754
|
+
}, be = this.watchLoadData(ye);
|
|
4755
|
+
return $.watch === !1 && be(), S;
|
|
4677
4756
|
}
|
|
4678
4757
|
}
|
|
4679
4758
|
},
|
|
4680
4759
|
getLocale() {
|
|
4681
|
-
let
|
|
4682
|
-
return
|
|
4683
|
-
},
|
|
4684
|
-
globalLanguageDriver(
|
|
4685
|
-
let g = this.vm.setupState.top.props.t,
|
|
4686
|
-
if (g && (
|
|
4687
|
-
const
|
|
4688
|
-
|
|
4760
|
+
let d = this.vm.setupState.top.props.locale;
|
|
4761
|
+
return d && typeof d == "object" ? d.name : typeof d == "string" ? d : "zh-cn";
|
|
4762
|
+
},
|
|
4763
|
+
globalLanguageDriver(d) {
|
|
4764
|
+
let g = this.vm.setupState.top.props.t, b = this.vm.setupState.top.props.locale, $;
|
|
4765
|
+
if (g && ($ = V(() => g(d))), $ == null && b && typeof b == "object" && ($ = M(b, d)), $ == null) {
|
|
4766
|
+
const S = this.options.value.language || {}, A = this.getLocale();
|
|
4767
|
+
$ = M(S[A] || {}, d), $ == null && ($ = M(Ai[A] || {}, d));
|
|
4689
4768
|
}
|
|
4690
|
-
return
|
|
4691
|
-
},
|
|
4692
|
-
globalVarDriver(
|
|
4693
|
-
let g =
|
|
4694
|
-
const
|
|
4695
|
-
if (
|
|
4696
|
-
const
|
|
4697
|
-
if (
|
|
4698
|
-
let
|
|
4699
|
-
return
|
|
4769
|
+
return $;
|
|
4770
|
+
},
|
|
4771
|
+
globalVarDriver(d) {
|
|
4772
|
+
let g = d.split(".");
|
|
4773
|
+
const b = g.shift(), $ = this.options.value.globalVariable && this.options.value.globalVariable[b];
|
|
4774
|
+
if ($) {
|
|
4775
|
+
const S = m.Function($) ? $ : te($.handle);
|
|
4776
|
+
if (S) {
|
|
4777
|
+
let A = S((...k) => this.$handle.api.getData(...k), this.$handle.api);
|
|
4778
|
+
return M(A, g);
|
|
4700
4779
|
}
|
|
4701
4780
|
}
|
|
4702
4781
|
},
|
|
4703
|
-
setData(
|
|
4704
|
-
|
|
4705
|
-
},
|
|
4706
|
-
getLoadData(
|
|
4707
|
-
let
|
|
4708
|
-
if (
|
|
4709
|
-
let
|
|
4710
|
-
const
|
|
4711
|
-
if (
|
|
4712
|
-
return
|
|
4713
|
-
if (
|
|
4714
|
-
|
|
4715
|
-
else if (
|
|
4716
|
-
|
|
4717
|
-
else if (
|
|
4718
|
-
|
|
4719
|
-
else if (
|
|
4720
|
-
|
|
4721
|
-
else if (
|
|
4722
|
-
|
|
4723
|
-
else if (
|
|
4724
|
-
|
|
4725
|
-
else if (
|
|
4726
|
-
|
|
4727
|
-
else if (
|
|
4728
|
-
|
|
4782
|
+
setData(d, g, b) {
|
|
4783
|
+
b ? xe(d, g) : (he(this.vm.setupState.top.setupState.fc.tmpData, d, g), this.bus.$emit("$loadData." + d));
|
|
4784
|
+
},
|
|
4785
|
+
getLoadData(d, g) {
|
|
4786
|
+
let b = null;
|
|
4787
|
+
if (d != null) {
|
|
4788
|
+
let $ = d.split(".");
|
|
4789
|
+
const S = $.shift();
|
|
4790
|
+
if (b = M(this.vm.setupState.top.setupState.fc.tmpData, d), b != null)
|
|
4791
|
+
return b;
|
|
4792
|
+
if (S === "$topForm")
|
|
4793
|
+
b = this.$handle.api.top.formData(!0);
|
|
4794
|
+
else if (S === "$scopeForm")
|
|
4795
|
+
b = this.$handle.api.scope.formData(!0);
|
|
4796
|
+
else if (S === "$form")
|
|
4797
|
+
b = this.$handle.api.formData(!0);
|
|
4798
|
+
else if (S === "$options")
|
|
4799
|
+
b = this.options.value;
|
|
4800
|
+
else if (S === "$globalData")
|
|
4801
|
+
b = this.globalDataDriver($.join(".")), $ = [];
|
|
4802
|
+
else if (S === "$var")
|
|
4803
|
+
b = this.globalVarDriver($.join(".")), $ = [];
|
|
4804
|
+
else if (S === "$locale")
|
|
4805
|
+
b = this.getLocale(), $ = [];
|
|
4806
|
+
else if (S === "$t")
|
|
4807
|
+
b = this.globalLanguageDriver($.join(".")), $ = [];
|
|
4729
4808
|
else {
|
|
4730
|
-
if (
|
|
4809
|
+
if (S === "$preview")
|
|
4731
4810
|
return this.$handle.preview;
|
|
4732
|
-
|
|
4811
|
+
b = pt(d), $ = [];
|
|
4733
4812
|
}
|
|
4734
|
-
|
|
4813
|
+
b && $.length && (b = M(b, $));
|
|
4735
4814
|
}
|
|
4736
|
-
return
|
|
4737
|
-
},
|
|
4738
|
-
watchLoadData(
|
|
4739
|
-
let
|
|
4740
|
-
const
|
|
4741
|
-
this.get || (this.get =
|
|
4742
|
-
|
|
4743
|
-
}), this.get ===
|
|
4744
|
-
},
|
|
4745
|
-
let
|
|
4746
|
-
if (typeof k == "object" && (
|
|
4747
|
-
return
|
|
4748
|
-
const
|
|
4749
|
-
const _e =
|
|
4750
|
-
if (
|
|
4751
|
-
((_e instanceof Function || m.Object(_e) || Array.isArray(_e)) && _e ===
|
|
4815
|
+
return b == null || b === "" ? g : b;
|
|
4816
|
+
},
|
|
4817
|
+
watchLoadData(d, g) {
|
|
4818
|
+
let b = {};
|
|
4819
|
+
const $ = (k) => {
|
|
4820
|
+
this.get || (this.get = S), V(() => {
|
|
4821
|
+
d(S, k);
|
|
4822
|
+
}), this.get === S && (this.get = void 0);
|
|
4823
|
+
}, S = (k, ge) => {
|
|
4824
|
+
let ye;
|
|
4825
|
+
if (typeof k == "object" && (ye = k.getValue, k = k.id), b[k])
|
|
4826
|
+
return b[k].val;
|
|
4827
|
+
const be = se(() => ye ? ye() : this.getLoadData(k, ge)), J = k.split("."), $e = J.shift(), ve = J.shift() || "", ue = ce(() => {
|
|
4828
|
+
const _e = ye ? ye() : this.getLoadData(k, ge);
|
|
4829
|
+
if (b[k])
|
|
4830
|
+
((_e instanceof Function || m.Object(_e) || Array.isArray(_e)) && _e === b[k].val || JSON.stringify(_e) !== JSON.stringify(b[k].val)) && (b[k].val = _e, $(!0));
|
|
4752
4831
|
else return;
|
|
4753
|
-
}, g || 0),
|
|
4754
|
-
|
|
4832
|
+
}, g || 0), $r = B(be, (_e) => {
|
|
4833
|
+
ue();
|
|
4755
4834
|
});
|
|
4756
|
-
return this.bus.$on("$loadData." + $e,
|
|
4835
|
+
return this.bus.$on("$loadData." + $e, ue), ve && this.bus.$on("$loadData." + $e + "." + ve, ue), b[k] = {
|
|
4757
4836
|
fn: () => {
|
|
4758
|
-
this.bus.$off("$loadData." + $e,
|
|
4837
|
+
this.bus.$off("$loadData." + $e, ue), ve && this.bus.$off("$loadData." + $e + "." + ve, ue), $r();
|
|
4759
4838
|
},
|
|
4760
|
-
val:
|
|
4761
|
-
},
|
|
4839
|
+
val: be.value
|
|
4840
|
+
}, be.value;
|
|
4762
4841
|
};
|
|
4763
|
-
|
|
4764
|
-
const
|
|
4765
|
-
Object.keys(
|
|
4842
|
+
$(!1);
|
|
4843
|
+
const A = () => {
|
|
4844
|
+
Object.keys(b).forEach((k) => b[k].fn()), b = {}, this.unwatch.delete(A);
|
|
4766
4845
|
};
|
|
4767
|
-
return this.unwatch.
|
|
4846
|
+
return this.unwatch.add(A), A;
|
|
4768
4847
|
},
|
|
4769
4848
|
isSub() {
|
|
4770
4849
|
return this.vm.setupState.parent && this.vm.props.extendOption;
|
|
4771
4850
|
},
|
|
4772
4851
|
initOptions() {
|
|
4773
4852
|
this.options.value = {};
|
|
4774
|
-
let
|
|
4853
|
+
let d = _({
|
|
4775
4854
|
formData: {},
|
|
4776
4855
|
submitBtn: {},
|
|
4777
4856
|
resetBtn: {},
|
|
4778
4857
|
globalEvent: {},
|
|
4779
4858
|
globalData: {}
|
|
4780
|
-
}, ee(
|
|
4859
|
+
}, ee(c));
|
|
4781
4860
|
const g = this.isSub();
|
|
4782
|
-
g && (
|
|
4783
|
-
const
|
|
4784
|
-
this.targetFormDriver("initOptions",
|
|
4861
|
+
g && (d = this.mergeOptions(d, this.vm.setupState.parent.setupState.fc.options.value || {}, !0)), d = this.mergeOptions(d, this.vm.props.option);
|
|
4862
|
+
const b = this.api();
|
|
4863
|
+
this.targetFormDriver("initOptions", d, { api: b, isSubForm: g }), this.updateOptions(d);
|
|
4785
4864
|
},
|
|
4786
|
-
mergeOptions(
|
|
4787
|
-
return g = _({}, g || {}),
|
|
4788
|
-
delete g[
|
|
4789
|
-
}), g.global && (
|
|
4865
|
+
mergeOptions(d, g, b) {
|
|
4866
|
+
return g = _({}, g || {}), b && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "beforeUnmount", "beforeSubmit", "onBeforeUnmount", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach(($) => {
|
|
4867
|
+
delete g[$];
|
|
4868
|
+
}), g.global && (d.global = Mn(d.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], d), d;
|
|
4790
4869
|
},
|
|
4791
|
-
updateOptions(
|
|
4792
|
-
this.options.value = this.mergeOptions(this.options.value,
|
|
4870
|
+
updateOptions(d) {
|
|
4871
|
+
this.options.value = this.mergeOptions(this.options.value, d), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
4793
4872
|
},
|
|
4794
4873
|
api() {
|
|
4795
4874
|
return this.$handle.api;
|
|
@@ -4801,97 +4880,97 @@ function ir(t) {
|
|
|
4801
4880
|
this.$handle.mounted();
|
|
4802
4881
|
},
|
|
4803
4882
|
unmount() {
|
|
4804
|
-
if (
|
|
4883
|
+
if (V(() => this.$handle.lifecycle("beforeUnmount")), this.name)
|
|
4805
4884
|
if (this.inFor) {
|
|
4806
|
-
const
|
|
4807
|
-
|
|
4885
|
+
const d = Y[this.name].indexOf(this);
|
|
4886
|
+
Y[this.name].splice(d, 1);
|
|
4808
4887
|
} else
|
|
4809
|
-
delete
|
|
4810
|
-
a.forEach((
|
|
4811
|
-
this.bus.$off(
|
|
4812
|
-
}), this.tmpData = {}, this.unwatch.forEach((
|
|
4888
|
+
delete Y[this.name];
|
|
4889
|
+
a.forEach((d) => {
|
|
4890
|
+
this.bus.$off(d.name, d.callback);
|
|
4891
|
+
}), this.tmpData = {}, [...this.unwatch].forEach((d) => d()), this.unwatch.clear(), this.$handle.reloadRule([]);
|
|
4813
4892
|
},
|
|
4814
4893
|
updated() {
|
|
4815
4894
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4816
4895
|
}
|
|
4817
4896
|
});
|
|
4818
|
-
function
|
|
4819
|
-
w(
|
|
4897
|
+
function mt(d) {
|
|
4898
|
+
w(d, {
|
|
4820
4899
|
version: t.version,
|
|
4821
4900
|
ui: t.ui,
|
|
4822
4901
|
isMobile: h,
|
|
4823
|
-
extendApi:
|
|
4824
|
-
getData:
|
|
4825
|
-
setDataDriver:
|
|
4826
|
-
setData:
|
|
4827
|
-
removeData:
|
|
4828
|
-
refreshData:
|
|
4902
|
+
extendApi: mr,
|
|
4903
|
+
getData: pt,
|
|
4904
|
+
setDataDriver: Pe,
|
|
4905
|
+
setData: xe,
|
|
4906
|
+
removeData: gr,
|
|
4907
|
+
refreshData: Ie,
|
|
4829
4908
|
maker: f,
|
|
4830
|
-
component:
|
|
4831
|
-
directive:
|
|
4832
|
-
setModelField:
|
|
4833
|
-
setFormula:
|
|
4834
|
-
setDriver:
|
|
4835
|
-
register:
|
|
4836
|
-
$vnode:
|
|
4837
|
-
parser:
|
|
4838
|
-
use:
|
|
4839
|
-
factory:
|
|
4840
|
-
componentAlias:
|
|
4841
|
-
copyRule:
|
|
4842
|
-
copyRules:
|
|
4909
|
+
component: R,
|
|
4910
|
+
directive: N,
|
|
4911
|
+
setModelField: dr,
|
|
4912
|
+
setFormula: hr,
|
|
4913
|
+
setDriver: pr,
|
|
4914
|
+
register: Se,
|
|
4915
|
+
$vnode: Fe,
|
|
4916
|
+
parser: Ve,
|
|
4917
|
+
use: je,
|
|
4918
|
+
factory: cr,
|
|
4919
|
+
componentAlias: ze,
|
|
4920
|
+
copyRule: Xt,
|
|
4921
|
+
copyRules: Zt,
|
|
4843
4922
|
mergeRule: ae,
|
|
4844
|
-
fetch:
|
|
4845
|
-
$form:
|
|
4923
|
+
fetch: ir,
|
|
4924
|
+
$form: j,
|
|
4846
4925
|
parseFn: te,
|
|
4847
|
-
parseJson:
|
|
4848
|
-
toJson:
|
|
4849
|
-
useApp:
|
|
4850
|
-
getApi:
|
|
4851
|
-
on:
|
|
4926
|
+
parseJson: xt,
|
|
4927
|
+
toJson: De,
|
|
4928
|
+
useApp: P,
|
|
4929
|
+
getApi: G,
|
|
4930
|
+
on: yr
|
|
4852
4931
|
});
|
|
4853
4932
|
}
|
|
4854
|
-
function
|
|
4855
|
-
w(
|
|
4933
|
+
function br(d) {
|
|
4934
|
+
w(d, {
|
|
4856
4935
|
create: le,
|
|
4857
|
-
install(g,
|
|
4858
|
-
|
|
4859
|
-
const
|
|
4860
|
-
if (g[
|
|
4861
|
-
g[
|
|
4862
|
-
const
|
|
4863
|
-
return le(k,
|
|
4936
|
+
install(g, b) {
|
|
4937
|
+
c = _(_({}, c), b || {});
|
|
4938
|
+
const $ = `_installedFormCreate${h ? "Mobile" : ""}_${t.ui}`;
|
|
4939
|
+
if (g[$] === !0) return;
|
|
4940
|
+
g[$] = !0;
|
|
4941
|
+
const S = function(k, ge = {}) {
|
|
4942
|
+
return le(k, ge);
|
|
4864
4943
|
};
|
|
4865
|
-
|
|
4866
|
-
const
|
|
4867
|
-
g.component(
|
|
4868
|
-
|
|
4944
|
+
mt(S), g.config.globalProperties.$formCreate = S;
|
|
4945
|
+
const A = j();
|
|
4946
|
+
g.component(A.name, A), o.forEach((k) => {
|
|
4947
|
+
V(() => k(d, g));
|
|
4869
4948
|
});
|
|
4870
4949
|
}
|
|
4871
4950
|
});
|
|
4872
4951
|
}
|
|
4873
|
-
if (
|
|
4952
|
+
if (mt(F), br(F), Pe("$cookie", Ri), Pe("$localStorage", ki), Pe("$sessionStorage", Di), y.use({ fragment: "fcFragment" }), t.install && le.use(t), P((d, g) => {
|
|
4874
4953
|
g.mixin({
|
|
4875
4954
|
props: ["formCreateInject"],
|
|
4876
4955
|
emits: ["fc.updateValue", "fc.el"]
|
|
4877
4956
|
});
|
|
4878
|
-
}),
|
|
4879
|
-
const
|
|
4880
|
-
|
|
4957
|
+
}), Ve(Vi), t.inherit) {
|
|
4958
|
+
const d = t.inherit;
|
|
4959
|
+
d.components && w(e, d.components), d.parsers && w(r, d.parsers), d.directives && w(n, d.directives), d.modelFields && w(s, d.modelFields), d.providers && w(u, d.providers), d.useApps && w(o, d.useApps), d.maker && w(f, d.maker), d.loadData && w(p, d.loadData), d.formulas && w(C, d.formulas);
|
|
4881
4960
|
}
|
|
4882
|
-
const
|
|
4883
|
-
return
|
|
4961
|
+
const Be = j();
|
|
4962
|
+
return Me(Be, F), Object.defineProperties(Be, {
|
|
4884
4963
|
fetch: {
|
|
4885
4964
|
get() {
|
|
4886
|
-
return
|
|
4965
|
+
return F.fetch;
|
|
4887
4966
|
},
|
|
4888
|
-
set(
|
|
4889
|
-
|
|
4967
|
+
set(d) {
|
|
4968
|
+
F.fetch = d;
|
|
4890
4969
|
}
|
|
4891
4970
|
}
|
|
4892
|
-
}),
|
|
4971
|
+
}), Be.util = F, Be;
|
|
4893
4972
|
}
|
|
4894
|
-
const
|
|
4973
|
+
const Bt = {
|
|
4895
4974
|
date: "YYYY-MM-DD",
|
|
4896
4975
|
month: "YYYY-MM",
|
|
4897
4976
|
week: "YYYY-wo",
|
|
@@ -4901,59 +4980,59 @@ const At = {
|
|
|
4901
4980
|
monthrange: "YYYY-MM",
|
|
4902
4981
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
4903
4982
|
year: "YYYY"
|
|
4904
|
-
},
|
|
4905
|
-
name:
|
|
4983
|
+
}, Tt = "datePicker", Bi = {
|
|
4984
|
+
name: Tt,
|
|
4906
4985
|
maker: function() {
|
|
4907
|
-
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] =
|
|
4986
|
+
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = T(Tt, { type: e.toLowerCase() }), t), {});
|
|
4908
4987
|
}(),
|
|
4909
4988
|
mergeProp(t) {
|
|
4910
4989
|
const e = t.prop.props;
|
|
4911
|
-
e.valueFormat || (e.valueFormat =
|
|
4990
|
+
e.valueFormat || (e.valueFormat = Bt[e.type] || Bt.date);
|
|
4912
4991
|
}
|
|
4913
|
-
},
|
|
4914
|
-
name:
|
|
4992
|
+
}, Qe = "hidden", Ti = {
|
|
4993
|
+
name: Qe,
|
|
4915
4994
|
maker: {
|
|
4916
|
-
[
|
|
4995
|
+
[Qe]: (t, e) => T(Qe)("", t, e)
|
|
4917
4996
|
},
|
|
4918
4997
|
render() {
|
|
4919
4998
|
return [];
|
|
4920
4999
|
}
|
|
4921
|
-
},
|
|
4922
|
-
name:
|
|
5000
|
+
}, Xe = "input", Li = {
|
|
5001
|
+
name: Xe,
|
|
4923
5002
|
maker: function() {
|
|
4924
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] =
|
|
4925
|
-
return t.idate =
|
|
5003
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = T(Xe, { type: r }), e), {});
|
|
5004
|
+
return t.idate = T(Xe, { type: "date" }), t;
|
|
4926
5005
|
}(),
|
|
4927
5006
|
mergeProp(t) {
|
|
4928
5007
|
let { props: e } = t.prop;
|
|
4929
5008
|
e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4930
5009
|
}
|
|
4931
|
-
},
|
|
4932
|
-
name:
|
|
5010
|
+
}, Mi = "textarea", Ni = {
|
|
5011
|
+
name: Mi,
|
|
4933
5012
|
mergeProp(t) {
|
|
4934
5013
|
let { props: e } = t.prop;
|
|
4935
5014
|
e.type = "textarea", e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4936
5015
|
}
|
|
4937
|
-
},
|
|
4938
|
-
name:
|
|
5016
|
+
}, Lt = "slider", Ui = {
|
|
5017
|
+
name: Lt,
|
|
4939
5018
|
maker: {
|
|
4940
|
-
sliderRange:
|
|
5019
|
+
sliderRange: T(Lt, { range: !0 })
|
|
4941
5020
|
},
|
|
4942
5021
|
toFormValue(t, e) {
|
|
4943
5022
|
let r = Array.isArray(t), n = e.prop.props, s = n.min || 0, i;
|
|
4944
5023
|
return n.range === !0 ? i = r ? t : [s, parseFloat(t) || s] : i = r ? parseFloat(t[0]) || s : parseFloat(t), i;
|
|
4945
5024
|
}
|
|
4946
|
-
},
|
|
4947
|
-
name:
|
|
5025
|
+
}, Ze = "timePicker", qi = {
|
|
5026
|
+
name: Ze,
|
|
4948
5027
|
maker: {
|
|
4949
|
-
time:
|
|
4950
|
-
timeRange:
|
|
5028
|
+
time: T(Ze, (t) => t.props.isRange = !1),
|
|
5029
|
+
timeRange: T(Ze, (t) => t.props.isRange = !0)
|
|
4951
5030
|
},
|
|
4952
5031
|
mergeProp(t) {
|
|
4953
5032
|
const e = t.prop.props;
|
|
4954
5033
|
e.valueFormat || (e.valueFormat = "HH:mm:ss");
|
|
4955
5034
|
}
|
|
4956
|
-
},
|
|
5035
|
+
}, Hi = {
|
|
4957
5036
|
name: "FcRow",
|
|
4958
5037
|
render(t, e) {
|
|
4959
5038
|
return e.vNode.col({ props: { span: 24 } }, {
|
|
@@ -4962,60 +5041,60 @@ const At = {
|
|
|
4962
5041
|
]
|
|
4963
5042
|
});
|
|
4964
5043
|
}
|
|
4965
|
-
},
|
|
4966
|
-
name:
|
|
5044
|
+
}, zi = "select", xi = {
|
|
5045
|
+
name: zi,
|
|
4967
5046
|
toFormValue(t, e) {
|
|
4968
|
-
return e.prop.props.multiple && !Array.isArray(t) ?
|
|
5047
|
+
return e.prop.props.multiple && !Array.isArray(t) ? q(t) : t;
|
|
4969
5048
|
}
|
|
4970
|
-
},
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
],
|
|
4980
|
-
button:
|
|
4981
|
-
icon:
|
|
4982
|
-
slider:
|
|
4983
|
-
rate:
|
|
5049
|
+
}, Gi = [
|
|
5050
|
+
Bi,
|
|
5051
|
+
Ti,
|
|
5052
|
+
Li,
|
|
5053
|
+
Ni,
|
|
5054
|
+
Ui,
|
|
5055
|
+
qi,
|
|
5056
|
+
Hi,
|
|
5057
|
+
xi
|
|
5058
|
+
], E = "el", Yi = {
|
|
5059
|
+
button: E + "-button",
|
|
5060
|
+
icon: E + "-icon",
|
|
5061
|
+
slider: E + "-slider",
|
|
5062
|
+
rate: E + "-rate",
|
|
4984
5063
|
upload: "fc-upload",
|
|
4985
|
-
cascader:
|
|
4986
|
-
popover:
|
|
4987
|
-
tooltip:
|
|
4988
|
-
colorPicker:
|
|
4989
|
-
timePicker:
|
|
4990
|
-
timeSelect:
|
|
4991
|
-
datePicker:
|
|
4992
|
-
switch:
|
|
5064
|
+
cascader: E + "-cascader",
|
|
5065
|
+
popover: E + "-popover",
|
|
5066
|
+
tooltip: E + "-tooltip",
|
|
5067
|
+
colorPicker: E + "-colorPicker",
|
|
5068
|
+
timePicker: E + "-time-picker",
|
|
5069
|
+
timeSelect: E + "-time-select",
|
|
5070
|
+
datePicker: E + "-date-picker",
|
|
5071
|
+
switch: E + "-switch",
|
|
4993
5072
|
select: "fc-select",
|
|
4994
5073
|
checkbox: "fc-checkbox",
|
|
4995
5074
|
radio: "fc-radio",
|
|
4996
|
-
inputNumber:
|
|
4997
|
-
number:
|
|
4998
|
-
input:
|
|
4999
|
-
textarea:
|
|
5000
|
-
formItem:
|
|
5001
|
-
form:
|
|
5075
|
+
inputNumber: E + "-input-number",
|
|
5076
|
+
number: E + "-input-number",
|
|
5077
|
+
input: E + "-input",
|
|
5078
|
+
textarea: E + "-input",
|
|
5079
|
+
formItem: E + "-form-item",
|
|
5080
|
+
form: E + "-form",
|
|
5002
5081
|
frame: "fc-frame",
|
|
5003
|
-
col:
|
|
5004
|
-
row:
|
|
5082
|
+
col: E + "-col",
|
|
5083
|
+
row: E + "-row",
|
|
5005
5084
|
tree: "fc-tree",
|
|
5006
|
-
inputTag:
|
|
5007
|
-
inputOtp:
|
|
5008
|
-
mention:
|
|
5009
|
-
transfer:
|
|
5010
|
-
treeSelect:
|
|
5011
|
-
autoComplete:
|
|
5012
|
-
auto:
|
|
5085
|
+
inputTag: E + "-input-tag",
|
|
5086
|
+
inputOtp: E + "-input-otp",
|
|
5087
|
+
mention: E + "-mention",
|
|
5088
|
+
transfer: E + "-transfer",
|
|
5089
|
+
treeSelect: E + "-tree-select",
|
|
5090
|
+
autoComplete: E + "-autocomplete",
|
|
5091
|
+
auto: E + "-autocomplete",
|
|
5013
5092
|
group: "fc-group",
|
|
5014
5093
|
array: "fc-group",
|
|
5015
5094
|
object: "fc-sub-form",
|
|
5016
5095
|
subForm: "fc-sub-form"
|
|
5017
5096
|
};
|
|
5018
|
-
function
|
|
5097
|
+
function Ki() {
|
|
5019
5098
|
return {
|
|
5020
5099
|
form: {
|
|
5021
5100
|
inline: !1,
|
|
@@ -5048,23 +5127,23 @@ function Ni() {
|
|
|
5048
5127
|
}
|
|
5049
5128
|
};
|
|
5050
5129
|
}
|
|
5051
|
-
function
|
|
5130
|
+
function Wi(t) {
|
|
5052
5131
|
return t.type === "tooltip";
|
|
5053
5132
|
}
|
|
5054
|
-
function
|
|
5133
|
+
function Mt(t, e) {
|
|
5055
5134
|
D(t, e) && m.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
5056
5135
|
}
|
|
5057
5136
|
function ie(t) {
|
|
5058
5137
|
return t === !1;
|
|
5059
5138
|
}
|
|
5060
|
-
function
|
|
5139
|
+
function Ji(t, e) {
|
|
5061
5140
|
D(t, e) && !m.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
5062
5141
|
}
|
|
5063
|
-
function
|
|
5142
|
+
function et(t) {
|
|
5064
5143
|
const e = _({}, t);
|
|
5065
5144
|
return delete e.children, e;
|
|
5066
5145
|
}
|
|
5067
|
-
const
|
|
5146
|
+
const Qi = {
|
|
5068
5147
|
validate() {
|
|
5069
5148
|
const t = this.form();
|
|
5070
5149
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -5088,11 +5167,11 @@ const Hi = {
|
|
|
5088
5167
|
},
|
|
5089
5168
|
tidyOptions(t) {
|
|
5090
5169
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
5091
|
-
|
|
5170
|
+
Ji(t, e);
|
|
5092
5171
|
}), t;
|
|
5093
5172
|
},
|
|
5094
5173
|
tidyRule({ prop: t }) {
|
|
5095
|
-
return
|
|
5174
|
+
return Mt(t, "title"), Mt(t, "info"), t;
|
|
5096
5175
|
},
|
|
5097
5176
|
mergeProp(t) {
|
|
5098
5177
|
const e = {
|
|
@@ -5110,7 +5189,7 @@ const Hi = {
|
|
|
5110
5189
|
});
|
|
5111
5190
|
},
|
|
5112
5191
|
getDefaultOptions() {
|
|
5113
|
-
return
|
|
5192
|
+
return Ki();
|
|
5114
5193
|
},
|
|
5115
5194
|
update() {
|
|
5116
5195
|
const t = this.options.form;
|
|
@@ -5135,13 +5214,13 @@ const Hi = {
|
|
|
5135
5214
|
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, ie(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
|
|
5136
5215
|
},
|
|
5137
5216
|
makeWrap(t, e) {
|
|
5138
|
-
const r = t.prop, n = `${this.key}${t.key}`, s = r.col, i = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !i ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props, u = r.wrap.class;
|
|
5217
|
+
const r = t.prop, n = `${this.key}${t.key}`, s = r.col, i = this.isTitle(r) && r.wrap.title !== !1, o = !(s != null && s.labelWidth) && !i ? 0 : s == null ? void 0 : s.labelWidth, { inline: a, col: l } = this.rule.props, u = r.wrap.class;
|
|
5139
5218
|
delete r.wrap.class, delete r.wrap.title;
|
|
5140
5219
|
const f = (m.Undef(r.wrap.show) ? !t.input : ie(r.wrap.show)) ? e : this.$r(oe([r.wrap, {
|
|
5141
|
-
props:
|
|
5142
|
-
labelWidth: o === void 0 ? o :
|
|
5220
|
+
props: z(_({
|
|
5221
|
+
labelWidth: o === void 0 ? o : qt(o),
|
|
5143
5222
|
label: i ? r.title.title : void 0
|
|
5144
|
-
},
|
|
5223
|
+
}, et(r.wrap || {})), {
|
|
5145
5224
|
prop: t.id,
|
|
5146
5225
|
rules: t.injectValidate()
|
|
5147
5226
|
}),
|
|
@@ -5158,21 +5237,21 @@ const Hi = {
|
|
|
5158
5237
|
return !(!e.title && !e.native || ie(e.show));
|
|
5159
5238
|
},
|
|
5160
5239
|
makeInfo(t, e, r) {
|
|
5161
|
-
var f,
|
|
5162
|
-
const n = _({}, t.title), s = _({}, t.info), i =
|
|
5163
|
-
title: (
|
|
5240
|
+
var f, c, h, p, y, C;
|
|
5241
|
+
const n = _({}, t.title), s = _({}, t.info), i = Wi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5242
|
+
title: (c = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : c.value,
|
|
5164
5243
|
rule: r.rule,
|
|
5165
5244
|
options: this.options
|
|
5166
5245
|
}) : ((p = (h = r.refRule) == null ? void 0 : h.__$title) == null ? void 0 : p.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5167
5246
|
if (!ie(s.show) && (s.info || s.native) && !ie(s.icon)) {
|
|
5168
|
-
const
|
|
5247
|
+
const F = {
|
|
5169
5248
|
type: s.type || "popover",
|
|
5170
|
-
props:
|
|
5249
|
+
props: et(s),
|
|
5171
5250
|
key: `${e}pop`
|
|
5172
5251
|
};
|
|
5173
|
-
delete
|
|
5174
|
-
const
|
|
5175
|
-
s.info && !D(
|
|
5252
|
+
delete F.props.icon, delete F.props.show, delete F.props.info, delete F.props.align, delete F.props.native;
|
|
5253
|
+
const G = "content";
|
|
5254
|
+
s.info && !D(F.props, G) && (F.props[G] = (C = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : C.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(oe([s, F]), {
|
|
5176
5255
|
[n.slot || (i ? "default" : "reference")]: () => this.$r({
|
|
5177
5256
|
type: "ElIcon",
|
|
5178
5257
|
style: "top:2px",
|
|
@@ -5185,13 +5264,13 @@ const Hi = {
|
|
|
5185
5264
|
}));
|
|
5186
5265
|
}
|
|
5187
5266
|
const u = oe([n, {
|
|
5188
|
-
props:
|
|
5267
|
+
props: et(n),
|
|
5189
5268
|
key: `${e}tit`,
|
|
5190
5269
|
class: "fc-form-title",
|
|
5191
5270
|
type: n.type || "span",
|
|
5192
5271
|
on: {
|
|
5193
|
-
click: (...
|
|
5194
|
-
this.$handle.targetHook(r, "titleClick", { args:
|
|
5272
|
+
click: (...F) => {
|
|
5273
|
+
this.$handle.targetHook(r, "titleClick", { args: F });
|
|
5195
5274
|
}
|
|
5196
5275
|
}
|
|
5197
5276
|
}]);
|
|
@@ -5264,39 +5343,39 @@ const Hi = {
|
|
|
5264
5343
|
key: `${this.key}b1`
|
|
5265
5344
|
}, [e]);
|
|
5266
5345
|
}
|
|
5267
|
-
},
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
function
|
|
5346
|
+
}, pe = {};
|
|
5347
|
+
Xi(pe);
|
|
5348
|
+
Zi(pe);
|
|
5349
|
+
es(pe);
|
|
5350
|
+
ts(pe);
|
|
5351
|
+
rs(pe);
|
|
5352
|
+
ns(pe);
|
|
5353
|
+
function Xi(t) {
|
|
5275
5354
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "inputTag", "inputOtp", "mention", "transfer", "treeSelect", "radio", "rate"].forEach((e) => {
|
|
5276
|
-
t[e] =
|
|
5355
|
+
t[e] = T(e);
|
|
5277
5356
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker, t.tag = t.inputTag;
|
|
5278
5357
|
}
|
|
5279
|
-
function
|
|
5280
|
-
t.treeSelectMultiple =
|
|
5358
|
+
function Zi(t) {
|
|
5359
|
+
t.treeSelectMultiple = T("treeSelect", { multiple: !0 });
|
|
5281
5360
|
}
|
|
5282
|
-
function
|
|
5361
|
+
function es(t) {
|
|
5283
5362
|
const e = "select", r = "multiple";
|
|
5284
|
-
t.selectMultiple =
|
|
5363
|
+
t.selectMultiple = T(e, { [r]: !0 }), t.selectOne = T(e, { [r]: !1 });
|
|
5285
5364
|
}
|
|
5286
|
-
function
|
|
5365
|
+
function ts(t) {
|
|
5287
5366
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5288
|
-
Object.keys(r).reduce((n, s) => (n[s] =
|
|
5367
|
+
Object.keys(r).reduce((n, s) => (n[s] = T(e, { type: r[s] }), n), t);
|
|
5289
5368
|
}
|
|
5290
|
-
function
|
|
5369
|
+
function rs(t) {
|
|
5291
5370
|
const e = "upload", r = {
|
|
5292
5371
|
image: ["image", 0],
|
|
5293
5372
|
file: ["file", 0],
|
|
5294
5373
|
uploadFileOne: ["file", 1],
|
|
5295
5374
|
uploadImageOne: ["image", 1]
|
|
5296
5375
|
};
|
|
5297
|
-
Object.keys(r).reduce((n, s) => (n[s] =
|
|
5376
|
+
Object.keys(r).reduce((n, s) => (n[s] = T(e, (i) => i.props({ uploadType: r[s][0], maxLength: r[s][1] })), n), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
5298
5377
|
}
|
|
5299
|
-
function
|
|
5378
|
+
function ns(t) {
|
|
5300
5379
|
const e = {
|
|
5301
5380
|
frameInputs: ["input", 0],
|
|
5302
5381
|
frameFiles: ["file", 0],
|
|
@@ -5305,12 +5384,12 @@ function Ji(t) {
|
|
|
5305
5384
|
frameFileOne: ["file", 1],
|
|
5306
5385
|
frameImageOne: ["image", 1]
|
|
5307
5386
|
};
|
|
5308
|
-
return Object.keys(e).reduce((r, n) => (r[n] =
|
|
5387
|
+
return Object.keys(e).reduce((r, n) => (r[n] = T("frame", (s) => s.props({ type: e[n][0], maxLength: e[n][1] })), r), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages, t;
|
|
5309
5388
|
}
|
|
5310
|
-
function
|
|
5389
|
+
function Nt(t, e) {
|
|
5311
5390
|
return m.Boolean(t) ? t = { show: t } : !m.Undef(t) && !m.Object(t) && (t = { show: e }), t;
|
|
5312
5391
|
}
|
|
5313
|
-
function
|
|
5392
|
+
function is(t, e) {
|
|
5314
5393
|
return {
|
|
5315
5394
|
formEl() {
|
|
5316
5395
|
return e.$manager.form();
|
|
@@ -5334,13 +5413,13 @@ function Ki(t, e) {
|
|
|
5334
5413
|
},
|
|
5335
5414
|
validateField(r, n) {
|
|
5336
5415
|
return new Promise((s, i) => {
|
|
5337
|
-
const a = typeof r == "object" ?
|
|
5416
|
+
const a = typeof r == "object" ? Q(r) : e.getCtx(r);
|
|
5338
5417
|
if (!a) {
|
|
5339
5418
|
s(null), n && n(null);
|
|
5340
5419
|
return;
|
|
5341
5420
|
}
|
|
5342
5421
|
const l = e.subForm[a.id], u = [e.$manager.validateField(a.id)];
|
|
5343
|
-
|
|
5422
|
+
q(l).filter((f) => !f.isScope).forEach((f) => {
|
|
5344
5423
|
u.push(f.validate());
|
|
5345
5424
|
}), Promise.all(u).then(() => {
|
|
5346
5425
|
s(null), n && n(null);
|
|
@@ -5400,11 +5479,11 @@ function Ki(t, e) {
|
|
|
5400
5479
|
}
|
|
5401
5480
|
},
|
|
5402
5481
|
submitBtnProps: (r = {}) => {
|
|
5403
|
-
let n =
|
|
5482
|
+
let n = Nt(e.options.submitBtn, !0);
|
|
5404
5483
|
w(n, r), e.options.submitBtn = n, t.refreshOptions();
|
|
5405
5484
|
},
|
|
5406
5485
|
resetBtnProps: (r = {}) => {
|
|
5407
|
-
let n =
|
|
5486
|
+
let n = Nt(e.options.resetBtn, !1);
|
|
5408
5487
|
w(n, r), e.options.resetBtn = n, t.refreshOptions();
|
|
5409
5488
|
},
|
|
5410
5489
|
submit(r, n) {
|
|
@@ -5412,20 +5491,20 @@ function Ki(t, e) {
|
|
|
5412
5491
|
(e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
|
|
5413
5492
|
let a = t.formData();
|
|
5414
5493
|
e.beforeSubmit(a).then(() => {
|
|
5415
|
-
m.Function(r) &&
|
|
5494
|
+
m.Function(r) && V(() => r(a, t)), m.Function(e.options.onSubmit) && V(() => e.options.onSubmit(a, t)), e.vm.emit("submit", a, t), s(a);
|
|
5416
5495
|
}).catch((l) => {
|
|
5417
5496
|
});
|
|
5418
5497
|
}).catch((...a) => {
|
|
5419
|
-
m.Function(n) &&
|
|
5498
|
+
m.Function(n) && V(() => n(t, ...a)), i(...a);
|
|
5420
5499
|
});
|
|
5421
5500
|
});
|
|
5422
5501
|
}
|
|
5423
5502
|
};
|
|
5424
5503
|
}
|
|
5425
|
-
const
|
|
5504
|
+
const ur = {
|
|
5426
5505
|
name: "required",
|
|
5427
5506
|
load(t, e, r) {
|
|
5428
|
-
const n =
|
|
5507
|
+
const n = ss(t.getValue());
|
|
5429
5508
|
let s;
|
|
5430
5509
|
if (n.required === !1)
|
|
5431
5510
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
@@ -5451,30 +5530,30 @@ const sr = {
|
|
|
5451
5530
|
r.sync(e);
|
|
5452
5531
|
},
|
|
5453
5532
|
watch(...t) {
|
|
5454
|
-
|
|
5533
|
+
ur.load(...t);
|
|
5455
5534
|
}
|
|
5456
5535
|
};
|
|
5457
|
-
function
|
|
5536
|
+
function ss(t) {
|
|
5458
5537
|
return m.Boolean(t) ? { required: t } : m.String(t) ? { message: t } : m.Undef(t) ? { required: !1 } : m.Function(t) ? { validator: t } : m.Object(t) ? t : {};
|
|
5459
5538
|
}
|
|
5460
|
-
function
|
|
5461
|
-
t.componentAlias(
|
|
5539
|
+
function os(t) {
|
|
5540
|
+
t.componentAlias(Yi), Bn.forEach((e) => {
|
|
5462
5541
|
t.component(e.name, e);
|
|
5463
|
-
}), t.register(
|
|
5542
|
+
}), t.register(ur), Gi.forEach((e) => {
|
|
5464
5543
|
t.parser(e);
|
|
5465
|
-
}), Object.keys(
|
|
5466
|
-
t.maker[e] =
|
|
5544
|
+
}), Object.keys(pe).forEach((e) => {
|
|
5545
|
+
t.maker[e] = pe[e];
|
|
5467
5546
|
}), typeof window != "undefined" && window.ElementPlus && t.useApp((e, r) => {
|
|
5468
5547
|
r.use(window.ElementPlus);
|
|
5469
5548
|
});
|
|
5470
5549
|
}
|
|
5471
|
-
function
|
|
5472
|
-
return
|
|
5550
|
+
function as() {
|
|
5551
|
+
return lr({
|
|
5473
5552
|
ui: "element-ui",
|
|
5474
|
-
version: "3.3.
|
|
5475
|
-
manager:
|
|
5476
|
-
extendApi:
|
|
5477
|
-
install:
|
|
5553
|
+
version: "3.3.3",
|
|
5554
|
+
manager: Qi,
|
|
5555
|
+
extendApi: is,
|
|
5556
|
+
install: os,
|
|
5478
5557
|
attrs: {
|
|
5479
5558
|
normal: ["col", "wrap"],
|
|
5480
5559
|
array: ["className"],
|
|
@@ -5482,10 +5561,10 @@ function Qi() {
|
|
|
5482
5561
|
}
|
|
5483
5562
|
});
|
|
5484
5563
|
}
|
|
5485
|
-
const
|
|
5486
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5487
|
-
const
|
|
5564
|
+
const fr = as();
|
|
5565
|
+
typeof window != "undefined" && (window.formCreate = fr);
|
|
5566
|
+
const fs = fr.maker;
|
|
5488
5567
|
export {
|
|
5489
|
-
|
|
5490
|
-
|
|
5568
|
+
fr as default,
|
|
5569
|
+
fs as maker
|
|
5491
5570
|
};
|