@tmagic/form 1.0.0-beta.6 → 1.0.0-rc.10
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/README.md +1 -0
- package/dist/style.css +9 -11
- package/dist/tmagic-form.es.js +240 -145
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +243 -149
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Col.vue.d.ts +42 -0
- package/dist/types/src/containers/Container.vue.d.ts +1 -0
- package/dist/types/src/containers/Row.vue.d.ts +0 -1
- package/dist/types/src/fields/Checkbox.vue.d.ts +2 -2
- package/dist/types/src/fields/DynamicField.vue.d.ts +2 -2
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/schema.d.ts +10 -0
- package/package.json +17 -7
- package/src/Form.vue +7 -2
- package/src/FormDialog.vue +1 -1
- package/src/containers/Col.vue +56 -0
- package/src/containers/Container.vue +42 -12
- package/src/containers/GroupListItem.vue +4 -4
- package/src/containers/Row.vue +13 -17
- package/src/containers/Table.vue +15 -7
- package/src/containers/Tabs.vue +13 -5
- package/src/fields/Checkbox.vue +2 -2
- package/src/fields/Daterange.vue +8 -0
- package/src/fields/Link.vue +1 -1
- package/src/fields/Select.vue +11 -15
- package/src/fields/Text.vue +4 -4
- package/src/fields/Textarea.vue +11 -13
- package/src/schema.ts +10 -0
- package/src/theme/form.scss +24 -17
- package/src/utils/form.ts +7 -1
- package/dist/types/src/Form.vue.d.ts +0 -301
- package/dist/types/src/FormDialog.vue.d.ts +0 -638
- package/dist/types/src/containers/Table.vue.d.ts +0 -1403
- package/dist/types/src/fields/Cascader.vue.d.ts +0 -1748
- package/dist/types/src/fields/Link.vue.d.ts +0 -1358
- package/dist/types/src/fields/Select.vue.d.ts +0 -975
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -27
package/dist/tmagic-form.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance, watch, unref, reactive, onBeforeUnmount, vModelText, onBeforeMount, resolveDirective, createSlots, provide } from 'vue';
|
|
1
|
+
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance, watch, unref, reactive, onBeforeUnmount, vModelText, onBeforeMount, resolveDirective, createSlots, withModifiers, provide } from 'vue';
|
|
2
|
+
import { WarningFilled, CaretRight, CaretBottom, Delete, ArrowDown, ArrowUp, FullScreen, Grid } from '@element-plus/icons';
|
|
2
3
|
import { cloneDeep, isEqual } from 'lodash-es';
|
|
3
|
-
import { CaretRight, CaretBottom, Delete, ArrowDown, ArrowUp, FullScreen, Grid } from '@element-plus/icons';
|
|
4
4
|
import { ElMessage } from 'element-plus';
|
|
5
5
|
import Sortable from 'sortablejs';
|
|
6
6
|
import { asyncLoadJs, sleep, datetimeFormatter } from '@tmagic/utils';
|
|
@@ -59,7 +59,11 @@ const initValueItem = function(mForm, item, initValue2, value) {
|
|
|
59
59
|
asyncLoadConfig(value, initValue2, item);
|
|
60
60
|
if (name && !items && typeof initValue2[name] !== "undefined") {
|
|
61
61
|
if (typeof value[name] === "undefined") {
|
|
62
|
-
|
|
62
|
+
if (type === "number") {
|
|
63
|
+
value[name] = Number(initValue2[name]);
|
|
64
|
+
} else {
|
|
65
|
+
value[name] = typeof initValue2[name] === "object" ? cloneDeep(initValue2[name]) : initValue2[name];
|
|
66
|
+
}
|
|
63
67
|
}
|
|
64
68
|
return value;
|
|
65
69
|
}
|
|
@@ -110,7 +114,8 @@ const filterFunction = (mForm, config, props) => {
|
|
|
110
114
|
model: props.model,
|
|
111
115
|
parent: mForm?.parentValues || {},
|
|
112
116
|
formValue: mForm?.values || props.model,
|
|
113
|
-
prop: props.prop
|
|
117
|
+
prop: props.prop,
|
|
118
|
+
config: props.config
|
|
114
119
|
});
|
|
115
120
|
};
|
|
116
121
|
const display = function(mForm, config, props) {
|
|
@@ -141,7 +146,8 @@ const getRules = function(mForm, rules = [], props) {
|
|
|
141
146
|
model: props.model,
|
|
142
147
|
parent: mForm?.parentValues || {},
|
|
143
148
|
formValue: mForm?.values || props.model,
|
|
144
|
-
prop: props.prop
|
|
149
|
+
prop: props.prop,
|
|
150
|
+
config: props.config
|
|
145
151
|
}, mForm);
|
|
146
152
|
}
|
|
147
153
|
return item;
|
|
@@ -169,8 +175,9 @@ var _export_sfc = (sfc, props) => {
|
|
|
169
175
|
return target;
|
|
170
176
|
};
|
|
171
177
|
|
|
172
|
-
const _sfc_main$
|
|
178
|
+
const _sfc_main$t = defineComponent({
|
|
173
179
|
name: "m-form-container",
|
|
180
|
+
components: { WarningFilled },
|
|
174
181
|
props: {
|
|
175
182
|
labelWidth: String,
|
|
176
183
|
expandMore: Boolean,
|
|
@@ -200,7 +207,18 @@ const _sfc_main$s = defineComponent({
|
|
|
200
207
|
const expand = ref(false);
|
|
201
208
|
const name = computed(() => props.config.name || "");
|
|
202
209
|
const items = computed(() => props.config.items);
|
|
203
|
-
const itemProp = computed(() =>
|
|
210
|
+
const itemProp = computed(() => {
|
|
211
|
+
let n = "";
|
|
212
|
+
const { names } = props.config;
|
|
213
|
+
if (names?.[0]) {
|
|
214
|
+
[n] = names;
|
|
215
|
+
} else if (name.value) {
|
|
216
|
+
n = name.value;
|
|
217
|
+
} else {
|
|
218
|
+
return props.prop;
|
|
219
|
+
}
|
|
220
|
+
return `${props.prop}${props.prop ? "." : ""}${n}`;
|
|
221
|
+
});
|
|
204
222
|
const tagName = computed(() => {
|
|
205
223
|
const component = resolveComponent(`m-${items.value ? "form" : "fields"}-${type.value}`);
|
|
206
224
|
if (typeof component !== "string")
|
|
@@ -228,6 +246,7 @@ const _sfc_main$s = defineComponent({
|
|
|
228
246
|
}
|
|
229
247
|
return display(mForm, props.config.display, props);
|
|
230
248
|
});
|
|
249
|
+
const itemLabelWidth = computed(() => props.config.labelWidth || props.labelWidth);
|
|
231
250
|
watchEffect(() => {
|
|
232
251
|
expand.value = props.expandMore;
|
|
233
252
|
});
|
|
@@ -239,7 +258,8 @@ const _sfc_main$s = defineComponent({
|
|
|
239
258
|
model: props.model,
|
|
240
259
|
values: mForm?.initValues,
|
|
241
260
|
formValue: mForm?.values,
|
|
242
|
-
prop: itemProp.value
|
|
261
|
+
prop: itemProp.value,
|
|
262
|
+
config: props.config
|
|
243
263
|
});
|
|
244
264
|
}
|
|
245
265
|
if (filter === "number") {
|
|
@@ -253,7 +273,8 @@ const _sfc_main$s = defineComponent({
|
|
|
253
273
|
model: props.model,
|
|
254
274
|
values: mForm?.initValues,
|
|
255
275
|
formValue: mForm?.values,
|
|
256
|
-
prop: itemProp.value
|
|
276
|
+
prop: itemProp.value,
|
|
277
|
+
config: props.config
|
|
257
278
|
});
|
|
258
279
|
}
|
|
259
280
|
};
|
|
@@ -264,9 +285,14 @@ const _sfc_main$s = defineComponent({
|
|
|
264
285
|
};
|
|
265
286
|
const onChangeHandler = async function(v, key2) {
|
|
266
287
|
const { filter, onChange, trim, name: name2, dynamicKey } = props.config;
|
|
267
|
-
let value =
|
|
268
|
-
|
|
269
|
-
|
|
288
|
+
let value = v;
|
|
289
|
+
try {
|
|
290
|
+
value = filterHandler(filter, v);
|
|
291
|
+
value = await changeHandler(onChange, value) ?? value;
|
|
292
|
+
value = trimHandler(trim, value) ?? value;
|
|
293
|
+
} catch (e) {
|
|
294
|
+
console.error(e);
|
|
295
|
+
}
|
|
270
296
|
if ((name2 || name2 === 0) && props.model !== value && (v !== value || props.model[name2] !== value)) {
|
|
271
297
|
props.model[name2] = value;
|
|
272
298
|
}
|
|
@@ -283,6 +309,7 @@ const _sfc_main$s = defineComponent({
|
|
|
283
309
|
itemProp,
|
|
284
310
|
items,
|
|
285
311
|
display: display$1,
|
|
312
|
+
itemLabelWidth,
|
|
286
313
|
tagName,
|
|
287
314
|
rule,
|
|
288
315
|
tooltip,
|
|
@@ -293,24 +320,25 @@ const _sfc_main$s = defineComponent({
|
|
|
293
320
|
};
|
|
294
321
|
}
|
|
295
322
|
});
|
|
296
|
-
const _hoisted_1$
|
|
323
|
+
const _hoisted_1$f = ["innerHTML"];
|
|
297
324
|
const _hoisted_2$7 = ["innerHTML"];
|
|
298
325
|
const _hoisted_3$7 = ["innerHTML"];
|
|
299
|
-
const _hoisted_4$6 =
|
|
300
|
-
const _hoisted_5$4 =
|
|
301
|
-
const _hoisted_6$3 = {
|
|
326
|
+
const _hoisted_4$6 = ["innerHTML"];
|
|
327
|
+
const _hoisted_5$4 = {
|
|
302
328
|
key: 4,
|
|
303
329
|
style: { "text-align": "center" }
|
|
304
330
|
};
|
|
305
|
-
function _sfc_render$
|
|
331
|
+
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
306
332
|
const _component_m_fields_hidden = resolveComponent("m-fields-hidden");
|
|
307
333
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
308
334
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
335
|
+
const _component_warning_filled = resolveComponent("warning-filled");
|
|
336
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
309
337
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
310
338
|
const _component_el_button = resolveComponent("el-button");
|
|
311
339
|
return _ctx.config ? (openBlock(), createElementBlock("div", {
|
|
312
340
|
key: 0,
|
|
313
|
-
style: normalizeStyle(_ctx.config.tip ? "display: flex" : ""),
|
|
341
|
+
style: normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
|
|
314
342
|
class: normalizeClass([_ctx.config.className, "m-form-container"])
|
|
315
343
|
}, [
|
|
316
344
|
_ctx.type === "hidden" ? (openBlock(), createBlock(_component_m_fields_hidden, {
|
|
@@ -329,19 +357,20 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
329
357
|
prop: _ctx.itemProp,
|
|
330
358
|
"step-active": _ctx.stepActive,
|
|
331
359
|
"expand-more": _ctx.expand,
|
|
332
|
-
"label-width": _ctx.
|
|
360
|
+
"label-width": _ctx.itemLabelWidth,
|
|
333
361
|
onChange: _ctx.onChangeHandler
|
|
334
|
-
}, null,
|
|
362
|
+
}, null, 40, ["size", "model", "config", "name", "prop", "step-active", "expand-more", "label-width", "onChange"])) : _ctx.type && _ctx.display ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
335
363
|
createVNode(_component_el_form_item, {
|
|
336
364
|
style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
365
|
+
class: normalizeClass({ hidden: `${_ctx.itemLabelWidth}` === "0" || !_ctx.config.text }),
|
|
337
366
|
prop: _ctx.itemProp,
|
|
338
|
-
"label-width": _ctx.
|
|
367
|
+
"label-width": _ctx.itemLabelWidth,
|
|
339
368
|
rules: _ctx.rule
|
|
340
369
|
}, {
|
|
341
370
|
label: withCtx(() => [
|
|
342
371
|
createElementVNode("span", {
|
|
343
372
|
innerHTML: _ctx.type === "checkbox" ? "" : _ctx.config.text
|
|
344
|
-
}, null, 8, _hoisted_1$
|
|
373
|
+
}, null, 8, _hoisted_1$f)
|
|
345
374
|
]),
|
|
346
375
|
default: withCtx(() => [
|
|
347
376
|
_ctx.tooltip ? (openBlock(), createBlock(_component_el_tooltip, { key: 0 }, {
|
|
@@ -358,7 +387,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
358
387
|
disabled: _ctx.disabled,
|
|
359
388
|
prop: _ctx.itemProp,
|
|
360
389
|
onChange: _ctx.onChangeHandler
|
|
361
|
-
}, null,
|
|
390
|
+
}, null, 40, ["size", "model", "config", "name", "disabled", "prop", "onChange"]))
|
|
362
391
|
]),
|
|
363
392
|
_: 1
|
|
364
393
|
})) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
|
|
@@ -370,7 +399,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
370
399
|
disabled: _ctx.disabled,
|
|
371
400
|
prop: _ctx.itemProp,
|
|
372
401
|
onChange: _ctx.onChangeHandler
|
|
373
|
-
}, null,
|
|
402
|
+
}, null, 40, ["size", "model", "config", "name", "disabled", "prop", "onChange"])),
|
|
374
403
|
_ctx.extra ? (openBlock(), createElementBlock("div", {
|
|
375
404
|
key: 2,
|
|
376
405
|
innerHTML: _ctx.extra,
|
|
@@ -378,19 +407,23 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
378
407
|
}, null, 8, _hoisted_3$7)) : createCommentVNode("", true)
|
|
379
408
|
]),
|
|
380
409
|
_: 1
|
|
381
|
-
}, 8, ["style", "prop", "label-width", "rules"]),
|
|
410
|
+
}, 8, ["style", "class", "prop", "label-width", "rules"]),
|
|
382
411
|
_ctx.config.tip ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
383
412
|
key: 0,
|
|
384
|
-
placement: "
|
|
385
|
-
style: { "line-height": "40px", "margin-left": "5px" }
|
|
413
|
+
placement: "left"
|
|
386
414
|
}, {
|
|
387
415
|
content: withCtx(() => [
|
|
388
416
|
createElementVNode("div", {
|
|
389
417
|
innerHTML: _ctx.config.tip
|
|
390
|
-
}, null, 8,
|
|
418
|
+
}, null, 8, _hoisted_4$6)
|
|
391
419
|
]),
|
|
392
420
|
default: withCtx(() => [
|
|
393
|
-
|
|
421
|
+
createVNode(_component_el_icon, { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
422
|
+
default: withCtx(() => [
|
|
423
|
+
createVNode(_component_warning_filled)
|
|
424
|
+
]),
|
|
425
|
+
_: 1
|
|
426
|
+
})
|
|
394
427
|
]),
|
|
395
428
|
_: 1
|
|
396
429
|
})) : createCommentVNode("", true)
|
|
@@ -403,15 +436,15 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
403
436
|
size: _ctx.size,
|
|
404
437
|
"step-active": _ctx.stepActive,
|
|
405
438
|
"expand-more": _ctx.expand,
|
|
406
|
-
"label-width": _ctx.
|
|
439
|
+
"label-width": _ctx.itemLabelWidth,
|
|
407
440
|
prop: _ctx.itemProp,
|
|
408
441
|
onChange: _ctx.onChangeHandler
|
|
409
442
|
}, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop", "onChange"]);
|
|
410
443
|
}), 128)) : createCommentVNode("", true)
|
|
411
444
|
], 64)) : createCommentVNode("", true),
|
|
412
|
-
_ctx.config.expand && _ctx.type !== "fieldset" ? (openBlock(), createElementBlock("div",
|
|
445
|
+
_ctx.config.expand && _ctx.type !== "fieldset" ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
413
446
|
createVNode(_component_el_button, {
|
|
414
|
-
|
|
447
|
+
text: "",
|
|
415
448
|
onClick: _ctx.expandHandler
|
|
416
449
|
}, {
|
|
417
450
|
default: withCtx(() => [
|
|
@@ -422,9 +455,9 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
422
455
|
])) : createCommentVNode("", true)
|
|
423
456
|
], 6)) : createCommentVNode("", true);
|
|
424
457
|
}
|
|
425
|
-
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
458
|
+
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
|
|
426
459
|
|
|
427
|
-
const _sfc_main$
|
|
460
|
+
const _sfc_main$s = defineComponent({
|
|
428
461
|
name: "m-form-fieldset",
|
|
429
462
|
props: {
|
|
430
463
|
labelWidth: String,
|
|
@@ -476,7 +509,7 @@ const _sfc_main$r = defineComponent({
|
|
|
476
509
|
};
|
|
477
510
|
}
|
|
478
511
|
});
|
|
479
|
-
const _hoisted_1$
|
|
512
|
+
const _hoisted_1$e = ["innerHTML"];
|
|
480
513
|
const _hoisted_2$6 = ["innerHTML"];
|
|
481
514
|
const _hoisted_3$6 = { key: 1 };
|
|
482
515
|
const _hoisted_4$5 = ["innerHTML"];
|
|
@@ -490,7 +523,7 @@ const _hoisted_9$1 = {
|
|
|
490
523
|
};
|
|
491
524
|
const _hoisted_10$1 = { style: { "flex": "1" } };
|
|
492
525
|
const _hoisted_11 = ["src"];
|
|
493
|
-
function _sfc_render$
|
|
526
|
+
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
494
527
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
495
528
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
496
529
|
return (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model) ? (openBlock(), createElementBlock("fieldset", {
|
|
@@ -510,7 +543,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
510
543
|
default: withCtx(() => [
|
|
511
544
|
createElementVNode("span", {
|
|
512
545
|
innerHTML: _ctx.config.legend
|
|
513
|
-
}, null, 8, _hoisted_1$
|
|
546
|
+
}, null, 8, _hoisted_1$e),
|
|
514
547
|
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
515
548
|
key: 0,
|
|
516
549
|
innerHTML: _ctx.config.extra,
|
|
@@ -582,9 +615,9 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
582
615
|
}), 128)) : createCommentVNode("", true)
|
|
583
616
|
], 4)) : createCommentVNode("", true);
|
|
584
617
|
}
|
|
585
|
-
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
618
|
+
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
|
|
586
619
|
|
|
587
|
-
const _sfc_main$
|
|
620
|
+
const _sfc_main$r = defineComponent({
|
|
588
621
|
name: "m-form-group-list-item",
|
|
589
622
|
components: { CaretRight, CaretBottom },
|
|
590
623
|
props: {
|
|
@@ -668,11 +701,11 @@ const _sfc_main$q = defineComponent({
|
|
|
668
701
|
};
|
|
669
702
|
}
|
|
670
703
|
});
|
|
671
|
-
const _hoisted_1$
|
|
704
|
+
const _hoisted_1$d = { class: "m-fields-group-list-item" };
|
|
672
705
|
const _hoisted_2$5 = /* @__PURE__ */ createTextVNode("\u4E0A\u79FB");
|
|
673
706
|
const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("\u4E0B\u79FB");
|
|
674
707
|
const _hoisted_4$4 = ["innerHTML"];
|
|
675
|
-
function _sfc_render$
|
|
708
|
+
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
676
709
|
const _component_caret_bottom = resolveComponent("caret-bottom");
|
|
677
710
|
const _component_caret_right = resolveComponent("caret-right");
|
|
678
711
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -680,7 +713,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
680
713
|
const _component_CaretRight = resolveComponent("CaretRight");
|
|
681
714
|
const _component_CaretBottom = resolveComponent("CaretBottom");
|
|
682
715
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
683
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
716
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
684
717
|
createElementVNode("div", null, [
|
|
685
718
|
createVNode(_component_el_icon, {
|
|
686
719
|
style: { "margin-right": "7px" },
|
|
@@ -692,7 +725,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
692
725
|
_: 1
|
|
693
726
|
}, 8, ["onClick"]),
|
|
694
727
|
createVNode(_component_el_button, {
|
|
695
|
-
|
|
728
|
+
text: "",
|
|
696
729
|
onClick: _ctx.expandHandler
|
|
697
730
|
}, {
|
|
698
731
|
default: withCtx(() => [
|
|
@@ -701,7 +734,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
701
734
|
_: 1
|
|
702
735
|
}, 8, ["onClick"]),
|
|
703
736
|
withDirectives(createVNode(_component_el_button, {
|
|
704
|
-
|
|
737
|
+
text: "",
|
|
705
738
|
icon: _ctx.Delete,
|
|
706
739
|
style: { "color": "#f56c6c" },
|
|
707
740
|
onClick: _ctx.removeHandler
|
|
@@ -710,7 +743,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
710
743
|
]),
|
|
711
744
|
_ctx.movable() ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
712
745
|
withDirectives(createVNode(_component_el_button, {
|
|
713
|
-
|
|
746
|
+
text: "",
|
|
714
747
|
size: "small",
|
|
715
748
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.changeOrder(-1))
|
|
716
749
|
}, {
|
|
@@ -728,7 +761,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
728
761
|
[vShow, _ctx.index !== 0]
|
|
729
762
|
]),
|
|
730
763
|
withDirectives(createVNode(_component_el_button, {
|
|
731
|
-
|
|
764
|
+
text: "",
|
|
732
765
|
size: "small",
|
|
733
766
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.changeOrder(1))
|
|
734
767
|
}, {
|
|
@@ -763,9 +796,9 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
763
796
|
}, null, 8, ["config", "model", "labelWidth", "prop", "size", "onChange"])) : createCommentVNode("", true)
|
|
764
797
|
]);
|
|
765
798
|
}
|
|
766
|
-
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
799
|
+
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
|
|
767
800
|
|
|
768
|
-
const _sfc_main$
|
|
801
|
+
const _sfc_main$q = defineComponent({
|
|
769
802
|
name: "m-form-group-list",
|
|
770
803
|
components: { MFieldsGroupListItem },
|
|
771
804
|
props: {
|
|
@@ -857,7 +890,7 @@ const _sfc_main$p = defineComponent({
|
|
|
857
890
|
};
|
|
858
891
|
}
|
|
859
892
|
});
|
|
860
|
-
const _hoisted_1$
|
|
893
|
+
const _hoisted_1$c = { class: "m-fields-group-list" };
|
|
861
894
|
const _hoisted_2$4 = ["innerHTML"];
|
|
862
895
|
const _hoisted_3$4 = {
|
|
863
896
|
key: 1,
|
|
@@ -869,10 +902,10 @@ const _hoisted_5$2 = [
|
|
|
869
902
|
];
|
|
870
903
|
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
871
904
|
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u5207\u6362\u4E3A\u8868\u683C");
|
|
872
|
-
function _sfc_render$
|
|
905
|
+
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
873
906
|
const _component_m_fields_group_list_item = resolveComponent("m-fields-group-list-item");
|
|
874
907
|
const _component_el_button = resolveComponent("el-button");
|
|
875
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
908
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
876
909
|
_ctx.config.extra ? (openBlock(), createElementBlock("div", {
|
|
877
910
|
key: 0,
|
|
878
911
|
innerHTML: _ctx.config.extra,
|
|
@@ -916,9 +949,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
916
949
|
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
917
950
|
]);
|
|
918
951
|
}
|
|
919
|
-
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
952
|
+
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
|
|
920
953
|
|
|
921
|
-
const _sfc_main$
|
|
954
|
+
const _sfc_main$p = defineComponent({
|
|
922
955
|
name: "m-form-panel",
|
|
923
956
|
components: { CaretBottom, CaretRight },
|
|
924
957
|
props: {
|
|
@@ -951,7 +984,7 @@ const _sfc_main$o = defineComponent({
|
|
|
951
984
|
};
|
|
952
985
|
}
|
|
953
986
|
});
|
|
954
|
-
const _hoisted_1$
|
|
987
|
+
const _hoisted_1$b = { class: "clearfix" };
|
|
955
988
|
const _hoisted_2$3 = ["innerHTML"];
|
|
956
989
|
const _hoisted_3$3 = {
|
|
957
990
|
key: 0,
|
|
@@ -959,7 +992,7 @@ const _hoisted_3$3 = {
|
|
|
959
992
|
};
|
|
960
993
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
961
994
|
const _hoisted_5$1 = ["src"];
|
|
962
|
-
function _sfc_render$
|
|
995
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
963
996
|
const _component_caret_bottom = resolveComponent("caret-bottom");
|
|
964
997
|
const _component_caret_right = resolveComponent("caret-right");
|
|
965
998
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -971,7 +1004,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
971
1004
|
"body-style": { display: _ctx.expand ? "block" : "none" }
|
|
972
1005
|
}, {
|
|
973
1006
|
header: withCtx(() => [
|
|
974
|
-
createElementVNode("div", _hoisted_1$
|
|
1007
|
+
createElementVNode("div", _hoisted_1$b, [
|
|
975
1008
|
createElementVNode("a", {
|
|
976
1009
|
href: "javascript:",
|
|
977
1010
|
style: { "width": "100%", "display": "block" },
|
|
@@ -1029,10 +1062,60 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1029
1062
|
_: 3
|
|
1030
1063
|
}, 8, ["body-style"])) : createCommentVNode("", true);
|
|
1031
1064
|
}
|
|
1032
|
-
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1065
|
+
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
|
|
1066
|
+
|
|
1067
|
+
const _sfc_main$o = defineComponent({
|
|
1068
|
+
props: {
|
|
1069
|
+
labelWidth: String,
|
|
1070
|
+
expandMore: Boolean,
|
|
1071
|
+
span: Number,
|
|
1072
|
+
model: {
|
|
1073
|
+
type: Object,
|
|
1074
|
+
default: () => ({})
|
|
1075
|
+
},
|
|
1076
|
+
config: {
|
|
1077
|
+
type: Object,
|
|
1078
|
+
default: () => ({})
|
|
1079
|
+
},
|
|
1080
|
+
prop: String,
|
|
1081
|
+
size: String
|
|
1082
|
+
},
|
|
1083
|
+
emits: ["change"],
|
|
1084
|
+
setup(props, { emit }) {
|
|
1085
|
+
const mForm = inject("mForm");
|
|
1086
|
+
const changeHandler = () => emit("change", props.model);
|
|
1087
|
+
return {
|
|
1088
|
+
mForm,
|
|
1089
|
+
display: computed(() => display(mForm, props.config.display, props)),
|
|
1090
|
+
changeHandler
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1095
|
+
const _component_m_form_container = resolveComponent("m-form-container");
|
|
1096
|
+
const _component_el_col = resolveComponent("el-col");
|
|
1097
|
+
return withDirectives((openBlock(), createBlock(_component_el_col, { span: _ctx.span }, {
|
|
1098
|
+
default: withCtx(() => [
|
|
1099
|
+
createVNode(_component_m_form_container, {
|
|
1100
|
+
model: _ctx.model,
|
|
1101
|
+
config: _ctx.config,
|
|
1102
|
+
prop: _ctx.prop,
|
|
1103
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1104
|
+
"expand-more": _ctx.expandMore,
|
|
1105
|
+
size: _ctx.size,
|
|
1106
|
+
onChange: _ctx.changeHandler
|
|
1107
|
+
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "onChange"])
|
|
1108
|
+
]),
|
|
1109
|
+
_: 1
|
|
1110
|
+
}, 8, ["span"])), [
|
|
1111
|
+
[vShow, _ctx.display && _ctx.config.type !== "hidden"]
|
|
1112
|
+
]);
|
|
1113
|
+
}
|
|
1114
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$l]]);
|
|
1033
1115
|
|
|
1034
1116
|
const _sfc_main$n = defineComponent({
|
|
1035
1117
|
name: "m-form-row",
|
|
1118
|
+
components: { Col },
|
|
1036
1119
|
props: {
|
|
1037
1120
|
labelWidth: String,
|
|
1038
1121
|
expandMore: Boolean,
|
|
@@ -1054,38 +1137,27 @@ const _sfc_main$n = defineComponent({
|
|
|
1054
1137
|
const changeHandler = () => emit("change", props.name ? props.model[props.name] : props.model);
|
|
1055
1138
|
return {
|
|
1056
1139
|
mForm,
|
|
1057
|
-
display(config) {
|
|
1058
|
-
return display(mForm, config.display, props);
|
|
1059
|
-
},
|
|
1060
1140
|
changeHandler
|
|
1061
1141
|
};
|
|
1062
1142
|
}
|
|
1063
1143
|
});
|
|
1064
1144
|
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1065
|
-
const
|
|
1066
|
-
const _component_el_col = resolveComponent("el-col");
|
|
1145
|
+
const _component_Col = resolveComponent("Col");
|
|
1067
1146
|
const _component_el_row = resolveComponent("el-row");
|
|
1068
1147
|
return openBlock(), createBlock(_component_el_row, { gutter: 10 }, {
|
|
1069
1148
|
default: withCtx(() => [
|
|
1070
1149
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
|
|
1071
|
-
return openBlock(), createBlock(
|
|
1072
|
-
style: normalizeStyle(!_ctx.display(col) || col.type === "hidden" ? "display: none" : ""),
|
|
1150
|
+
return openBlock(), createBlock(_component_Col, {
|
|
1073
1151
|
key: col[_ctx.mForm?.keyProp || "__key"] ?? index,
|
|
1074
|
-
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
size: _ctx.size,
|
|
1084
|
-
onChange: _ctx.changeHandler
|
|
1085
|
-
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "onChange"])
|
|
1086
|
-
]),
|
|
1087
|
-
_: 2
|
|
1088
|
-
}, 1032, ["style", "span"]);
|
|
1152
|
+
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1153
|
+
config: col,
|
|
1154
|
+
labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1155
|
+
expandMore: _ctx.expandMore,
|
|
1156
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1157
|
+
prop: _ctx.prop,
|
|
1158
|
+
size: _ctx.size,
|
|
1159
|
+
onChange: _ctx.changeHandler
|
|
1160
|
+
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "prop", "size", "onChange"]);
|
|
1089
1161
|
}), 128))
|
|
1090
1162
|
]),
|
|
1091
1163
|
_: 1
|
|
@@ -1418,7 +1490,7 @@ const _sfc_main$l = defineComponent({
|
|
|
1418
1490
|
}
|
|
1419
1491
|
emit("select", selection, row);
|
|
1420
1492
|
if (typeof props.config.onSelect === "function") {
|
|
1421
|
-
props.config.onSelect(mForm, { selection, row });
|
|
1493
|
+
props.config.onSelect(mForm, { selection, row, config: props.config });
|
|
1422
1494
|
}
|
|
1423
1495
|
},
|
|
1424
1496
|
toggleRowSelection(row, selected) {
|
|
@@ -1544,7 +1616,7 @@ const _sfc_main$l = defineComponent({
|
|
|
1544
1616
|
};
|
|
1545
1617
|
}
|
|
1546
1618
|
});
|
|
1547
|
-
const _hoisted_1$
|
|
1619
|
+
const _hoisted_1$a = ["innerHTML"];
|
|
1548
1620
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1549
1621
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1550
1622
|
const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0");
|
|
@@ -1573,7 +1645,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1573
1645
|
key: 0,
|
|
1574
1646
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1575
1647
|
innerHTML: _ctx.config.extra
|
|
1576
|
-
}, null, 8, _hoisted_1$
|
|
1648
|
+
}, null, 8, _hoisted_1$a)) : createCommentVNode("", true),
|
|
1577
1649
|
createElementVNode("div", _hoisted_2$2, [
|
|
1578
1650
|
createVNode(_component_el_tooltip, {
|
|
1579
1651
|
content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
|
|
@@ -1614,8 +1686,8 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1614
1686
|
}, {
|
|
1615
1687
|
default: withCtx((scope) => [
|
|
1616
1688
|
withDirectives(createVNode(_component_el_button, {
|
|
1617
|
-
|
|
1618
|
-
|
|
1689
|
+
type: "danger",
|
|
1690
|
+
text: "",
|
|
1619
1691
|
icon: _ctx.Delete,
|
|
1620
1692
|
onClick: ($event) => _ctx.removeHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1)
|
|
1621
1693
|
}, null, 8, ["icon", "onClick"]), [
|
|
@@ -1639,8 +1711,9 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1639
1711
|
createVNode(_component_el_button, {
|
|
1640
1712
|
plain: "",
|
|
1641
1713
|
size: "small",
|
|
1714
|
+
type: "primary",
|
|
1642
1715
|
icon: _ctx.ArrowUp,
|
|
1643
|
-
|
|
1716
|
+
text: "",
|
|
1644
1717
|
onClick: ($event) => _ctx.upHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1),
|
|
1645
1718
|
onDblclick: ($event) => _ctx.topHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1)
|
|
1646
1719
|
}, null, 8, ["icon", "onClick", "onDblclick"])
|
|
@@ -1656,8 +1729,9 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1656
1729
|
createVNode(_component_el_button, {
|
|
1657
1730
|
plain: "",
|
|
1658
1731
|
size: "small",
|
|
1732
|
+
type: "primary",
|
|
1659
1733
|
icon: _ctx.ArrowDown,
|
|
1660
|
-
|
|
1734
|
+
text: "",
|
|
1661
1735
|
onClick: ($event) => _ctx.downHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1),
|
|
1662
1736
|
onDblclick: ($event) => _ctx.bottomHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1)
|
|
1663
1737
|
}, null, 8, ["icon", "onClick", "onDblclick"])
|
|
@@ -1734,6 +1808,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1734
1808
|
key: 1,
|
|
1735
1809
|
icon: _ctx.Grid,
|
|
1736
1810
|
size: "small",
|
|
1811
|
+
type: "primary",
|
|
1737
1812
|
onClick: _ctx.toggleMode
|
|
1738
1813
|
}, {
|
|
1739
1814
|
default: withCtx(() => [
|
|
@@ -1745,6 +1820,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1745
1820
|
key: 2,
|
|
1746
1821
|
icon: _ctx.FullScreen,
|
|
1747
1822
|
size: "small",
|
|
1823
|
+
type: "primary",
|
|
1748
1824
|
onClick: _ctx.toggleFullscreen
|
|
1749
1825
|
}, {
|
|
1750
1826
|
default: withCtx(() => [
|
|
@@ -1819,11 +1895,11 @@ const tabClickHandler = (mForm, tab, props) => {
|
|
|
1819
1895
|
const { config, model, prop } = props;
|
|
1820
1896
|
tab.name = tab.paneName;
|
|
1821
1897
|
if (typeof config.onTabClick === "function") {
|
|
1822
|
-
config.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop });
|
|
1898
|
+
config.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop, config });
|
|
1823
1899
|
}
|
|
1824
1900
|
const tabConfig = config.items.find((item) => tab.name === item.status);
|
|
1825
1901
|
if (tabConfig && typeof tabConfig.onTabClick === "function") {
|
|
1826
|
-
tabConfig.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop });
|
|
1902
|
+
tabConfig.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop, config });
|
|
1827
1903
|
}
|
|
1828
1904
|
};
|
|
1829
1905
|
const Tab = defineComponent({
|
|
@@ -1878,7 +1954,11 @@ const Tab = defineComponent({
|
|
|
1878
1954
|
if (!props.config.name)
|
|
1879
1955
|
throw new Error("dynamic tab \u5FC5\u987B\u914D\u7F6Ename");
|
|
1880
1956
|
if (typeof props.config.onTabAdd === "function") {
|
|
1881
|
-
props.config.onTabAdd(mForm, {
|
|
1957
|
+
props.config.onTabAdd(mForm, {
|
|
1958
|
+
model: props.model,
|
|
1959
|
+
prop: props.prop,
|
|
1960
|
+
config: props.config
|
|
1961
|
+
});
|
|
1882
1962
|
} else if (tabs.value.length > 0) {
|
|
1883
1963
|
const newObj = cloneDeep(tabs.value[0]);
|
|
1884
1964
|
newObj.title = `\u6807\u7B7E${tabs.value.length + 1}`;
|
|
@@ -1891,7 +1971,11 @@ const Tab = defineComponent({
|
|
|
1891
1971
|
if (!props.config.name)
|
|
1892
1972
|
throw new Error("dynamic tab \u5FC5\u987B\u914D\u7F6Ename");
|
|
1893
1973
|
if (typeof props.config.onTabRemove === "function") {
|
|
1894
|
-
props.config.onTabRemove(mForm, tabName, {
|
|
1974
|
+
props.config.onTabRemove(mForm, tabName, {
|
|
1975
|
+
model: props.model,
|
|
1976
|
+
prop: props.prop,
|
|
1977
|
+
config: props.config
|
|
1978
|
+
});
|
|
1895
1979
|
} else {
|
|
1896
1980
|
props.model[props.config.name].splice(+tabName, 1);
|
|
1897
1981
|
if (tabName < activeTabName.value || activeTabName.value >= props.model[props.config.name].length) {
|
|
@@ -1906,7 +1990,7 @@ const Tab = defineComponent({
|
|
|
1906
1990
|
changeHandler: () => {
|
|
1907
1991
|
emit("change", props.model);
|
|
1908
1992
|
if (typeof props.config.onChange === "function") {
|
|
1909
|
-
props.config.onChange(mForm, { model: props.model });
|
|
1993
|
+
props.config.onChange(mForm, { model: props.model, prop: props.prop, config: props.config });
|
|
1910
1994
|
}
|
|
1911
1995
|
}
|
|
1912
1996
|
};
|
|
@@ -2095,13 +2179,13 @@ const _sfc_main$j = defineComponent({
|
|
|
2095
2179
|
};
|
|
2096
2180
|
}
|
|
2097
2181
|
});
|
|
2098
|
-
const _hoisted_1$
|
|
2182
|
+
const _hoisted_1$9 = {
|
|
2099
2183
|
class: "m-cascader",
|
|
2100
2184
|
style: { "width": "100%" }
|
|
2101
2185
|
};
|
|
2102
2186
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2103
2187
|
const _component_el_cascader = resolveComponent("el-cascader");
|
|
2104
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2188
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2105
2189
|
createVNode(_component_el_cascader, {
|
|
2106
2190
|
modelValue: _ctx.model[_ctx.name],
|
|
2107
2191
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2141,7 +2225,7 @@ const _sfc_main$i = defineComponent({
|
|
|
2141
2225
|
} else {
|
|
2142
2226
|
return props.config.activeValue;
|
|
2143
2227
|
}
|
|
2144
|
-
return
|
|
2228
|
+
return void 0;
|
|
2145
2229
|
}),
|
|
2146
2230
|
inactiveValue: computed(() => {
|
|
2147
2231
|
if (typeof props.config.inactiveValue === "undefined") {
|
|
@@ -2151,7 +2235,7 @@ const _sfc_main$i = defineComponent({
|
|
|
2151
2235
|
} else {
|
|
2152
2236
|
return props.config.inactiveValue;
|
|
2153
2237
|
}
|
|
2154
|
-
return
|
|
2238
|
+
return void 0;
|
|
2155
2239
|
}),
|
|
2156
2240
|
changeHandler(value) {
|
|
2157
2241
|
emit("change", value);
|
|
@@ -2224,7 +2308,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2224
2308
|
}
|
|
2225
2309
|
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$e]]);
|
|
2226
2310
|
|
|
2227
|
-
const _hoisted_1$
|
|
2311
|
+
const _hoisted_1$8 = { key: 0 };
|
|
2228
2312
|
const __default__$2 = defineComponent({
|
|
2229
2313
|
name: "m-fields-color-picker"
|
|
2230
2314
|
});
|
|
@@ -2244,7 +2328,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2244
2328
|
const changeHandler = (value) => emit("change", value);
|
|
2245
2329
|
return (_ctx, _cache) => {
|
|
2246
2330
|
const _component_el_color_picker = resolveComponent("el-color-picker");
|
|
2247
|
-
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2331
|
+
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2248
2332
|
createVNode(_component_el_color_picker, {
|
|
2249
2333
|
modelValue: _ctx.model[_ctx.name],
|
|
2250
2334
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2280,10 +2364,10 @@ const _sfc_main$f = defineComponent({
|
|
|
2280
2364
|
};
|
|
2281
2365
|
}
|
|
2282
2366
|
});
|
|
2283
|
-
const _hoisted_1$
|
|
2367
|
+
const _hoisted_1$7 = { key: 0 };
|
|
2284
2368
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2285
2369
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
2286
|
-
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2370
|
+
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2287
2371
|
createVNode(_component_el_date_picker, {
|
|
2288
2372
|
modelValue: _ctx.model[_ctx.modelName],
|
|
2289
2373
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.modelName] = $event),
|
|
@@ -2329,6 +2413,14 @@ const _sfc_main$e = defineComponent({
|
|
|
2329
2413
|
});
|
|
2330
2414
|
} else if (props.model && props.name && v instanceof Date) {
|
|
2331
2415
|
props.model[props.name] = datetimeFormatter(v.toString(), "");
|
|
2416
|
+
} else if (names?.length) {
|
|
2417
|
+
names.forEach((item) => {
|
|
2418
|
+
if (props.model) {
|
|
2419
|
+
props.model[item] = void 0;
|
|
2420
|
+
}
|
|
2421
|
+
});
|
|
2422
|
+
} else if (props.name) {
|
|
2423
|
+
props.model[props.name] = void 0;
|
|
2332
2424
|
}
|
|
2333
2425
|
};
|
|
2334
2426
|
return {
|
|
@@ -2387,10 +2479,10 @@ const _sfc_main$d = defineComponent({
|
|
|
2387
2479
|
};
|
|
2388
2480
|
}
|
|
2389
2481
|
});
|
|
2390
|
-
const _hoisted_1$
|
|
2482
|
+
const _hoisted_1$6 = { key: 0 };
|
|
2391
2483
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2392
2484
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
2393
|
-
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2485
|
+
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
2394
2486
|
createVNode(_component_el_date_picker, {
|
|
2395
2487
|
modelValue: _ctx.model[_ctx.name],
|
|
2396
2488
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2407,7 +2499,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2407
2499
|
}
|
|
2408
2500
|
var DateTime = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
|
|
2409
2501
|
|
|
2410
|
-
const _hoisted_1$
|
|
2502
|
+
const _hoisted_1$5 = { key: 0 };
|
|
2411
2503
|
const __default__$1 = defineComponent({
|
|
2412
2504
|
name: "m-fields-display"
|
|
2413
2505
|
});
|
|
@@ -2428,7 +2520,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2428
2520
|
}
|
|
2429
2521
|
useAddField(props.prop);
|
|
2430
2522
|
return (_ctx, _cache) => {
|
|
2431
|
-
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2523
|
+
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(_ctx.model[unref(n)]), 1)) : createCommentVNode("", true);
|
|
2432
2524
|
};
|
|
2433
2525
|
}
|
|
2434
2526
|
});
|
|
@@ -2498,12 +2590,12 @@ const _sfc_main$b = defineComponent({
|
|
|
2498
2590
|
}
|
|
2499
2591
|
}
|
|
2500
2592
|
});
|
|
2501
|
-
const _hoisted_1$
|
|
2593
|
+
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2502
2594
|
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2503
2595
|
const _component_el_input = resolveComponent("el-input");
|
|
2504
2596
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
2505
2597
|
const _component_el_form = resolveComponent("el-form");
|
|
2506
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2598
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
2507
2599
|
createVNode(_component_el_form, { size: "small" }, {
|
|
2508
2600
|
default: withCtx(() => [
|
|
2509
2601
|
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(_ctx.fieldMap.value), (key) => {
|
|
@@ -2625,7 +2717,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
2625
2717
|
};
|
|
2626
2718
|
}
|
|
2627
2719
|
});
|
|
2628
|
-
const _hoisted_1$
|
|
2720
|
+
const _hoisted_1$3 = ["href"];
|
|
2629
2721
|
const _hoisted_2$1 = {
|
|
2630
2722
|
key: 2,
|
|
2631
2723
|
class: "m-fields-link"
|
|
@@ -2639,12 +2731,13 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2639
2731
|
target: "_blank",
|
|
2640
2732
|
href: _ctx.href,
|
|
2641
2733
|
style: normalizeStyle(_ctx.config.css || {})
|
|
2642
|
-
}, toDisplayString(_ctx.displayText), 13, _hoisted_1$
|
|
2734
|
+
}, toDisplayString(_ctx.displayText), 13, _hoisted_1$3)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
2643
2735
|
key: 1,
|
|
2644
2736
|
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
2645
2737
|
}, toDisplayString(_ctx.displayText), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
2646
2738
|
createVNode(_component_el_button, {
|
|
2647
|
-
|
|
2739
|
+
text: "",
|
|
2740
|
+
type: "primary",
|
|
2648
2741
|
onClick: _ctx.editHandler
|
|
2649
2742
|
}, {
|
|
2650
2743
|
default: withCtx(() => [
|
|
@@ -2824,7 +2917,8 @@ const _sfc_main$6 = defineComponent({
|
|
|
2824
2917
|
body = body(mForm, {
|
|
2825
2918
|
model: props.model,
|
|
2826
2919
|
formValue: mForm?.values,
|
|
2827
|
-
formValues: mForm?.values
|
|
2920
|
+
formValues: mForm?.values,
|
|
2921
|
+
config: props.config
|
|
2828
2922
|
});
|
|
2829
2923
|
}
|
|
2830
2924
|
body.query = query.value;
|
|
@@ -2847,7 +2941,8 @@ const _sfc_main$6 = defineComponent({
|
|
|
2847
2941
|
res = option.afterRequest(mForm, res, {
|
|
2848
2942
|
model: props.model,
|
|
2849
2943
|
formValue: mForm?.values,
|
|
2850
|
-
formValues: mForm?.values
|
|
2944
|
+
formValues: mForm?.values,
|
|
2945
|
+
config: props.config
|
|
2851
2946
|
});
|
|
2852
2947
|
}
|
|
2853
2948
|
const optionsData = res[option.root];
|
|
@@ -2937,8 +3032,10 @@ const _sfc_main$6 = defineComponent({
|
|
|
2937
3032
|
watch(() => mForm?.values, () => {
|
|
2938
3033
|
typeof props.config.options === "function" && Promise.resolve(props.config.options(mForm, {
|
|
2939
3034
|
model: props.model,
|
|
3035
|
+
prop: props.prop,
|
|
2940
3036
|
formValues: mForm?.values,
|
|
2941
|
-
formValue: mForm?.values
|
|
3037
|
+
formValue: mForm?.values,
|
|
3038
|
+
config: props.config
|
|
2942
3039
|
})).then((data) => {
|
|
2943
3040
|
options.value = data;
|
|
2944
3041
|
});
|
|
@@ -2986,11 +3083,11 @@ const _sfc_main$6 = defineComponent({
|
|
|
2986
3083
|
remote,
|
|
2987
3084
|
options,
|
|
2988
3085
|
moreLoadingVisible,
|
|
3086
|
+
popperClass: mForm?.popperClass,
|
|
3087
|
+
getOptions,
|
|
2989
3088
|
getRequestFuc() {
|
|
2990
3089
|
return getConfig("request");
|
|
2991
3090
|
},
|
|
2992
|
-
async getInitOption() {
|
|
2993
|
-
},
|
|
2994
3091
|
changeHandler(value) {
|
|
2995
3092
|
emit("change", value);
|
|
2996
3093
|
},
|
|
@@ -3007,10 +3104,6 @@ const _sfc_main$6 = defineComponent({
|
|
|
3007
3104
|
options.value = await getOptions();
|
|
3008
3105
|
}
|
|
3009
3106
|
},
|
|
3010
|
-
async editAfterAction() {
|
|
3011
|
-
pgIndex.value = 0;
|
|
3012
|
-
options.value = await getOptions();
|
|
3013
|
-
},
|
|
3014
3107
|
async remoteMethod(q) {
|
|
3015
3108
|
if (!localOptions.value.length) {
|
|
3016
3109
|
query.value = q;
|
|
@@ -3025,7 +3118,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
3025
3118
|
};
|
|
3026
3119
|
}
|
|
3027
3120
|
});
|
|
3028
|
-
const _hoisted_1$
|
|
3121
|
+
const _hoisted_1$2 = { key: 2 };
|
|
3029
3122
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3030
3123
|
const _component_el_option = resolveComponent("el-option");
|
|
3031
3124
|
const _component_el_option_group = resolveComponent("el-option-group");
|
|
@@ -3039,6 +3132,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3039
3132
|
ref: "select",
|
|
3040
3133
|
clearable: "",
|
|
3041
3134
|
filterable: "",
|
|
3135
|
+
"popper-class": `m-select-popper ${_ctx.popperClass}`,
|
|
3042
3136
|
size: _ctx.size,
|
|
3043
3137
|
remote: _ctx.remote,
|
|
3044
3138
|
placeholder: _ctx.config.placeholder,
|
|
@@ -3046,21 +3140,21 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3046
3140
|
"value-key": _ctx.config.valueKey || "value",
|
|
3047
3141
|
"allow-create": _ctx.config.allowCreate,
|
|
3048
3142
|
disabled: _ctx.disabled,
|
|
3049
|
-
"remote-method": _ctx.remoteMethod,
|
|
3143
|
+
"remote-method": _ctx.config.remote && _ctx.remoteMethod,
|
|
3050
3144
|
onChange: _ctx.changeHandler,
|
|
3051
3145
|
onVisibleChange: _ctx.visibleHandler
|
|
3052
3146
|
}, {
|
|
3053
3147
|
default: withCtx(() => [
|
|
3054
3148
|
_ctx.config.group ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (group, index) => {
|
|
3055
3149
|
return openBlock(), createBlock(_component_el_option_group, {
|
|
3056
|
-
key:
|
|
3150
|
+
key: index,
|
|
3057
3151
|
label: group.label,
|
|
3058
3152
|
disabled: group.disabled
|
|
3059
3153
|
}, {
|
|
3060
3154
|
default: withCtx(() => [
|
|
3061
3155
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
|
|
3062
3156
|
return openBlock(), createBlock(_component_el_option, {
|
|
3063
|
-
key:
|
|
3157
|
+
key: index2,
|
|
3064
3158
|
label: item.label,
|
|
3065
3159
|
value: item.value,
|
|
3066
3160
|
disabled: item.disabled
|
|
@@ -3077,12 +3171,12 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3077
3171
|
disabled: option.disabled
|
|
3078
3172
|
}, null, 8, ["label", "value", "disabled"]);
|
|
3079
3173
|
}), 128)),
|
|
3080
|
-
_ctx.moreLoadingVisible ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
3174
|
+
_ctx.moreLoadingVisible ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$2, null, 512)), [
|
|
3081
3175
|
[_directive_loading, true]
|
|
3082
3176
|
]) : createCommentVNode("", true)
|
|
3083
3177
|
]),
|
|
3084
3178
|
_: 1
|
|
3085
|
-
}, 8, ["modelValue", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
|
|
3179
|
+
}, 8, ["modelValue", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
|
|
3086
3180
|
[_directive_loading, _ctx.loading]
|
|
3087
3181
|
]) : createCommentVNode("", true);
|
|
3088
3182
|
}
|
|
@@ -3154,6 +3248,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
3154
3248
|
},
|
|
3155
3249
|
emits: ["change", "input"],
|
|
3156
3250
|
setup(props, { emit }) {
|
|
3251
|
+
const mForm = inject("mForm");
|
|
3157
3252
|
useAddField(props.prop);
|
|
3158
3253
|
const modelName = computed(() => props.name || props.config.name || "");
|
|
3159
3254
|
return {
|
|
@@ -3162,12 +3257,10 @@ const _sfc_main$4 = defineComponent({
|
|
|
3162
3257
|
emit("change", v);
|
|
3163
3258
|
},
|
|
3164
3259
|
inputHandler(v) {
|
|
3165
|
-
const mForm = inject("mForm");
|
|
3166
3260
|
emit("input", v);
|
|
3167
3261
|
mForm?.$emit("field-input", props.prop, v);
|
|
3168
3262
|
},
|
|
3169
3263
|
buttonClickHandler() {
|
|
3170
|
-
const mForm = inject("mForm");
|
|
3171
3264
|
if (typeof props.config.append === "string")
|
|
3172
3265
|
return;
|
|
3173
3266
|
if (props.config.append?.handler) {
|
|
@@ -3231,7 +3324,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
3231
3324
|
};
|
|
3232
3325
|
}
|
|
3233
3326
|
});
|
|
3234
|
-
const _hoisted_1$
|
|
3327
|
+
const _hoisted_1$1 = { key: 0 };
|
|
3235
3328
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3236
3329
|
const _component_el_button = resolveComponent("el-button");
|
|
3237
3330
|
const _component_el_input = resolveComponent("el-input");
|
|
@@ -3249,17 +3342,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3249
3342
|
_ctx.config.append ? {
|
|
3250
3343
|
name: "append",
|
|
3251
3344
|
fn: withCtx(() => [
|
|
3252
|
-
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3345
|
+
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.config.append), 1)) : createCommentVNode("", true),
|
|
3253
3346
|
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (openBlock(), createBlock(_component_el_button, {
|
|
3254
3347
|
key: 1,
|
|
3255
3348
|
style: { "color": "#409eff" },
|
|
3256
|
-
|
|
3349
|
+
size: _ctx.size,
|
|
3350
|
+
onClick: withModifiers(_ctx.buttonClickHandler, ["prevent"])
|
|
3257
3351
|
}, {
|
|
3258
3352
|
default: withCtx(() => [
|
|
3259
3353
|
createTextVNode(toDisplayString(_ctx.config.append.text), 1)
|
|
3260
3354
|
]),
|
|
3261
3355
|
_: 1
|
|
3262
|
-
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
3356
|
+
}, 8, ["size", "onClick"])) : createCommentVNode("", true)
|
|
3263
3357
|
])
|
|
3264
3358
|
} : void 0
|
|
3265
3359
|
]), 1032, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
@@ -3298,22 +3392,19 @@ const _sfc_main$3 = defineComponent({
|
|
|
3298
3392
|
};
|
|
3299
3393
|
}
|
|
3300
3394
|
});
|
|
3301
|
-
const _hoisted_1$1 = { key: 0 };
|
|
3302
3395
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3303
3396
|
const _component_el_input = resolveComponent("el-input");
|
|
3304
|
-
return
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"])
|
|
3316
|
-
])) : createCommentVNode("", true);
|
|
3397
|
+
return openBlock(), createBlock(_component_el_input, {
|
|
3398
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3399
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3400
|
+
type: "textarea",
|
|
3401
|
+
size: _ctx.size,
|
|
3402
|
+
clearable: "",
|
|
3403
|
+
placeholder: _ctx.config.placeholder,
|
|
3404
|
+
disabled: _ctx.disabled,
|
|
3405
|
+
onChange: _ctx.changeHandler,
|
|
3406
|
+
onInput: _ctx.inputHandler
|
|
3407
|
+
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
3317
3408
|
}
|
|
3318
3409
|
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
3319
3410
|
|
|
@@ -3403,6 +3494,9 @@ const _sfc_main$1 = defineComponent({
|
|
|
3403
3494
|
keyProp: {
|
|
3404
3495
|
type: String,
|
|
3405
3496
|
default: "__key"
|
|
3497
|
+
},
|
|
3498
|
+
popperClass: {
|
|
3499
|
+
type: String
|
|
3406
3500
|
}
|
|
3407
3501
|
},
|
|
3408
3502
|
emits: ["change", "field-input", "field-change"],
|
|
@@ -3414,6 +3508,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
3414
3508
|
const requestFuc = getConfig("request");
|
|
3415
3509
|
const formState = reactive({
|
|
3416
3510
|
keyProp: props.keyProp,
|
|
3511
|
+
popperClass: props.popperClass,
|
|
3417
3512
|
config: props.config,
|
|
3418
3513
|
initValues: props.initValues,
|
|
3419
3514
|
parentValues: props.parentValues,
|
|
@@ -3457,7 +3552,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
3457
3552
|
submitForm: async (native) => {
|
|
3458
3553
|
try {
|
|
3459
3554
|
await elForm.value?.validate();
|
|
3460
|
-
return native ? values.value : cloneDeep(values.value);
|
|
3555
|
+
return native ? values.value : cloneDeep(toRaw(values.value));
|
|
3461
3556
|
} catch (invalidFields) {
|
|
3462
3557
|
const error = [];
|
|
3463
3558
|
Object.entries(invalidFields).forEach(([, ValidateError]) => {
|
|
@@ -3709,7 +3804,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3709
3804
|
}
|
|
3710
3805
|
var FormDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
3711
3806
|
|
|
3712
|
-
var index$1 =
|
|
3807
|
+
var index$1 = /* #__PURE__ */ (() => ".m-form-dialog .el-dialog__body {\n padding: 0 !important;\n}\n.m-form-dialog .m-dialog-body {\n padding: 0 20px;\n}\n.m-form-dialog .el-table .m-form-item .el-form-item {\n margin-bottom: 0;\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.5s;\n}\n\n.fade-enter, .fade-leave-to {\n opacity: 0;\n}\n\n.m-form .m-form-tip {\n color: rgba(0, 0, 0, 0.45);\n font-size: 12px;\n transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);\n}\n.m-form .m-form-schematic {\n max-width: 50%;\n height: 100%;\n}\n.m-form .el-table .cell > div.m-form-container {\n display: block;\n}\n.m-form .el-tabs {\n margin-bottom: 10px;\n}\n.m-form .el-form-item.hidden .el-form-item__label {\n display: none;\n}\n\n.magic-datetime-picker-popper .el-picker-panel__footer button:first-child {\n display: none;\n}\n\ndiv.m-fields-link {\n width: fit-content;\n}\n\nfieldset.m-fieldset {\n position: relative;\n border: 1px solid rgb(229, 229, 229);\n margin-top: 10px;\n margin-bottom: 10px;\n min-inline-size: auto;\n}\nfieldset.m-fieldset legend {\n font-size: 14px;\n position: absolute;\n border: 0;\n top: -10px;\n left: 20px;\n background: rgb(255, 255, 255);\n width: auto;\n padding: 0px 3px;\n font-weight: bold;\n line-height: 20px;\n}\nfieldset.m-fieldset .m-form-tip {\n margin-left: 5px;\n}\n\n.m-fields-group-list .el-button--text {\n padding: 0;\n margin-bottom: 7px;\n}\n.m-fields-group-list .el-tree-node__expand-icon {\n padding: 0;\n margin-bottom: 7px;\n}\n.m-fields-group-list .el-tree-node__expand-icon.expand {\n transform: rotate(90deg);\n}\n.m-fields-group-list .m-fields-group-list-item {\n border-bottom: 1px solid #ebeef5;\n margin-bottom: 7px;\n}\n.m-fields-group-list .m-fields-group-list-item:last-of-type {\n border-bottom: 0;\n}\n\n.m-form-panel .el-card__header:hover {\n background: #f2f6fc;\n}\n.m-form-panel .el-card__header a {\n color: #409eff;\n}\n.m-form-panel .el-card__body {\n padding: 10px;\n}\n.m-form-panel .m-form-tip {\n margin-left: 5px;\n}\n\n.m-fields-table {\n width: 100%;\n}\n.m-fields-table.fixed {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 100;\n}\n.m-fields-table.fixed::before {\n content: \" \";\n display: block;\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 100;\n}\n.m-fields-table.fixed > .el-form-item__content {\n z-index: 101;\n position: relative;\n margin: 10vh auto;\n max-width: fit-content;\n}\n.m-fields-table.fixed table {\n width: 95vw !important;\n}\n.m-fields-table th {\n background-color: #f2f2f2 !important;\n color: #333 !important;\n}\n.m-fields-table .el-table th {\n padding: 0 !important;\n}\n.m-fields-table .el-table__column--dropable {\n cursor: move;\n}\n.m-fields-table .el-form-item__content .el-input-group {\n vertical-align: middle;\n}\n.m-fields-table.m-fields-table-item-extra tr.expanded td {\n border-bottom: 0;\n}\n.m-fields-table .el-table__expanded-cell .m-form-tip {\n margin-left: 80px;\n}\n.m-fields-table .el-form-item {\n margin-bottom: 0;\n}\n\n.m-select {\n width: 100%;\n}")();
|
|
3713
3808
|
|
|
3714
3809
|
const defaultInstallOpt = {};
|
|
3715
3810
|
const install = (app, opt) => {
|