@form-create/component-antdv-group 3.2.38 → 3.3.0
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/index.esm.js +282 -639
- package/dist/index.js +6 -779
- package/dist/index.min.js +6 -3
- package/package.json +50 -55
- package/src/component.jsx +2 -2
- package/dist/index.esm.min.js +0 -7
package/dist/index.esm.js
CHANGED
|
@@ -1,272 +1,93 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* FormCreate 低代码表单渲染器
|
|
3
|
+
* @form-create/component-antdv-group v3.3.0
|
|
3
4
|
* (c) 2018-2026 xaboy
|
|
4
|
-
* Github https://github.com/xaboy/form-create
|
|
5
|
+
* Github https://github.com/xaboy/form-create
|
|
6
|
+
* Site https://form-create.com/
|
|
5
7
|
* Released under the MIT License.
|
|
6
8
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return keys;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function _objectSpread2(target) {
|
|
28
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
29
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
30
|
-
|
|
31
|
-
if (i % 2) {
|
|
32
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
33
|
-
_defineProperty(target, key, source[key]);
|
|
34
|
-
});
|
|
35
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
36
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
37
|
-
} else {
|
|
38
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
39
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return target;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function _typeof(obj) {
|
|
48
|
-
"@babel/helpers - typeof";
|
|
49
|
-
|
|
50
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
51
|
-
_typeof = function (obj) {
|
|
52
|
-
return typeof obj;
|
|
53
|
-
};
|
|
54
|
-
} else {
|
|
55
|
-
_typeof = function (obj) {
|
|
56
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return _typeof(obj);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function _defineProperty(obj, key, value) {
|
|
64
|
-
if (key in obj) {
|
|
65
|
-
Object.defineProperty(obj, key, {
|
|
66
|
-
value: value,
|
|
67
|
-
enumerable: true,
|
|
68
|
-
configurable: true,
|
|
69
|
-
writable: true
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
obj[key] = value;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return obj;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _toConsumableArray(arr) {
|
|
79
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function _arrayWithoutHoles(arr) {
|
|
83
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function _iterableToArray(iter) {
|
|
87
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
91
|
-
if (!o) return;
|
|
92
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
93
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
94
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
95
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
96
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function _arrayLikeToArray(arr, len) {
|
|
100
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
101
|
-
|
|
102
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
103
|
-
|
|
104
|
-
return arr2;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function _nonIterableSpread() {
|
|
108
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
var is = {
|
|
112
|
-
type: function type(arg, _type) {
|
|
113
|
-
return Object.prototype.toString.call(arg) === '[object ' + _type + ']';
|
|
9
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('._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}}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
10
|
+
var $ = Object.defineProperty;
|
|
11
|
+
var V = Object.getOwnPropertySymbols;
|
|
12
|
+
var O = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var R = (t, e, s) => e in t ? $(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, p = (t, e) => {
|
|
14
|
+
for (var s in e || (e = {}))
|
|
15
|
+
O.call(e, s) && R(t, s, e[s]);
|
|
16
|
+
if (V)
|
|
17
|
+
for (var s of V(e))
|
|
18
|
+
v.call(e, s) && R(t, s, e[s]);
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { defineComponent as A, createVNode as r, mergeProps as j, nextTick as m, markRaw as I } from "vue";
|
|
22
|
+
const c = {
|
|
23
|
+
type(t, e) {
|
|
24
|
+
return Object.prototype.toString.call(t) === "[object " + e + "]";
|
|
114
25
|
},
|
|
115
|
-
Undef
|
|
116
|
-
return
|
|
26
|
+
Undef(t) {
|
|
27
|
+
return t == null;
|
|
117
28
|
},
|
|
118
|
-
Element
|
|
119
|
-
return
|
|
29
|
+
Element(t) {
|
|
30
|
+
return typeof t == "object" && t !== null && t.nodeType === 1 && !c.Object(t);
|
|
120
31
|
},
|
|
121
|
-
trueArray
|
|
122
|
-
return Array.isArray(
|
|
32
|
+
trueArray(t) {
|
|
33
|
+
return Array.isArray(t) && t.length > 0;
|
|
123
34
|
},
|
|
124
|
-
Function
|
|
125
|
-
|
|
126
|
-
return
|
|
35
|
+
Function(t) {
|
|
36
|
+
const e = this.getType(t);
|
|
37
|
+
return e === "Function" || e === "AsyncFunction";
|
|
127
38
|
},
|
|
128
|
-
getType
|
|
129
|
-
|
|
130
|
-
return /^\[object (.*)\]$/.exec(
|
|
39
|
+
getType(t) {
|
|
40
|
+
const e = Object.prototype.toString.call(t);
|
|
41
|
+
return /^\[object (.*)\]$/.exec(e)[1];
|
|
131
42
|
},
|
|
132
|
-
empty
|
|
133
|
-
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (Array.isArray(value) && Array.isArray(value) && !value.length) {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return typeof value === 'string' && !value;
|
|
43
|
+
empty(t) {
|
|
44
|
+
return t == null || Array.isArray(t) && Array.isArray(t) && !t.length ? !0 : typeof t == "string" && !t;
|
|
142
45
|
}
|
|
143
46
|
};
|
|
144
|
-
[
|
|
145
|
-
|
|
146
|
-
return
|
|
47
|
+
["Date", "Object", "String", "Boolean", "Array", "Number"].forEach((t) => {
|
|
48
|
+
c[t] = function(e) {
|
|
49
|
+
return c.type(e, t);
|
|
147
50
|
};
|
|
148
51
|
});
|
|
149
|
-
function
|
|
150
|
-
return {}.hasOwnProperty.call(
|
|
52
|
+
function B(t, e) {
|
|
53
|
+
return {}.hasOwnProperty.call(t, e);
|
|
151
54
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
target[field] = value;
|
|
55
|
+
function f(t, e, s) {
|
|
56
|
+
t[e] = s;
|
|
155
57
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if ((isArr = Array.isArray(clone)) || is.Object(clone)) {
|
|
167
|
-
var nst = origin[key] === undefined;
|
|
168
|
-
|
|
169
|
-
if (isArr) {
|
|
170
|
-
isArr = false;
|
|
171
|
-
nst && $set(origin, key, []);
|
|
172
|
-
} else if (clone._clone && mode !== undefined) {
|
|
173
|
-
if (mode) {
|
|
174
|
-
clone = clone.getRule();
|
|
175
|
-
nst && $set(origin, key, {});
|
|
176
|
-
} else {
|
|
177
|
-
$set(origin, key, clone._clone());
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
} else {
|
|
181
|
-
nst && $set(origin, key, {});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
origin[key] = deepExtend(origin[key], clone, mode);
|
|
185
|
-
} else {
|
|
186
|
-
$set(origin, key, clone);
|
|
187
|
-
|
|
188
|
-
if (!is.Undef(clone)) {
|
|
189
|
-
if (!is.Undef(clone.__json)) {
|
|
190
|
-
origin[key].__json = clone.__json;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if (!is.Undef(clone.__origin)) {
|
|
194
|
-
origin[key].__origin = clone.__origin;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
58
|
+
function y(t, e = {}, s) {
|
|
59
|
+
let i = !1;
|
|
60
|
+
for (let l in e)
|
|
61
|
+
if (Object.prototype.hasOwnProperty.call(e, l)) {
|
|
62
|
+
let o = e[l];
|
|
63
|
+
if ((i = Array.isArray(o)) || c.Object(o)) {
|
|
64
|
+
let n = t[l] === void 0;
|
|
65
|
+
i ? (i = !1, n && f(t, l, [])) : o._clone && s !== void 0 || n && f(t, l, {}), t[l] = y(t[l], o, s);
|
|
66
|
+
} else
|
|
67
|
+
f(t, l, o), c.Undef(o) || (c.Undef(o.__json) || (t[l].__json = o.__json), c.Undef(o.__origin) || (t[l].__origin = o.__origin));
|
|
198
68
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
return mode !== undefined && Array.isArray(origin) ? origin.filter(function (v) {
|
|
202
|
-
return !v || !v.__ctrl;
|
|
203
|
-
}) : origin;
|
|
69
|
+
return s !== void 0 && Array.isArray(t) ? t.filter((l) => !l || !l.__ctrl) : t;
|
|
204
70
|
}
|
|
205
|
-
function
|
|
206
|
-
return
|
|
207
|
-
value: value
|
|
208
|
-
}).value;
|
|
71
|
+
function g(t) {
|
|
72
|
+
return y({}, { value: t }).value;
|
|
209
73
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return a;
|
|
74
|
+
const C = Object.assign || function(t) {
|
|
75
|
+
for (let e, s = 1; s < arguments.length; s++)
|
|
76
|
+
for (let i in e = arguments[s], e)
|
|
77
|
+
Object.prototype.hasOwnProperty.call(e, i) && f(t, i, e[i]);
|
|
78
|
+
return t;
|
|
219
79
|
};
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return _extends.apply(this, arguments);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function styleInject(css, ref) {
|
|
226
|
-
if ( ref === void 0 ) ref = {};
|
|
227
|
-
var insertAt = ref.insertAt;
|
|
228
|
-
|
|
229
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
230
|
-
|
|
231
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
232
|
-
var style = document.createElement('style');
|
|
233
|
-
style.type = 'text/css';
|
|
234
|
-
|
|
235
|
-
if (insertAt === 'top') {
|
|
236
|
-
if (head.firstChild) {
|
|
237
|
-
head.insertBefore(style, head.firstChild);
|
|
238
|
-
} else {
|
|
239
|
-
head.appendChild(style);
|
|
240
|
-
}
|
|
241
|
-
} else {
|
|
242
|
-
head.appendChild(style);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (style.styleSheet) {
|
|
246
|
-
style.styleSheet.cssText = css;
|
|
247
|
-
} else {
|
|
248
|
-
style.appendChild(document.createTextNode(css));
|
|
249
|
-
}
|
|
80
|
+
function D() {
|
|
81
|
+
return C.apply(this, arguments);
|
|
250
82
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
styleInject(css_248z);
|
|
254
|
-
|
|
255
|
-
function isPromise(value) {
|
|
256
|
-
return value && _typeof(value) === 'object' && typeof value.then === 'function';
|
|
83
|
+
function S(t) {
|
|
84
|
+
return t && typeof t == "object" && typeof t.then == "function";
|
|
257
85
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (isPromise(value)) {
|
|
261
|
-
return value;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
return Promise.resolve(value);
|
|
86
|
+
function w(t) {
|
|
87
|
+
return S(t) ? t : Promise.resolve(t);
|
|
265
88
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
var Group = defineComponent({
|
|
269
|
-
name: NAME,
|
|
89
|
+
const U = "fcGroup", N = /* @__PURE__ */ A({
|
|
90
|
+
name: U,
|
|
270
91
|
props: {
|
|
271
92
|
field: String,
|
|
272
93
|
rule: Array,
|
|
@@ -274,502 +95,324 @@ var Group = defineComponent({
|
|
|
274
95
|
options: Object,
|
|
275
96
|
button: {
|
|
276
97
|
type: Boolean,
|
|
277
|
-
|
|
98
|
+
default: !0
|
|
278
99
|
},
|
|
279
100
|
max: {
|
|
280
101
|
type: Number,
|
|
281
|
-
|
|
102
|
+
default: 0
|
|
282
103
|
},
|
|
283
104
|
min: {
|
|
284
105
|
type: Number,
|
|
285
|
-
|
|
106
|
+
default: 0
|
|
286
107
|
},
|
|
287
108
|
modelValue: {
|
|
288
109
|
type: Array,
|
|
289
|
-
|
|
290
|
-
return [];
|
|
291
|
-
}
|
|
110
|
+
default: () => []
|
|
292
111
|
},
|
|
293
112
|
defaultValue: Object,
|
|
294
113
|
sortBtn: {
|
|
295
114
|
type: Boolean,
|
|
296
|
-
|
|
115
|
+
default: !0
|
|
297
116
|
},
|
|
298
117
|
disabled: {
|
|
299
118
|
type: Boolean,
|
|
300
|
-
|
|
119
|
+
default: !1
|
|
301
120
|
},
|
|
302
121
|
syncDisabled: {
|
|
303
122
|
type: Boolean,
|
|
304
|
-
|
|
123
|
+
default: !0
|
|
305
124
|
},
|
|
306
125
|
title: {
|
|
307
126
|
type: [String, Function],
|
|
308
|
-
|
|
127
|
+
default: null
|
|
309
128
|
},
|
|
310
129
|
type: {
|
|
311
130
|
type: String,
|
|
312
|
-
|
|
131
|
+
default: "default"
|
|
313
132
|
},
|
|
314
133
|
onBeforeRemove: {
|
|
315
134
|
type: Function,
|
|
316
|
-
|
|
135
|
+
default: () => {
|
|
136
|
+
}
|
|
317
137
|
},
|
|
318
138
|
onBeforeAdd: {
|
|
319
139
|
type: Function,
|
|
320
|
-
|
|
140
|
+
default: () => {
|
|
141
|
+
}
|
|
321
142
|
},
|
|
322
143
|
formCreateInject: Object,
|
|
323
144
|
parse: Function
|
|
324
145
|
},
|
|
325
|
-
data
|
|
146
|
+
data() {
|
|
326
147
|
return {
|
|
327
148
|
len: 0,
|
|
328
149
|
cacheRule: {},
|
|
329
150
|
cacheValue: {},
|
|
330
151
|
sort: [],
|
|
331
|
-
form:
|
|
152
|
+
form: I(this.formCreateInject.form.$form())
|
|
332
153
|
};
|
|
333
154
|
},
|
|
334
|
-
emits: [
|
|
155
|
+
emits: ["update:modelValue", "change", "itemMounted", "remove", "add"],
|
|
335
156
|
watch: {
|
|
336
157
|
rule: {
|
|
337
|
-
handler
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
} else {
|
|
352
|
-
var _val = item.$f.formData();
|
|
353
|
-
|
|
354
|
-
item.$f.once('reloading', function () {
|
|
355
|
-
item.$f.setValue(_val);
|
|
356
|
-
});
|
|
357
|
-
item.rule = deepCopy(n);
|
|
158
|
+
handler(t, e) {
|
|
159
|
+
Object.keys(this.cacheRule).forEach((s) => {
|
|
160
|
+
const i = this.cacheRule[s];
|
|
161
|
+
if (i.$f) {
|
|
162
|
+
const l = i.$f.formData();
|
|
163
|
+
if (t === e)
|
|
164
|
+
i.$f.deferSyncValue(() => {
|
|
165
|
+
y(i.rule, t), i.$f.setValue(l);
|
|
166
|
+
}, !0);
|
|
167
|
+
else {
|
|
168
|
+
const o = i.$f.formData();
|
|
169
|
+
i.$f.once("reloading", () => {
|
|
170
|
+
i.$f.setValue(o);
|
|
171
|
+
}), i.rule = g(t);
|
|
358
172
|
}
|
|
359
173
|
}
|
|
360
174
|
});
|
|
361
175
|
},
|
|
362
|
-
deep:
|
|
176
|
+
deep: !0
|
|
363
177
|
},
|
|
364
|
-
expand
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
if (d > 0) {
|
|
368
|
-
this.expandRule(d);
|
|
369
|
-
}
|
|
178
|
+
expand(t) {
|
|
179
|
+
let e = t - this.modelValue.length;
|
|
180
|
+
e > 0 && this.expandRule(e);
|
|
370
181
|
},
|
|
371
182
|
modelValue: {
|
|
372
|
-
handler
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
if (len < 0) {
|
|
381
|
-
for (var i = len; i < 0; i++) {
|
|
382
|
-
this.addRule(n.length + i, true);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
for (var _i = 0; _i < total; _i++) {
|
|
386
|
-
this.setValue(keys[_i], n[_i]);
|
|
387
|
-
}
|
|
183
|
+
handler(t) {
|
|
184
|
+
t = t || [];
|
|
185
|
+
let e = this.sort, s = e.length, i = s - t.length;
|
|
186
|
+
if (i < 0) {
|
|
187
|
+
for (let l = i; l < 0; l++)
|
|
188
|
+
this.addRule(t.length + l, !0);
|
|
189
|
+
for (let l = 0; l < s; l++)
|
|
190
|
+
this.setValue(e[l], t[l]);
|
|
388
191
|
} else {
|
|
389
|
-
if (
|
|
390
|
-
for (
|
|
391
|
-
this.removeRule(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
n.forEach(function (val, i) {
|
|
396
|
-
_this2.setValue(keys[i], n[i]);
|
|
192
|
+
if (i > 0)
|
|
193
|
+
for (let l = 0; l < i; l++)
|
|
194
|
+
this.removeRule(e[s - l - 1]);
|
|
195
|
+
t.forEach((l, o) => {
|
|
196
|
+
this.setValue(e[o], t[o]);
|
|
397
197
|
});
|
|
398
198
|
}
|
|
399
199
|
},
|
|
400
|
-
deep:
|
|
200
|
+
deep: !0
|
|
401
201
|
}
|
|
402
202
|
},
|
|
403
203
|
methods: {
|
|
404
|
-
_value
|
|
405
|
-
return
|
|
204
|
+
_value(t) {
|
|
205
|
+
return t && B(t, this.field) ? t[this.field] : t;
|
|
406
206
|
},
|
|
407
|
-
cache
|
|
408
|
-
this.cacheValue[
|
|
207
|
+
cache(t, e) {
|
|
208
|
+
this.cacheValue[t] = JSON.stringify(e);
|
|
409
209
|
},
|
|
410
|
-
input
|
|
411
|
-
this.$emit(
|
|
412
|
-
this.$emit('change', value);
|
|
210
|
+
input(t) {
|
|
211
|
+
this.$emit("update:modelValue", t), this.$emit("change", t);
|
|
413
212
|
},
|
|
414
|
-
formData
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
var cacheRule = this.cacheRule;
|
|
418
|
-
var keys = this.sort;
|
|
419
|
-
|
|
420
|
-
if (keys.filter(function (k) {
|
|
421
|
-
return cacheRule[k] && cacheRule[k].$f;
|
|
422
|
-
}).length !== keys.length) {
|
|
213
|
+
formData(t, e) {
|
|
214
|
+
const s = this.cacheRule, i = this.sort;
|
|
215
|
+
if (i.filter((o) => s[o] && s[o].$f).length !== i.length)
|
|
423
216
|
return;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
var data = key === k ? _formData : _objectSpread2({}, _this3.cacheRule[k].$f.form);
|
|
428
|
-
var value = _this3.field ? data[_this3.field] || null : data;
|
|
429
|
-
|
|
430
|
-
_this3.cache(k, value);
|
|
431
|
-
|
|
432
|
-
return value;
|
|
217
|
+
const l = i.map((o) => {
|
|
218
|
+
const n = t === o ? e : p({}, this.cacheRule[o].$f.form), u = this.field ? c.Undef(n[this.field]) ? null : n[this.field] : n;
|
|
219
|
+
return this.cache(o, u), u;
|
|
433
220
|
});
|
|
434
|
-
this.input(
|
|
221
|
+
this.input(l);
|
|
435
222
|
},
|
|
436
|
-
setValue
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
if (this.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
this.cacheRule[key].$f && this.cacheRule[key].$f.coverValue(value);
|
|
448
|
-
this.cache(key, value);
|
|
223
|
+
setValue(t, e) {
|
|
224
|
+
const s = this.field;
|
|
225
|
+
s && (e = {
|
|
226
|
+
[s]: this._value(e)
|
|
227
|
+
}), this.cacheValue[t] !== JSON.stringify(s ? e[s] : e) && (this.cacheRule[t].$f && this.cacheRule[t].$f.coverValue(e), this.cache(t, e));
|
|
449
228
|
},
|
|
450
|
-
addRule
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
var options = this.options ? _objectSpread2({}, this.options) : {
|
|
455
|
-
submitBtn: false,
|
|
456
|
-
resetBtn: false
|
|
229
|
+
addRule(t, e) {
|
|
230
|
+
const s = this.formCreateInject.form.copyRules(this.rule || []), i = this.options ? p({}, this.options) : {
|
|
231
|
+
submitBtn: !1,
|
|
232
|
+
resetBtn: !1
|
|
457
233
|
};
|
|
458
|
-
|
|
459
234
|
if (this.defaultValue) {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
235
|
+
i.formData || (i.formData = {});
|
|
236
|
+
const l = g(this.defaultValue);
|
|
237
|
+
D(i.formData, this.field ? {
|
|
238
|
+
[this.field]: l
|
|
239
|
+
} : l);
|
|
463
240
|
}
|
|
464
|
-
|
|
465
241
|
this.parse && this.parse({
|
|
466
|
-
rule:
|
|
467
|
-
options:
|
|
242
|
+
rule: s,
|
|
243
|
+
options: i,
|
|
468
244
|
index: this.sort.length
|
|
469
|
-
})
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
};
|
|
474
|
-
this.sort = Object.keys(this.cacheRule);
|
|
475
|
-
|
|
476
|
-
if (emit) {
|
|
477
|
-
nextTick(function () {
|
|
478
|
-
return _this4.$emit('add', rule, Object.keys(_this4.cacheRule).length - 1);
|
|
479
|
-
});
|
|
480
|
-
}
|
|
245
|
+
}), this.cacheRule[++this.len] = {
|
|
246
|
+
rule: s,
|
|
247
|
+
options: i
|
|
248
|
+
}, this.sort = Object.keys(this.cacheRule), e && m(() => this.$emit("add", s, Object.keys(this.cacheRule).length - 1));
|
|
481
249
|
},
|
|
482
|
-
add$f
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
this.cacheRule[key].$f = $f;
|
|
486
|
-
nextTick(function () {
|
|
487
|
-
_this5.$emit('itemMounted', $f, Object.keys(_this5.cacheRule).indexOf(key));
|
|
250
|
+
add$f(t, e, s) {
|
|
251
|
+
this.cacheRule[e].$f = s, m(() => {
|
|
252
|
+
this.$emit("itemMounted", s, Object.keys(this.cacheRule).indexOf(e));
|
|
488
253
|
});
|
|
489
254
|
},
|
|
490
|
-
removeRule
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
var index = Object.keys(this.cacheRule).indexOf(key);
|
|
494
|
-
delete this.cacheRule[key];
|
|
495
|
-
delete this.cacheValue[key];
|
|
496
|
-
this.sort = Object.keys(this.cacheRule);
|
|
497
|
-
|
|
498
|
-
if (emit) {
|
|
499
|
-
nextTick(function () {
|
|
500
|
-
return _this6.$emit('remove', index);
|
|
501
|
-
});
|
|
502
|
-
}
|
|
255
|
+
removeRule(t, e) {
|
|
256
|
+
const s = Object.keys(this.cacheRule).indexOf(t);
|
|
257
|
+
delete this.cacheRule[t], delete this.cacheValue[t], this.sort = Object.keys(this.cacheRule), e && m(() => this.$emit("remove", s));
|
|
503
258
|
},
|
|
504
|
-
add
|
|
505
|
-
if (this.disabled ||
|
|
259
|
+
add(t) {
|
|
260
|
+
if (this.disabled || this.onBeforeAdd(this.modelValue) === !1)
|
|
506
261
|
return;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
var value = _toConsumableArray(this.modelValue);
|
|
510
|
-
|
|
511
|
-
value.push(this.defaultValue ? deepCopy(this.defaultValue) : this.field ? null : {});
|
|
512
|
-
this.input(value);
|
|
262
|
+
const e = [...this.modelValue];
|
|
263
|
+
e.push(this.defaultValue ? g(this.defaultValue) : this.field ? null : {}), this.input(e);
|
|
513
264
|
},
|
|
514
|
-
del
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
if (this.disabled) {
|
|
265
|
+
del(t, e) {
|
|
266
|
+
if (this.disabled)
|
|
518
267
|
return;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
var value = _toConsumableArray(_this7.modelValue);
|
|
525
|
-
|
|
526
|
-
value.splice(index, 1);
|
|
527
|
-
|
|
528
|
-
_this7.input(value);
|
|
268
|
+
const s = () => {
|
|
269
|
+
this.removeRule(e, !0);
|
|
270
|
+
const i = [...this.modelValue];
|
|
271
|
+
i.splice(t, 1), this.input(i);
|
|
529
272
|
};
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
if (false !== res) {
|
|
533
|
-
del();
|
|
534
|
-
}
|
|
273
|
+
w(this.onBeforeRemove(this.modelValue, t)).then((i) => {
|
|
274
|
+
i !== !1 && s();
|
|
535
275
|
});
|
|
536
276
|
},
|
|
537
|
-
addIcon
|
|
538
|
-
return
|
|
539
|
-
|
|
540
|
-
|
|
277
|
+
addIcon(t) {
|
|
278
|
+
return r("div", {
|
|
279
|
+
class: "_fc-group-btn _fc-group-plus-minus",
|
|
280
|
+
onClick: this.add
|
|
541
281
|
}, null);
|
|
542
282
|
},
|
|
543
|
-
delIcon
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
"class": "_fc-group-btn _fc-group-plus-minus _fc-group-minus",
|
|
548
|
-
"onClick": function onClick() {
|
|
549
|
-
return _this8.del(index, key);
|
|
550
|
-
}
|
|
283
|
+
delIcon(t, e) {
|
|
284
|
+
return r("div", {
|
|
285
|
+
class: "_fc-group-btn _fc-group-plus-minus _fc-group-minus",
|
|
286
|
+
onClick: () => this.del(t, e)
|
|
551
287
|
}, null);
|
|
552
288
|
},
|
|
553
|
-
sortUpIcon
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"class": "_fc-group-btn _fc-group-arrow _fc-group-up",
|
|
558
|
-
"onClick": function onClick() {
|
|
559
|
-
return _this9.changeSort(index, -1);
|
|
560
|
-
}
|
|
289
|
+
sortUpIcon(t) {
|
|
290
|
+
return r("div", {
|
|
291
|
+
class: "_fc-group-btn _fc-group-arrow _fc-group-up",
|
|
292
|
+
onClick: () => this.changeSort(t, -1)
|
|
561
293
|
}, null);
|
|
562
294
|
},
|
|
563
|
-
sortDownIcon
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
"class": "_fc-group-btn _fc-group-arrow _fc-group-down",
|
|
568
|
-
"onClick": function onClick() {
|
|
569
|
-
return _this10.changeSort(index, 1);
|
|
570
|
-
}
|
|
295
|
+
sortDownIcon(t) {
|
|
296
|
+
return r("div", {
|
|
297
|
+
class: "_fc-group-btn _fc-group-arrow _fc-group-down",
|
|
298
|
+
onClick: () => this.changeSort(t, 1)
|
|
571
299
|
}, null);
|
|
572
300
|
},
|
|
573
|
-
changeSort
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
var a = this.sort[index];
|
|
577
|
-
this.sort[index] = this.sort[index + sort];
|
|
578
|
-
this.sort[index + sort] = a;
|
|
579
|
-
this.formCreateInject.subForm(this.sort.map(function (k) {
|
|
580
|
-
return _this11.cacheRule[k].$f;
|
|
581
|
-
}));
|
|
582
|
-
this.formData(0);
|
|
301
|
+
changeSort(t, e) {
|
|
302
|
+
const s = this.sort[t];
|
|
303
|
+
this.sort[t] = this.sort[t + e], this.sort[t + e] = s, this.formCreateInject.subForm(this.sort.map((i) => this.cacheRule[i].$f)), this.formData(0);
|
|
583
304
|
},
|
|
584
|
-
sortIcon
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
if (this.type === 'card' && canMoveUp && canMoveDown) {
|
|
596
|
-
// 显示合并的上下箭头按钮
|
|
597
|
-
btn.push(createVNode("div", {
|
|
598
|
-
"class": "_fc-group-btn _fc-group-sort"
|
|
599
|
-
}, [createVNode("div", {
|
|
600
|
-
"class": " _fc-group-sort-up",
|
|
601
|
-
"onClick": function onClick() {
|
|
602
|
-
return _this12.changeSort(index, -1);
|
|
603
|
-
}
|
|
604
|
-
}, null), createVNode("div", {
|
|
605
|
-
"class": " _fc-group-sort-down",
|
|
606
|
-
"onClick": function onClick() {
|
|
607
|
-
return _this12.changeSort(index, 1);
|
|
608
|
-
}
|
|
609
|
-
}, null)]));
|
|
610
|
-
return btn;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
if (canMoveUp) {
|
|
614
|
-
btn.push(this.sortUpIcon(index));
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
if (canMoveDown) {
|
|
618
|
-
btn.push(this.sortDownIcon(index));
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
return btn;
|
|
305
|
+
sortIcon(t, e) {
|
|
306
|
+
const s = t > 0, i = t < e - 1, l = [];
|
|
307
|
+
return !s && !i ? l : this.type === "card" && s && i ? (l.push(r("div", {
|
|
308
|
+
class: "_fc-group-btn _fc-group-sort"
|
|
309
|
+
}, [r("div", {
|
|
310
|
+
class: " _fc-group-sort-up",
|
|
311
|
+
onClick: () => this.changeSort(t, -1)
|
|
312
|
+
}, null), r("div", {
|
|
313
|
+
class: " _fc-group-sort-down",
|
|
314
|
+
onClick: () => this.changeSort(t, 1)
|
|
315
|
+
}, null)])), l) : (s && l.push(this.sortUpIcon(t)), i && l.push(this.sortDownIcon(t)), l);
|
|
622
316
|
},
|
|
623
|
-
makeIcon
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
if (this.$slots.button) {
|
|
317
|
+
makeIcon(t, e, s) {
|
|
318
|
+
if (this.$slots.button)
|
|
627
319
|
return this.$slots.button({
|
|
628
|
-
total:
|
|
629
|
-
index:
|
|
320
|
+
total: t,
|
|
321
|
+
index: e,
|
|
630
322
|
vm: this,
|
|
631
|
-
key:
|
|
632
|
-
del:
|
|
633
|
-
return _this13.del(index, key);
|
|
634
|
-
},
|
|
323
|
+
key: s,
|
|
324
|
+
del: () => this.del(e, s),
|
|
635
325
|
add: this.add
|
|
636
326
|
});
|
|
327
|
+
const i = [];
|
|
328
|
+
if ((!this.max || t < this.max) && t === e + 1 && i.push(this.addIcon(s)), t > this.min && i.push(this.delIcon(e, s)), this.sortBtn) {
|
|
329
|
+
const l = this.sortIcon(e, t);
|
|
330
|
+
l && i.push(...l);
|
|
637
331
|
}
|
|
638
|
-
|
|
639
|
-
var btn = [];
|
|
640
|
-
|
|
641
|
-
if ((!this.max || total < this.max) && total === index + 1) {
|
|
642
|
-
btn.push(this.addIcon(key));
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
if (total > this.min) {
|
|
646
|
-
btn.push(this.delIcon(index, key));
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
if (this.sortBtn) {
|
|
650
|
-
var sortBtn = this.sortIcon(index, total);
|
|
651
|
-
|
|
652
|
-
if (sortBtn) {
|
|
653
|
-
btn.push.apply(btn, _toConsumableArray(sortBtn));
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
return btn;
|
|
332
|
+
return i;
|
|
658
333
|
},
|
|
659
|
-
expandRule
|
|
660
|
-
for (
|
|
334
|
+
expandRule(t) {
|
|
335
|
+
for (let e = 0; e < t; e++)
|
|
661
336
|
this.modelValue.push(this.field ? null : {});
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
this.input(_toConsumableArray(this.modelValue));
|
|
337
|
+
this.input([...this.modelValue]);
|
|
665
338
|
},
|
|
666
|
-
getTitle
|
|
667
|
-
|
|
668
|
-
return this.title(index, this.modelValue[index], key);
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
if (typeof this.title === 'string') {
|
|
672
|
-
return this.title.replace('{index}', index + 1);
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
return false;
|
|
339
|
+
getTitle(t, e) {
|
|
340
|
+
return typeof this.title == "function" ? this.title(t, this.modelValue[t], e) : typeof this.title == "string" ? this.title.replace("{index}", t + 1) : !1;
|
|
676
341
|
}
|
|
677
342
|
},
|
|
678
|
-
created
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
if (d > 0) {
|
|
686
|
-
this.expandRule(d);
|
|
687
|
-
}
|
|
343
|
+
created() {
|
|
344
|
+
const t = (this.expand || 0) - this.modelValue.length;
|
|
345
|
+
for (let e = 0; e < this.modelValue.length; e++)
|
|
346
|
+
this.addRule(e);
|
|
347
|
+
t > 0 && this.expandRule(t);
|
|
688
348
|
},
|
|
689
|
-
render
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
var keys = this.sort;
|
|
693
|
-
var button = this.button;
|
|
694
|
-
var Type = this.form;
|
|
695
|
-
var disabled = this.disabled;
|
|
696
|
-
var isCardType = this.type === 'card';
|
|
697
|
-
var children = keys.length === 0 ? this.$slots["default"] ? this.$slots["default"]({
|
|
349
|
+
render() {
|
|
350
|
+
const t = this.sort, e = this.button, s = this.form, i = this.disabled, l = this.type === "card", o = t.length === 0 ? this.$slots.default ? this.$slots.default({
|
|
698
351
|
vm: this,
|
|
699
352
|
add: this.add
|
|
700
|
-
}) :
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}, null) :
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
inFor: true,
|
|
757
|
-
modelValue: _this14.field ? _defineProperty({}, _this14.field, _this14._value(_this14.modelValue[index])) : _this14.modelValue[index],
|
|
758
|
-
rule: rule,
|
|
759
|
-
option: options,
|
|
760
|
-
extendOption: true
|
|
761
|
-
}), null), createVNode("div", {
|
|
762
|
-
"class": "_fc-group-idx"
|
|
763
|
-
}, [index + 1]), btn.length ? createVNode("div", {
|
|
764
|
-
"class": "_fc-group-handle fc-clock"
|
|
765
|
-
}, [btn]) : null]);
|
|
766
|
-
}
|
|
353
|
+
}) : r("div", {
|
|
354
|
+
key: "a_def",
|
|
355
|
+
class: "_fc-group-plus-minus _fc-group-add fc-clock",
|
|
356
|
+
onClick: this.add
|
|
357
|
+
}, null) : t.map((n, u) => {
|
|
358
|
+
const {
|
|
359
|
+
rule: _,
|
|
360
|
+
options: b
|
|
361
|
+
} = this.cacheRule[n], h = e && !i ? this.makeIcon(t.length, u, n) : [], d = this.getTitle(u, n);
|
|
362
|
+
return l ? r("div", {
|
|
363
|
+
class: "_fc-group-container",
|
|
364
|
+
key: n
|
|
365
|
+
}, [r("div", {
|
|
366
|
+
class: "_fc-group-header"
|
|
367
|
+
}, [d === !1 ? r("div", {
|
|
368
|
+
class: "_fc-group-idx"
|
|
369
|
+
}, [u + 1]) : null, d !== !1 ? r("div", {
|
|
370
|
+
class: "_fc-group-title"
|
|
371
|
+
}, [d]) : null, r("div", {
|
|
372
|
+
class: "_fc-group-handle fc-clock"
|
|
373
|
+
}, [h.length ? h : null])]), r("div", {
|
|
374
|
+
class: "_fc-group-content"
|
|
375
|
+
}, [r(s, j({
|
|
376
|
+
key: n
|
|
377
|
+
}, {
|
|
378
|
+
disabled: i,
|
|
379
|
+
"onUpdate:modelValue": (a) => this.formData(n, a),
|
|
380
|
+
"onUpdate:api": (a) => this.add$f(u, n, a),
|
|
381
|
+
inFor: !0,
|
|
382
|
+
modelValue: this.field ? {
|
|
383
|
+
[this.field]: this._value(this.modelValue[u])
|
|
384
|
+
} : this.modelValue[u],
|
|
385
|
+
rule: _,
|
|
386
|
+
option: b,
|
|
387
|
+
extendOption: !0
|
|
388
|
+
}), null)])]) : r("div", {
|
|
389
|
+
class: "_fc-group-container",
|
|
390
|
+
key: n
|
|
391
|
+
}, [r(s, j({
|
|
392
|
+
key: n
|
|
393
|
+
}, {
|
|
394
|
+
disabled: i,
|
|
395
|
+
"onUpdate:modelValue": (a) => this.formData(n, a),
|
|
396
|
+
"onUpdate:api": (a) => this.add$f(u, n, a),
|
|
397
|
+
inFor: !0,
|
|
398
|
+
modelValue: this.field ? {
|
|
399
|
+
[this.field]: this._value(this.modelValue[u])
|
|
400
|
+
} : this.modelValue[u],
|
|
401
|
+
rule: _,
|
|
402
|
+
option: b,
|
|
403
|
+
extendOption: !0
|
|
404
|
+
}), null), r("div", {
|
|
405
|
+
class: "_fc-group-idx"
|
|
406
|
+
}, [u + 1]), h.length ? r("div", {
|
|
407
|
+
class: "_fc-group-handle fc-clock"
|
|
408
|
+
}, [h]) : null]);
|
|
767
409
|
});
|
|
768
|
-
return
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}, [
|
|
410
|
+
return r("div", {
|
|
411
|
+
key: "con",
|
|
412
|
+
class: "_fc-group " + (i ? "_fc-group-disabled" : "") + (l ? " _fc-group-card" : "")
|
|
413
|
+
}, [o]);
|
|
772
414
|
}
|
|
773
415
|
});
|
|
774
|
-
|
|
775
|
-
|
|
416
|
+
export {
|
|
417
|
+
N as default
|
|
418
|
+
};
|