@tmagic/form 1.5.5 → 1.5.6
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/tmagic-form.js +1503 -1051
- package/dist/tmagic-form.umd.cjs +4681 -1064
- package/package.json +4 -13
- package/types/index.d.ts +2590 -187
- /package/dist/{style.css → tmagic-form.css} +0 -0
package/dist/tmagic-form.js
CHANGED
|
@@ -83,7 +83,7 @@ const getDefaultValue = function(mForm, { defaultValue, type, filter, multiple }
|
|
|
83
83
|
return defaultValue(mForm);
|
|
84
84
|
}
|
|
85
85
|
if (defaultValue === "undefined") {
|
|
86
|
-
return
|
|
86
|
+
return undefined;
|
|
87
87
|
}
|
|
88
88
|
if (typeof defaultValue !== "undefined") {
|
|
89
89
|
return defaultValue;
|
|
@@ -404,238 +404,277 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
404
404
|
"label-width": itemLabelWidth.value,
|
|
405
405
|
onChange: onChangeHandler,
|
|
406
406
|
onAddDiffCount
|
|
407
|
-
}, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (openBlock(), createElementBlock(
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}, {
|
|
416
|
-
label: withCtx(() => [
|
|
417
|
-
createElementVNode("span", {
|
|
418
|
-
innerHTML: type.value === "checkbox" ? "" : text.value,
|
|
419
|
-
title: _ctx.config.labelTitle
|
|
420
|
-
}, null, 8, _hoisted_2$7)
|
|
421
|
-
]),
|
|
422
|
-
default: withCtx(() => [
|
|
423
|
-
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
424
|
-
content: withCtx(() => [
|
|
425
|
-
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_3$5)
|
|
426
|
-
]),
|
|
427
|
-
default: withCtx(() => [
|
|
428
|
-
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
429
|
-
key: key(_ctx.config),
|
|
430
|
-
size: _ctx.size,
|
|
431
|
-
model: _ctx.model,
|
|
432
|
-
"last-values": _ctx.lastValues,
|
|
433
|
-
config: _ctx.config,
|
|
434
|
-
name: name.value,
|
|
435
|
-
disabled: disabled.value,
|
|
436
|
-
prop: itemProp.value,
|
|
437
|
-
onChange: onChangeHandler,
|
|
438
|
-
onAddDiffCount
|
|
439
|
-
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
|
|
440
|
-
]),
|
|
441
|
-
_: 1
|
|
442
|
-
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
443
|
-
key: key(_ctx.config),
|
|
444
|
-
size: _ctx.size,
|
|
445
|
-
model: _ctx.model,
|
|
446
|
-
"last-values": _ctx.lastValues,
|
|
447
|
-
config: _ctx.config,
|
|
448
|
-
name: name.value,
|
|
449
|
-
disabled: disabled.value,
|
|
450
|
-
prop: itemProp.value,
|
|
451
|
-
onChange: onChangeHandler,
|
|
452
|
-
onAddDiffCount
|
|
453
|
-
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
|
|
454
|
-
extra.value && type.value !== "table" ? (openBlock(), createElementBlock("div", {
|
|
455
|
-
key: 2,
|
|
456
|
-
innerHTML: extra.value,
|
|
457
|
-
class: "m-form-tip"
|
|
458
|
-
}, null, 8, _hoisted_4$3)) : createCommentVNode("", true)
|
|
459
|
-
]),
|
|
460
|
-
_: 1
|
|
461
|
-
}, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
|
|
462
|
-
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
463
|
-
key: 0,
|
|
464
|
-
placement: "left"
|
|
465
|
-
}, {
|
|
466
|
-
content: withCtx(() => [
|
|
467
|
-
createElementVNode("div", {
|
|
468
|
-
innerHTML: _ctx.config.tip
|
|
469
|
-
}, null, 8, _hoisted_5$3)
|
|
470
|
-
]),
|
|
471
|
-
default: withCtx(() => [
|
|
472
|
-
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
473
|
-
default: withCtx(() => [
|
|
474
|
-
createVNode(unref(WarningFilled))
|
|
475
|
-
]),
|
|
476
|
-
_: 1
|
|
477
|
-
})
|
|
478
|
-
]),
|
|
479
|
-
_: 1
|
|
480
|
-
})) : createCommentVNode("", true)
|
|
481
|
-
], 64)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
482
|
-
createVNode(unref(TMagicFormItem), {
|
|
483
|
-
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
484
|
-
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
485
|
-
prop: itemProp.value,
|
|
486
|
-
"label-width": itemLabelWidth.value,
|
|
487
|
-
"label-position": _ctx.config.labelPosition,
|
|
488
|
-
rules: rule.value
|
|
489
|
-
}, {
|
|
490
|
-
label: withCtx(() => [
|
|
491
|
-
createElementVNode("span", {
|
|
492
|
-
innerHTML: type.value === "checkbox" ? "" : text.value,
|
|
493
|
-
title: _ctx.config.labelTitle
|
|
494
|
-
}, null, 8, _hoisted_6$2)
|
|
495
|
-
]),
|
|
496
|
-
default: withCtx(() => [
|
|
497
|
-
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
498
|
-
content: withCtx(() => [
|
|
499
|
-
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_7$1)
|
|
500
|
-
]),
|
|
501
|
-
default: withCtx(() => [
|
|
502
|
-
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
503
|
-
key: key(_ctx.config),
|
|
504
|
-
size: _ctx.size,
|
|
505
|
-
model: _ctx.lastValues,
|
|
506
|
-
config: _ctx.config,
|
|
507
|
-
name: name.value,
|
|
508
|
-
disabled: disabled.value,
|
|
509
|
-
prop: itemProp.value,
|
|
510
|
-
onChange: onChangeHandler
|
|
511
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
512
|
-
]),
|
|
513
|
-
_: 1
|
|
514
|
-
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
515
|
-
key: key(_ctx.config),
|
|
516
|
-
size: _ctx.size,
|
|
517
|
-
model: _ctx.lastValues,
|
|
518
|
-
config: _ctx.config,
|
|
519
|
-
name: name.value,
|
|
520
|
-
disabled: disabled.value,
|
|
521
|
-
prop: itemProp.value,
|
|
522
|
-
onChange: onChangeHandler
|
|
523
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
524
|
-
extra.value ? (openBlock(), createElementBlock("div", {
|
|
525
|
-
key: 2,
|
|
526
|
-
innerHTML: extra.value,
|
|
527
|
-
class: "m-form-tip"
|
|
528
|
-
}, null, 8, _hoisted_8$1)) : createCommentVNode("", true)
|
|
529
|
-
]),
|
|
530
|
-
_: 1
|
|
531
|
-
}, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
|
|
532
|
-
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
533
|
-
key: 0,
|
|
534
|
-
placement: "left"
|
|
535
|
-
}, {
|
|
536
|
-
content: withCtx(() => [
|
|
537
|
-
createElementVNode("div", {
|
|
538
|
-
innerHTML: _ctx.config.tip
|
|
539
|
-
}, null, 8, _hoisted_9)
|
|
540
|
-
]),
|
|
541
|
-
default: withCtx(() => [
|
|
542
|
-
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
543
|
-
default: withCtx(() => [
|
|
544
|
-
createVNode(unref(WarningFilled))
|
|
545
|
-
]),
|
|
546
|
-
_: 1
|
|
547
|
-
})
|
|
548
|
-
]),
|
|
549
|
-
_: 1
|
|
550
|
-
})) : createCommentVNode("", true),
|
|
551
|
-
createVNode(unref(TMagicFormItem), {
|
|
552
|
-
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
553
|
-
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
554
|
-
prop: itemProp.value,
|
|
555
|
-
"label-width": itemLabelWidth.value,
|
|
556
|
-
"label-position": _ctx.config.labelPosition,
|
|
557
|
-
rules: rule.value
|
|
558
|
-
}, {
|
|
559
|
-
label: withCtx(() => [
|
|
560
|
-
createElementVNode("span", {
|
|
561
|
-
innerHTML: type.value === "checkbox" ? "" : text.value,
|
|
562
|
-
title: _ctx.config.labelTitle
|
|
563
|
-
}, null, 8, _hoisted_10)
|
|
564
|
-
]),
|
|
565
|
-
default: withCtx(() => [
|
|
566
|
-
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
567
|
-
content: withCtx(() => [
|
|
568
|
-
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_11)
|
|
569
|
-
]),
|
|
570
|
-
default: withCtx(() => [
|
|
571
|
-
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
572
|
-
key: key(_ctx.config),
|
|
573
|
-
size: _ctx.size,
|
|
574
|
-
model: _ctx.model,
|
|
575
|
-
config: _ctx.config,
|
|
576
|
-
name: name.value,
|
|
577
|
-
disabled: disabled.value,
|
|
578
|
-
prop: itemProp.value,
|
|
579
|
-
onChange: onChangeHandler
|
|
580
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
581
|
-
]),
|
|
582
|
-
_: 1
|
|
583
|
-
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
584
|
-
key: key(_ctx.config),
|
|
585
|
-
size: _ctx.size,
|
|
586
|
-
model: _ctx.model,
|
|
587
|
-
config: _ctx.config,
|
|
588
|
-
name: name.value,
|
|
589
|
-
disabled: disabled.value,
|
|
590
|
-
prop: itemProp.value,
|
|
591
|
-
onChange: onChangeHandler
|
|
592
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
593
|
-
extra.value ? (openBlock(), createElementBlock("div", {
|
|
594
|
-
key: 2,
|
|
595
|
-
innerHTML: extra.value,
|
|
596
|
-
class: "m-form-tip"
|
|
597
|
-
}, null, 8, _hoisted_12)) : createCommentVNode("", true)
|
|
598
|
-
]),
|
|
599
|
-
_: 1
|
|
600
|
-
}, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
|
|
601
|
-
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
602
|
-
key: 1,
|
|
603
|
-
placement: "left"
|
|
604
|
-
}, {
|
|
605
|
-
content: withCtx(() => [
|
|
606
|
-
createElementVNode("div", {
|
|
607
|
-
innerHTML: _ctx.config.tip
|
|
608
|
-
}, null, 8, _hoisted_13)
|
|
609
|
-
]),
|
|
610
|
-
default: withCtx(() => [
|
|
611
|
-
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
612
|
-
default: withCtx(() => [
|
|
613
|
-
createVNode(unref(WarningFilled))
|
|
614
|
-
]),
|
|
615
|
-
_: 1
|
|
616
|
-
})
|
|
617
|
-
]),
|
|
618
|
-
_: 1
|
|
619
|
-
})) : createCommentVNode("", true)
|
|
620
|
-
], 64)) : items.value && display$1.value ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
621
|
-
(isValidName() ? _ctx.model[name.value] : _ctx.model) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(items.value, (item) => {
|
|
622
|
-
return openBlock(), createBlock(_component_Container, {
|
|
623
|
-
key: key(item),
|
|
624
|
-
model: isValidName() ? _ctx.model[name.value] : _ctx.model,
|
|
625
|
-
"last-values": isValidName() ? _ctx.lastValues[name.value] || {} : _ctx.lastValues,
|
|
626
|
-
"is-compare": _ctx.isCompare,
|
|
627
|
-
config: item,
|
|
628
|
-
size: _ctx.size,
|
|
629
|
-
disabled: disabled.value,
|
|
630
|
-
"step-active": _ctx.stepActive,
|
|
631
|
-
"expand-more": expand.value,
|
|
407
|
+
}, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (openBlock(), createElementBlock(
|
|
408
|
+
Fragment,
|
|
409
|
+
{ key: 2 },
|
|
410
|
+
[
|
|
411
|
+
createVNode(unref(TMagicFormItem), {
|
|
412
|
+
style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
413
|
+
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
414
|
+
prop: itemProp.value,
|
|
632
415
|
"label-width": itemLabelWidth.value,
|
|
416
|
+
"label-position": _ctx.config.labelPosition,
|
|
417
|
+
rules: rule.value
|
|
418
|
+
}, {
|
|
419
|
+
label: withCtx(() => [
|
|
420
|
+
createElementVNode("span", {
|
|
421
|
+
innerHTML: type.value === "checkbox" ? "" : text.value,
|
|
422
|
+
title: _ctx.config.labelTitle
|
|
423
|
+
}, null, 8, _hoisted_2$7)
|
|
424
|
+
]),
|
|
425
|
+
default: withCtx(() => [
|
|
426
|
+
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
427
|
+
content: withCtx(() => [
|
|
428
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_3$5)
|
|
429
|
+
]),
|
|
430
|
+
default: withCtx(() => [
|
|
431
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
432
|
+
key: key(_ctx.config),
|
|
433
|
+
size: _ctx.size,
|
|
434
|
+
model: _ctx.model,
|
|
435
|
+
"last-values": _ctx.lastValues,
|
|
436
|
+
config: _ctx.config,
|
|
437
|
+
name: name.value,
|
|
438
|
+
disabled: disabled.value,
|
|
439
|
+
prop: itemProp.value,
|
|
440
|
+
onChange: onChangeHandler,
|
|
441
|
+
onAddDiffCount
|
|
442
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
|
|
443
|
+
]),
|
|
444
|
+
_: 1
|
|
445
|
+
/* STABLE */
|
|
446
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
447
|
+
key: key(_ctx.config),
|
|
448
|
+
size: _ctx.size,
|
|
449
|
+
model: _ctx.model,
|
|
450
|
+
"last-values": _ctx.lastValues,
|
|
451
|
+
config: _ctx.config,
|
|
452
|
+
name: name.value,
|
|
453
|
+
disabled: disabled.value,
|
|
454
|
+
prop: itemProp.value,
|
|
455
|
+
onChange: onChangeHandler,
|
|
456
|
+
onAddDiffCount
|
|
457
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
|
|
458
|
+
extra.value && type.value !== "table" ? (openBlock(), createElementBlock("div", {
|
|
459
|
+
key: 2,
|
|
460
|
+
innerHTML: extra.value,
|
|
461
|
+
class: "m-form-tip"
|
|
462
|
+
}, null, 8, _hoisted_4$3)) : createCommentVNode("v-if", true)
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
/* STABLE */
|
|
466
|
+
}, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
|
|
467
|
+
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
468
|
+
key: 0,
|
|
469
|
+
placement: "left"
|
|
470
|
+
}, {
|
|
471
|
+
content: withCtx(() => [
|
|
472
|
+
createElementVNode("div", {
|
|
473
|
+
innerHTML: _ctx.config.tip
|
|
474
|
+
}, null, 8, _hoisted_5$3)
|
|
475
|
+
]),
|
|
476
|
+
default: withCtx(() => [
|
|
477
|
+
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
478
|
+
default: withCtx(() => [
|
|
479
|
+
createVNode(unref(WarningFilled))
|
|
480
|
+
]),
|
|
481
|
+
_: 1
|
|
482
|
+
/* STABLE */
|
|
483
|
+
})
|
|
484
|
+
]),
|
|
485
|
+
_: 1
|
|
486
|
+
/* STABLE */
|
|
487
|
+
})) : createCommentVNode("v-if", true)
|
|
488
|
+
],
|
|
489
|
+
64
|
|
490
|
+
/* STABLE_FRAGMENT */
|
|
491
|
+
)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(
|
|
492
|
+
Fragment,
|
|
493
|
+
{ key: 3 },
|
|
494
|
+
[
|
|
495
|
+
createCommentVNode(" 对比 "),
|
|
496
|
+
createCommentVNode(" 上次内容 "),
|
|
497
|
+
createVNode(unref(TMagicFormItem), {
|
|
498
|
+
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
499
|
+
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
500
|
+
prop: itemProp.value,
|
|
501
|
+
"label-width": itemLabelWidth.value,
|
|
502
|
+
"label-position": _ctx.config.labelPosition,
|
|
503
|
+
rules: rule.value
|
|
504
|
+
}, {
|
|
505
|
+
label: withCtx(() => [
|
|
506
|
+
createElementVNode("span", {
|
|
507
|
+
innerHTML: type.value === "checkbox" ? "" : text.value,
|
|
508
|
+
title: _ctx.config.labelTitle
|
|
509
|
+
}, null, 8, _hoisted_6$2)
|
|
510
|
+
]),
|
|
511
|
+
default: withCtx(() => [
|
|
512
|
+
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
513
|
+
content: withCtx(() => [
|
|
514
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_7$1)
|
|
515
|
+
]),
|
|
516
|
+
default: withCtx(() => [
|
|
517
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
518
|
+
key: key(_ctx.config),
|
|
519
|
+
size: _ctx.size,
|
|
520
|
+
model: _ctx.lastValues,
|
|
521
|
+
config: _ctx.config,
|
|
522
|
+
name: name.value,
|
|
523
|
+
disabled: disabled.value,
|
|
524
|
+
prop: itemProp.value,
|
|
525
|
+
onChange: onChangeHandler
|
|
526
|
+
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
527
|
+
]),
|
|
528
|
+
_: 1
|
|
529
|
+
/* STABLE */
|
|
530
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
531
|
+
key: key(_ctx.config),
|
|
532
|
+
size: _ctx.size,
|
|
533
|
+
model: _ctx.lastValues,
|
|
534
|
+
config: _ctx.config,
|
|
535
|
+
name: name.value,
|
|
536
|
+
disabled: disabled.value,
|
|
537
|
+
prop: itemProp.value,
|
|
538
|
+
onChange: onChangeHandler
|
|
539
|
+
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
540
|
+
extra.value ? (openBlock(), createElementBlock("div", {
|
|
541
|
+
key: 2,
|
|
542
|
+
innerHTML: extra.value,
|
|
543
|
+
class: "m-form-tip"
|
|
544
|
+
}, null, 8, _hoisted_8$1)) : createCommentVNode("v-if", true)
|
|
545
|
+
]),
|
|
546
|
+
_: 1
|
|
547
|
+
/* STABLE */
|
|
548
|
+
}, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
|
|
549
|
+
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
550
|
+
key: 0,
|
|
551
|
+
placement: "left"
|
|
552
|
+
}, {
|
|
553
|
+
content: withCtx(() => [
|
|
554
|
+
createElementVNode("div", {
|
|
555
|
+
innerHTML: _ctx.config.tip
|
|
556
|
+
}, null, 8, _hoisted_9)
|
|
557
|
+
]),
|
|
558
|
+
default: withCtx(() => [
|
|
559
|
+
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
560
|
+
default: withCtx(() => [
|
|
561
|
+
createVNode(unref(WarningFilled))
|
|
562
|
+
]),
|
|
563
|
+
_: 1
|
|
564
|
+
/* STABLE */
|
|
565
|
+
})
|
|
566
|
+
]),
|
|
567
|
+
_: 1
|
|
568
|
+
/* STABLE */
|
|
569
|
+
})) : createCommentVNode("v-if", true),
|
|
570
|
+
createCommentVNode(" 当前内容 "),
|
|
571
|
+
createVNode(unref(TMagicFormItem), {
|
|
572
|
+
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
573
|
+
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
633
574
|
prop: itemProp.value,
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
575
|
+
"label-width": itemLabelWidth.value,
|
|
576
|
+
"label-position": _ctx.config.labelPosition,
|
|
577
|
+
rules: rule.value
|
|
578
|
+
}, {
|
|
579
|
+
label: withCtx(() => [
|
|
580
|
+
createElementVNode("span", {
|
|
581
|
+
innerHTML: type.value === "checkbox" ? "" : text.value,
|
|
582
|
+
title: _ctx.config.labelTitle
|
|
583
|
+
}, null, 8, _hoisted_10)
|
|
584
|
+
]),
|
|
585
|
+
default: withCtx(() => [
|
|
586
|
+
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
587
|
+
content: withCtx(() => [
|
|
588
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_11)
|
|
589
|
+
]),
|
|
590
|
+
default: withCtx(() => [
|
|
591
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
592
|
+
key: key(_ctx.config),
|
|
593
|
+
size: _ctx.size,
|
|
594
|
+
model: _ctx.model,
|
|
595
|
+
config: _ctx.config,
|
|
596
|
+
name: name.value,
|
|
597
|
+
disabled: disabled.value,
|
|
598
|
+
prop: itemProp.value,
|
|
599
|
+
onChange: onChangeHandler
|
|
600
|
+
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
601
|
+
]),
|
|
602
|
+
_: 1
|
|
603
|
+
/* STABLE */
|
|
604
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
605
|
+
key: key(_ctx.config),
|
|
606
|
+
size: _ctx.size,
|
|
607
|
+
model: _ctx.model,
|
|
608
|
+
config: _ctx.config,
|
|
609
|
+
name: name.value,
|
|
610
|
+
disabled: disabled.value,
|
|
611
|
+
prop: itemProp.value,
|
|
612
|
+
onChange: onChangeHandler
|
|
613
|
+
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
614
|
+
extra.value ? (openBlock(), createElementBlock("div", {
|
|
615
|
+
key: 2,
|
|
616
|
+
innerHTML: extra.value,
|
|
617
|
+
class: "m-form-tip"
|
|
618
|
+
}, null, 8, _hoisted_12)) : createCommentVNode("v-if", true)
|
|
619
|
+
]),
|
|
620
|
+
_: 1
|
|
621
|
+
/* STABLE */
|
|
622
|
+
}, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
|
|
623
|
+
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
624
|
+
key: 1,
|
|
625
|
+
placement: "left"
|
|
626
|
+
}, {
|
|
627
|
+
content: withCtx(() => [
|
|
628
|
+
createElementVNode("div", {
|
|
629
|
+
innerHTML: _ctx.config.tip
|
|
630
|
+
}, null, 8, _hoisted_13)
|
|
631
|
+
]),
|
|
632
|
+
default: withCtx(() => [
|
|
633
|
+
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
634
|
+
default: withCtx(() => [
|
|
635
|
+
createVNode(unref(WarningFilled))
|
|
636
|
+
]),
|
|
637
|
+
_: 1
|
|
638
|
+
/* STABLE */
|
|
639
|
+
})
|
|
640
|
+
]),
|
|
641
|
+
_: 1
|
|
642
|
+
/* STABLE */
|
|
643
|
+
})) : createCommentVNode("v-if", true)
|
|
644
|
+
],
|
|
645
|
+
64
|
|
646
|
+
/* STABLE_FRAGMENT */
|
|
647
|
+
)) : items.value && display$1.value ? (openBlock(), createElementBlock(
|
|
648
|
+
Fragment,
|
|
649
|
+
{ key: 4 },
|
|
650
|
+
[
|
|
651
|
+
(isValidName() ? _ctx.model[name.value] : _ctx.model) ? (openBlock(true), createElementBlock(
|
|
652
|
+
Fragment,
|
|
653
|
+
{ key: 0 },
|
|
654
|
+
renderList(items.value, (item) => {
|
|
655
|
+
return openBlock(), createBlock(_component_Container, {
|
|
656
|
+
key: key(item),
|
|
657
|
+
model: isValidName() ? _ctx.model[name.value] : _ctx.model,
|
|
658
|
+
"last-values": isValidName() ? _ctx.lastValues[name.value] || {} : _ctx.lastValues,
|
|
659
|
+
"is-compare": _ctx.isCompare,
|
|
660
|
+
config: item,
|
|
661
|
+
size: _ctx.size,
|
|
662
|
+
disabled: disabled.value,
|
|
663
|
+
"step-active": _ctx.stepActive,
|
|
664
|
+
"expand-more": expand.value,
|
|
665
|
+
"label-width": itemLabelWidth.value,
|
|
666
|
+
prop: itemProp.value,
|
|
667
|
+
onChange: onChangeHandler,
|
|
668
|
+
onAddDiffCount
|
|
669
|
+
}, null, 8, ["model", "last-values", "is-compare", "config", "size", "disabled", "step-active", "expand-more", "label-width", "prop"]);
|
|
670
|
+
}),
|
|
671
|
+
128
|
|
672
|
+
/* KEYED_FRAGMENT */
|
|
673
|
+
)) : createCommentVNode("v-if", true)
|
|
674
|
+
],
|
|
675
|
+
64
|
|
676
|
+
/* STABLE_FRAGMENT */
|
|
677
|
+
)) : createCommentVNode("v-if", true),
|
|
639
678
|
_ctx.config.expand && type.value !== "fieldset" ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
640
679
|
createVNode(unref(TMagicButton), {
|
|
641
680
|
type: "primary",
|
|
@@ -645,12 +684,17 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
645
684
|
onClick: expandHandler
|
|
646
685
|
}, {
|
|
647
686
|
default: withCtx(() => [
|
|
648
|
-
createTextVNode(
|
|
687
|
+
createTextVNode(
|
|
688
|
+
toDisplayString(expand.value ? "收起配置" : "展开更多配置"),
|
|
689
|
+
1
|
|
690
|
+
/* TEXT */
|
|
691
|
+
)
|
|
649
692
|
]),
|
|
650
693
|
_: 1
|
|
694
|
+
/* STABLE */
|
|
651
695
|
})
|
|
652
|
-
])) : createCommentVNode("", true)
|
|
653
|
-
], 14, _hoisted_1$e)) : createCommentVNode("", true);
|
|
696
|
+
])) : createCommentVNode("v-if", true)
|
|
697
|
+
], 14, _hoisted_1$e)) : createCommentVNode("v-if", true);
|
|
654
698
|
};
|
|
655
699
|
}
|
|
656
700
|
});
|
|
@@ -698,7 +742,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
698
742
|
if (props.config.items) {
|
|
699
743
|
return props.config.labelWidth || props.labelWidth;
|
|
700
744
|
}
|
|
701
|
-
return props.config.labelWidth || props.labelWidth || (props.config.text ?
|
|
745
|
+
return props.config.labelWidth || props.labelWidth || (props.config.text ? undefined : "0");
|
|
702
746
|
});
|
|
703
747
|
const valueChangeHandler = (value) => {
|
|
704
748
|
emit("change", value, { modifyKey: "value" });
|
|
@@ -707,50 +751,85 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
707
751
|
const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
|
|
708
752
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
709
753
|
return (_ctx, _cache) => {
|
|
710
|
-
return (name.value ? _ctx.model[name.value] : _ctx.model) ? (openBlock(), createElementBlock(
|
|
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
|
+
return (name.value ? _ctx.model[name.value] : _ctx.model) ? (openBlock(), createElementBlock(
|
|
755
|
+
"fieldset",
|
|
756
|
+
{
|
|
757
|
+
key: 0,
|
|
758
|
+
class: "m-fieldset",
|
|
759
|
+
style: normalizeStyle(show.value ? "padding: 15px" : "border: 0")
|
|
760
|
+
},
|
|
761
|
+
[
|
|
762
|
+
name.value && _ctx.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!show.value ? "div" : "legend"), { key: 0 }, {
|
|
763
|
+
default: withCtx(() => [
|
|
764
|
+
createVNode(unref(TMagicCheckbox), {
|
|
765
|
+
modelValue: _ctx.model[name.value].value,
|
|
766
|
+
"onUpdate:modelValue": [
|
|
767
|
+
_cache[0] || (_cache[0] = ($event) => _ctx.model[name.value].value = $event),
|
|
768
|
+
valueChangeHandler
|
|
769
|
+
],
|
|
770
|
+
prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.config.name}.value`,
|
|
771
|
+
"true-value": 1,
|
|
772
|
+
"false-value": 0
|
|
773
|
+
}, {
|
|
774
|
+
default: withCtx(() => [
|
|
775
|
+
createElementVNode("span", {
|
|
776
|
+
innerHTML: _ctx.config.legend
|
|
777
|
+
}, null, 8, _hoisted_1$d),
|
|
778
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
779
|
+
key: 0,
|
|
780
|
+
innerHTML: _ctx.config.extra,
|
|
781
|
+
class: "m-form-tip"
|
|
782
|
+
}, null, 8, _hoisted_2$6)) : createCommentVNode("v-if", true)
|
|
783
|
+
]),
|
|
784
|
+
_: 1
|
|
785
|
+
/* STABLE */
|
|
786
|
+
}, 8, ["modelValue", "prop"])
|
|
787
|
+
]),
|
|
788
|
+
_: 1
|
|
789
|
+
/* STABLE */
|
|
790
|
+
})) : (openBlock(), createElementBlock("legend", _hoisted_3$4, [
|
|
791
|
+
createElementVNode("span", {
|
|
792
|
+
innerHTML: _ctx.config.legend
|
|
793
|
+
}, null, 8, _hoisted_4$2),
|
|
794
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
795
|
+
key: 0,
|
|
796
|
+
innerHTML: _ctx.config.extra,
|
|
797
|
+
class: "m-form-tip"
|
|
798
|
+
}, null, 8, _hoisted_5$2)) : createCommentVNode("v-if", true)
|
|
799
|
+
])),
|
|
800
|
+
_ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
801
|
+
createElementVNode("div", _hoisted_7, [
|
|
802
|
+
(openBlock(true), createElementBlock(
|
|
803
|
+
Fragment,
|
|
804
|
+
null,
|
|
805
|
+
renderList(_ctx.config.items, (item, index) => {
|
|
806
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
807
|
+
key: key(item, index),
|
|
808
|
+
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
809
|
+
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
810
|
+
"is-compare": _ctx.isCompare,
|
|
811
|
+
rules: name.value ? _ctx.rules[name.value] : [],
|
|
812
|
+
config: item,
|
|
813
|
+
prop: _ctx.prop,
|
|
814
|
+
disabled: _ctx.disabled,
|
|
815
|
+
labelWidth: lWidth.value,
|
|
816
|
+
size: _ctx.size,
|
|
817
|
+
onChange: changeHandler,
|
|
818
|
+
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
819
|
+
}, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "disabled", "labelWidth", "size"]);
|
|
820
|
+
}),
|
|
821
|
+
128
|
|
822
|
+
/* KEYED_FRAGMENT */
|
|
823
|
+
))
|
|
824
|
+
]),
|
|
825
|
+
createElementVNode("img", {
|
|
826
|
+
class: "m-form-schematic",
|
|
827
|
+
src: _ctx.config.schematic
|
|
828
|
+
}, null, 8, _hoisted_8)
|
|
829
|
+
])) : show.value ? (openBlock(true), createElementBlock(
|
|
830
|
+
Fragment,
|
|
831
|
+
{ key: 3 },
|
|
832
|
+
renderList(_ctx.config.items, (item, index) => {
|
|
754
833
|
return openBlock(), createBlock(_sfc_main$x, {
|
|
755
834
|
key: key(item, index),
|
|
756
835
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
@@ -759,35 +838,20 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
759
838
|
rules: name.value ? _ctx.rules[name.value] : [],
|
|
760
839
|
config: item,
|
|
761
840
|
prop: _ctx.prop,
|
|
762
|
-
disabled: _ctx.disabled,
|
|
763
841
|
labelWidth: lWidth.value,
|
|
764
842
|
size: _ctx.size,
|
|
843
|
+
disabled: _ctx.disabled,
|
|
765
844
|
onChange: changeHandler,
|
|
766
|
-
onAddDiffCount: _cache[
|
|
767
|
-
}, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "
|
|
768
|
-
}),
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
key: key(item, index),
|
|
777
|
-
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
778
|
-
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
779
|
-
"is-compare": _ctx.isCompare,
|
|
780
|
-
rules: name.value ? _ctx.rules[name.value] : [],
|
|
781
|
-
config: item,
|
|
782
|
-
prop: _ctx.prop,
|
|
783
|
-
labelWidth: lWidth.value,
|
|
784
|
-
size: _ctx.size,
|
|
785
|
-
disabled: _ctx.disabled,
|
|
786
|
-
onChange: changeHandler,
|
|
787
|
-
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
788
|
-
}, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
|
|
789
|
-
}), 128)) : createCommentVNode("", true)
|
|
790
|
-
], 4)) : createCommentVNode("", true);
|
|
845
|
+
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
846
|
+
}, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
|
|
847
|
+
}),
|
|
848
|
+
128
|
|
849
|
+
/* KEYED_FRAGMENT */
|
|
850
|
+
)) : createCommentVNode("v-if", true)
|
|
851
|
+
],
|
|
852
|
+
4
|
|
853
|
+
/* STYLE */
|
|
854
|
+
)) : createCommentVNode("v-if", true);
|
|
791
855
|
};
|
|
792
856
|
}
|
|
793
857
|
});
|
|
@@ -854,7 +918,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
854
918
|
const changeOrder = (offset = 0) => emit("swap-item", props.index, props.index + offset);
|
|
855
919
|
const movable = computed(() => {
|
|
856
920
|
const { movable: movable2 } = props.config;
|
|
857
|
-
if (movable2 ===
|
|
921
|
+
if (movable2 === undefined) return true;
|
|
858
922
|
if (typeof movable2 === "function") {
|
|
859
923
|
return movable2(mForm, props.index || 0, props.model, props.groupModel);
|
|
860
924
|
}
|
|
@@ -885,10 +949,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
885
949
|
expand.value ? (openBlock(), createBlock(unref(CaretBottom), { key: 0 })) : (openBlock(), createBlock(unref(CaretRight), { key: 1 }))
|
|
886
950
|
]),
|
|
887
951
|
_: 1
|
|
952
|
+
/* STABLE */
|
|
888
953
|
}),
|
|
889
|
-
createTextVNode(
|
|
954
|
+
createTextVNode(
|
|
955
|
+
toDisplayString(title.value),
|
|
956
|
+
1
|
|
957
|
+
/* TEXT */
|
|
958
|
+
)
|
|
890
959
|
]),
|
|
891
960
|
_: 1
|
|
961
|
+
/* STABLE */
|
|
892
962
|
}, 8, ["disabled"]),
|
|
893
963
|
withDirectives(createVNode(unref(TMagicButton), {
|
|
894
964
|
type: "danger",
|
|
@@ -913,37 +983,46 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
913
983
|
createTextVNode("复制")
|
|
914
984
|
])),
|
|
915
985
|
_: 1
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
986
|
+
/* STABLE */
|
|
987
|
+
}, 8, ["icon", "disabled"])) : createCommentVNode("v-if", true),
|
|
988
|
+
movable.value ? (openBlock(), createElementBlock(
|
|
989
|
+
Fragment,
|
|
990
|
+
{ key: 1 },
|
|
991
|
+
[
|
|
992
|
+
withDirectives(createVNode(unref(TMagicButton), {
|
|
993
|
+
link: "",
|
|
994
|
+
size: "small",
|
|
995
|
+
disabled: _ctx.disabled,
|
|
996
|
+
icon: unref(CaretTop),
|
|
997
|
+
onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
|
|
998
|
+
}, {
|
|
999
|
+
default: withCtx(() => _cache[7] || (_cache[7] = [
|
|
1000
|
+
createTextVNode("上移")
|
|
1001
|
+
])),
|
|
1002
|
+
_: 1
|
|
1003
|
+
/* STABLE */
|
|
1004
|
+
}, 8, ["disabled", "icon"]), [
|
|
1005
|
+
[vShow, _ctx.index !== 0]
|
|
1006
|
+
]),
|
|
1007
|
+
withDirectives(createVNode(unref(TMagicButton), {
|
|
1008
|
+
link: "",
|
|
1009
|
+
size: "small",
|
|
1010
|
+
disabled: _ctx.disabled,
|
|
1011
|
+
icon: unref(CaretBottom),
|
|
1012
|
+
onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
|
|
1013
|
+
}, {
|
|
1014
|
+
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
1015
|
+
createTextVNode("下移")
|
|
1016
|
+
])),
|
|
1017
|
+
_: 1
|
|
1018
|
+
/* STABLE */
|
|
1019
|
+
}, 8, ["disabled", "icon"]), [
|
|
1020
|
+
[vShow, _ctx.index !== length.value - 1]
|
|
1021
|
+
])
|
|
1022
|
+
],
|
|
1023
|
+
64
|
|
1024
|
+
/* STABLE_FRAGMENT */
|
|
1025
|
+
)) : createCommentVNode("v-if", true),
|
|
947
1026
|
_ctx.config.moveSpecifyLocation ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
948
1027
|
key: 2,
|
|
949
1028
|
trigger: "click",
|
|
@@ -964,6 +1043,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
964
1043
|
createTextVNode("移动至")
|
|
965
1044
|
])),
|
|
966
1045
|
_: 1
|
|
1046
|
+
/* STABLE */
|
|
967
1047
|
}, 8, ["icon", "disabled"])
|
|
968
1048
|
]),
|
|
969
1049
|
default: withCtx(() => [
|
|
@@ -990,6 +1070,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
990
1070
|
createTextVNode("取消")
|
|
991
1071
|
])),
|
|
992
1072
|
_: 1
|
|
1073
|
+
/* STABLE */
|
|
993
1074
|
}),
|
|
994
1075
|
createVNode(unref(TMagicButton), {
|
|
995
1076
|
size: "small",
|
|
@@ -1000,17 +1081,19 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1000
1081
|
createTextVNode("确认")
|
|
1001
1082
|
])),
|
|
1002
1083
|
_: 1
|
|
1084
|
+
/* STABLE */
|
|
1003
1085
|
})
|
|
1004
1086
|
])
|
|
1005
1087
|
])
|
|
1006
1088
|
]),
|
|
1007
1089
|
_: 1
|
|
1008
|
-
|
|
1090
|
+
/* STABLE */
|
|
1091
|
+
}, 8, ["visible"])) : createCommentVNode("v-if", true),
|
|
1009
1092
|
itemExtra.value ? (openBlock(), createElementBlock("span", {
|
|
1010
1093
|
key: 3,
|
|
1011
1094
|
innerHTML: itemExtra.value,
|
|
1012
1095
|
class: "m-form-tip"
|
|
1013
|
-
}, null, 8, _hoisted_3$3)) : createCommentVNode("", true)
|
|
1096
|
+
}, null, 8, _hoisted_3$3)) : createCommentVNode("v-if", true)
|
|
1014
1097
|
]),
|
|
1015
1098
|
expand.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
1016
1099
|
key: 0,
|
|
@@ -1024,7 +1107,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1024
1107
|
disabled: _ctx.disabled,
|
|
1025
1108
|
onChange: changeHandler,
|
|
1026
1109
|
onAddDiffCount: _cache[5] || (_cache[5] = ($event) => onAddDiffCount())
|
|
1027
|
-
}, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("", true)
|
|
1110
|
+
}, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("v-if", true)
|
|
1028
1111
|
]);
|
|
1029
1112
|
};
|
|
1030
1113
|
}
|
|
@@ -1131,29 +1214,41 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1131
1214
|
key: 0,
|
|
1132
1215
|
innerHTML: _ctx.config.extra,
|
|
1133
1216
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
1134
|
-
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true),
|
|
1217
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("v-if", true),
|
|
1135
1218
|
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$2, _cache[1] || (_cache[1] = [
|
|
1136
|
-
createElementVNode(
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1219
|
+
createElementVNode(
|
|
1220
|
+
"span",
|
|
1221
|
+
{ class: "el-table__empty-text" },
|
|
1222
|
+
"暂无数据",
|
|
1223
|
+
-1
|
|
1224
|
+
/* HOISTED */
|
|
1225
|
+
)
|
|
1226
|
+
]))) : (openBlock(true), createElementBlock(
|
|
1227
|
+
Fragment,
|
|
1228
|
+
{ key: 2 },
|
|
1229
|
+
renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
1230
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
1231
|
+
key: index,
|
|
1232
|
+
model: item,
|
|
1233
|
+
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
1234
|
+
"is-compare": _ctx.isCompare,
|
|
1235
|
+
config: _ctx.config,
|
|
1236
|
+
prop: _ctx.prop,
|
|
1237
|
+
index,
|
|
1238
|
+
"label-width": _ctx.labelWidth,
|
|
1239
|
+
size: _ctx.size,
|
|
1240
|
+
disabled: _ctx.disabled,
|
|
1241
|
+
"group-model": _ctx.model[_ctx.name],
|
|
1242
|
+
onRemoveItem: removeHandler,
|
|
1243
|
+
onCopyItem: copyHandler,
|
|
1244
|
+
onSwapItem: swapHandler,
|
|
1245
|
+
onChange: changeHandler,
|
|
1246
|
+
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
1247
|
+
}, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
|
|
1248
|
+
}),
|
|
1249
|
+
128
|
|
1250
|
+
/* KEYED_FRAGMENT */
|
|
1251
|
+
)),
|
|
1157
1252
|
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1158
1253
|
key: 3,
|
|
1159
1254
|
type: "primary",
|
|
@@ -1165,7 +1260,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1165
1260
|
createTextVNode("新增")
|
|
1166
1261
|
])),
|
|
1167
1262
|
_: 1
|
|
1168
|
-
|
|
1263
|
+
/* STABLE */
|
|
1264
|
+
}, 8, ["size", "disabled"])) : createCommentVNode("v-if", true),
|
|
1169
1265
|
_ctx.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1170
1266
|
key: 4,
|
|
1171
1267
|
icon: unref(Grid),
|
|
@@ -1176,7 +1272,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1176
1272
|
createTextVNode("切换为表格")
|
|
1177
1273
|
])),
|
|
1178
1274
|
_: 1
|
|
1179
|
-
|
|
1275
|
+
/* STABLE */
|
|
1276
|
+
}, 8, ["icon"])) : createCommentVNode("v-if", true)
|
|
1180
1277
|
]);
|
|
1181
1278
|
};
|
|
1182
1279
|
}
|
|
@@ -1236,9 +1333,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1236
1333
|
key: 0,
|
|
1237
1334
|
innerHTML: _ctx.config.extra,
|
|
1238
1335
|
class: "m-form-tip"
|
|
1239
|
-
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
1336
|
+
}, null, 8, _hoisted_2$3)) : createCommentVNode("v-if", true),
|
|
1240
1337
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1241
|
-
createTextVNode(
|
|
1338
|
+
createTextVNode(
|
|
1339
|
+
toDisplayString(filter(_ctx.config.title)),
|
|
1340
|
+
1
|
|
1341
|
+
/* TEXT */
|
|
1342
|
+
)
|
|
1242
1343
|
])
|
|
1243
1344
|
])
|
|
1244
1345
|
]),
|
|
@@ -1247,45 +1348,58 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1247
1348
|
renderSlot(_ctx.$slots, "default"),
|
|
1248
1349
|
_ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1249
1350
|
createElementVNode("div", _hoisted_4$1, [
|
|
1250
|
-
(openBlock(true), createElementBlock(
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1351
|
+
(openBlock(true), createElementBlock(
|
|
1352
|
+
Fragment,
|
|
1353
|
+
null,
|
|
1354
|
+
renderList(items.value, (item, index) => {
|
|
1355
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
1356
|
+
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1357
|
+
config: item,
|
|
1358
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1359
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1360
|
+
"is-compare": _ctx.isCompare,
|
|
1361
|
+
prop: _ctx.prop,
|
|
1362
|
+
size: _ctx.size,
|
|
1363
|
+
disabled: _ctx.disabled,
|
|
1364
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1365
|
+
onChange: changeHandler,
|
|
1366
|
+
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1367
|
+
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
|
|
1368
|
+
}),
|
|
1369
|
+
128
|
|
1370
|
+
/* KEYED_FRAGMENT */
|
|
1371
|
+
))
|
|
1265
1372
|
]),
|
|
1266
1373
|
createElementVNode("img", {
|
|
1267
1374
|
class: "m-form-schematic",
|
|
1268
1375
|
src: _ctx.config.schematic
|
|
1269
1376
|
}, null, 8, _hoisted_5$1)
|
|
1270
|
-
])) : (openBlock(true), createElementBlock(
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1377
|
+
])) : (openBlock(true), createElementBlock(
|
|
1378
|
+
Fragment,
|
|
1379
|
+
{ key: 1 },
|
|
1380
|
+
renderList(items.value, (item, index) => {
|
|
1381
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
1382
|
+
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1383
|
+
config: item,
|
|
1384
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1385
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1386
|
+
"is-compare": _ctx.isCompare,
|
|
1387
|
+
prop: _ctx.prop,
|
|
1388
|
+
size: _ctx.size,
|
|
1389
|
+
disabled: _ctx.disabled,
|
|
1390
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1391
|
+
onChange: changeHandler,
|
|
1392
|
+
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
1393
|
+
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
|
|
1394
|
+
}),
|
|
1395
|
+
128
|
|
1396
|
+
/* KEYED_FRAGMENT */
|
|
1397
|
+
))
|
|
1285
1398
|
])
|
|
1286
1399
|
]),
|
|
1287
1400
|
_: 3
|
|
1288
|
-
|
|
1401
|
+
/* FORWARDED */
|
|
1402
|
+
}, 8, ["body-style"])) : createCommentVNode("v-if", true);
|
|
1289
1403
|
};
|
|
1290
1404
|
}
|
|
1291
1405
|
});
|
|
@@ -1333,6 +1447,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1333
1447
|
}, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "label-width", "expand-more", "size", "disabled"])
|
|
1334
1448
|
]),
|
|
1335
1449
|
_: 1
|
|
1450
|
+
/* STABLE */
|
|
1336
1451
|
}, 8, ["span"])), [
|
|
1337
1452
|
[vShow, display$1.value && _ctx.config.type !== "hidden"]
|
|
1338
1453
|
]);
|
|
@@ -1369,25 +1484,32 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1369
1484
|
return (_ctx, _cache) => {
|
|
1370
1485
|
return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
|
|
1371
1486
|
default: withCtx(() => [
|
|
1372
|
-
(openBlock(true), createElementBlock(
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1487
|
+
(openBlock(true), createElementBlock(
|
|
1488
|
+
Fragment,
|
|
1489
|
+
null,
|
|
1490
|
+
renderList(_ctx.config.items, (col, index) => {
|
|
1491
|
+
return openBlock(), createBlock(_sfc_main$s, {
|
|
1492
|
+
key: col[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1493
|
+
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1494
|
+
config: col,
|
|
1495
|
+
labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1496
|
+
expandMore: _ctx.expandMore,
|
|
1497
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1498
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1499
|
+
"is-compare": _ctx.isCompare,
|
|
1500
|
+
prop: _ctx.prop,
|
|
1501
|
+
size: _ctx.size,
|
|
1502
|
+
disabled: _ctx.disabled,
|
|
1503
|
+
onChange: changeHandler,
|
|
1504
|
+
onAddDiffCount
|
|
1505
|
+
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "lastValues", "is-compare", "prop", "size", "disabled"]);
|
|
1506
|
+
}),
|
|
1507
|
+
128
|
|
1508
|
+
/* KEYED_FRAGMENT */
|
|
1509
|
+
))
|
|
1389
1510
|
]),
|
|
1390
1511
|
_: 1
|
|
1512
|
+
/* STABLE */
|
|
1391
1513
|
});
|
|
1392
1514
|
};
|
|
1393
1515
|
}
|
|
@@ -1434,40 +1556,71 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1434
1556
|
space: _ctx.config.space
|
|
1435
1557
|
}, {
|
|
1436
1558
|
default: withCtx(() => [
|
|
1437
|
-
(openBlock(true), createElementBlock(
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1559
|
+
(openBlock(true), createElementBlock(
|
|
1560
|
+
Fragment,
|
|
1561
|
+
null,
|
|
1562
|
+
renderList(_ctx.config.items, (item, index) => {
|
|
1563
|
+
return openBlock(), createBlock(unref(TMagicStep), {
|
|
1564
|
+
key: item.__key,
|
|
1565
|
+
title: item.title,
|
|
1566
|
+
active: active.value,
|
|
1567
|
+
onClick: ($event) => stepClick(index)
|
|
1568
|
+
}, null, 8, ["title", "active", "onClick"]);
|
|
1569
|
+
}),
|
|
1570
|
+
128
|
|
1571
|
+
/* KEYED_FRAGMENT */
|
|
1572
|
+
))
|
|
1445
1573
|
]),
|
|
1446
1574
|
_: 1
|
|
1575
|
+
/* STABLE */
|
|
1447
1576
|
}, 8, ["active", "space"]),
|
|
1448
|
-
(openBlock(true), createElementBlock(
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1577
|
+
(openBlock(true), createElementBlock(
|
|
1578
|
+
Fragment,
|
|
1579
|
+
null,
|
|
1580
|
+
renderList(_ctx.config.items, (step, index) => {
|
|
1581
|
+
return openBlock(), createElementBlock(
|
|
1582
|
+
Fragment,
|
|
1583
|
+
null,
|
|
1584
|
+
[
|
|
1585
|
+
(openBlock(true), createElementBlock(
|
|
1586
|
+
Fragment,
|
|
1587
|
+
null,
|
|
1588
|
+
renderList(step.items, (item) => {
|
|
1589
|
+
return openBlock(), createElementBlock(
|
|
1590
|
+
Fragment,
|
|
1591
|
+
null,
|
|
1592
|
+
[
|
|
1593
|
+
item ? withDirectives((openBlock(), createBlock(_sfc_main$x, {
|
|
1594
|
+
key: item[unref(mForm)?.keyProp || "__key"],
|
|
1595
|
+
config: item,
|
|
1596
|
+
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
1597
|
+
lastValues: step.name ? _ctx.lastValues[step.name] : _ctx.lastValues,
|
|
1598
|
+
"is-compare": _ctx.isCompare,
|
|
1599
|
+
prop: `${step.name}`,
|
|
1600
|
+
size: _ctx.size,
|
|
1601
|
+
disabled: _ctx.disabled,
|
|
1602
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1603
|
+
onChange: changeHandler,
|
|
1604
|
+
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
1605
|
+
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"])), [
|
|
1606
|
+
[vShow, active.value - 1 === index]
|
|
1607
|
+
]) : createCommentVNode("v-if", true)
|
|
1608
|
+
],
|
|
1609
|
+
64
|
|
1610
|
+
/* STABLE_FRAGMENT */
|
|
1611
|
+
);
|
|
1612
|
+
}),
|
|
1613
|
+
256
|
|
1614
|
+
/* UNKEYED_FRAGMENT */
|
|
1615
|
+
))
|
|
1616
|
+
],
|
|
1617
|
+
64
|
|
1618
|
+
/* STABLE_FRAGMENT */
|
|
1619
|
+
);
|
|
1620
|
+
}),
|
|
1621
|
+
256
|
|
1622
|
+
/* UNKEYED_FRAGMENT */
|
|
1623
|
+
))
|
|
1471
1624
|
]);
|
|
1472
1625
|
};
|
|
1473
1626
|
}
|
|
@@ -1719,7 +1872,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1719
1872
|
}
|
|
1720
1873
|
timer = setTimeout(() => {
|
|
1721
1874
|
swapArray(index, index - 1);
|
|
1722
|
-
timer =
|
|
1875
|
+
timer = undefined;
|
|
1723
1876
|
}, 300);
|
|
1724
1877
|
};
|
|
1725
1878
|
const topHandler = (index) => {
|
|
@@ -1738,7 +1891,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1738
1891
|
}
|
|
1739
1892
|
timer = setTimeout(() => {
|
|
1740
1893
|
swapArray(index, index + 1);
|
|
1741
|
-
timer =
|
|
1894
|
+
timer = undefined;
|
|
1742
1895
|
}, 300);
|
|
1743
1896
|
};
|
|
1744
1897
|
const bottomHandler = (index) => {
|
|
@@ -1862,276 +2015,329 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1862
2015
|
to: "body",
|
|
1863
2016
|
disabled: !isFullscreen.value
|
|
1864
2017
|
}, [
|
|
1865
|
-
createElementVNode(
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
}, null, 8, _hoisted_2$2)) : createCommentVNode("", true),
|
|
1875
|
-
createVNode(unref(TMagicTooltip), {
|
|
1876
|
-
content: "拖拽可排序",
|
|
1877
|
-
placement: "left-start",
|
|
1878
|
-
disabled: _ctx.config.dropSort !== true
|
|
1879
|
-
}, {
|
|
1880
|
-
default: withCtx(() => [
|
|
1881
|
-
_ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
|
|
1882
|
-
ref_key: "tMagicTable",
|
|
1883
|
-
ref: tMagicTable,
|
|
1884
|
-
style: { "width": "100%" },
|
|
1885
|
-
"row-key": _ctx.config.rowKey || "id",
|
|
1886
|
-
data: data.value,
|
|
1887
|
-
lastData: lastData.value,
|
|
1888
|
-
border: _ctx.config.border,
|
|
1889
|
-
"max-height": _ctx.config.maxHeight,
|
|
1890
|
-
"default-expand-all": true,
|
|
1891
|
-
key: updateKey.value,
|
|
1892
|
-
onSelect: selectHandle,
|
|
1893
|
-
onSortChange: sortChange
|
|
1894
|
-
}, {
|
|
1895
|
-
default: withCtx(() => [
|
|
1896
|
-
_ctx.config.itemExtra && !_ctx.config.dropSort ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1897
|
-
key: 0,
|
|
1898
|
-
fixed: "left",
|
|
1899
|
-
width: "30",
|
|
1900
|
-
type: "expand"
|
|
1901
|
-
}, {
|
|
1902
|
-
default: withCtx((scope) => [
|
|
1903
|
-
createElementVNode("span", {
|
|
1904
|
-
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
1905
|
-
class: "m-form-tip"
|
|
1906
|
-
}, null, 8, _hoisted_3)
|
|
1907
|
-
]),
|
|
1908
|
-
_: 1
|
|
1909
|
-
})) : createCommentVNode("", true),
|
|
1910
|
-
createVNode(unref(TMagicTableColumn), {
|
|
1911
|
-
label: "操作",
|
|
1912
|
-
width: _ctx.config.operateColWidth || 100,
|
|
1913
|
-
align: "center",
|
|
1914
|
-
fixed: _ctx.config.fixed === false ? void 0 : "left"
|
|
1915
|
-
}, {
|
|
1916
|
-
default: withCtx((scope) => [
|
|
1917
|
-
renderSlot(_ctx.$slots, "operateCol", { scope }),
|
|
1918
|
-
withDirectives(createVNode(unref(TMagicButton), {
|
|
1919
|
-
size: "small",
|
|
1920
|
-
type: "danger",
|
|
1921
|
-
link: "",
|
|
1922
|
-
title: "删除",
|
|
1923
|
-
icon: unref(Delete),
|
|
1924
|
-
onClick: ($event) => removeHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1925
|
-
}, null, 8, ["icon", "onClick"]), [
|
|
1926
|
-
[vShow, showDelete(scope.$index + 1 + pagecontext.value * pagesize.value - 1)]
|
|
1927
|
-
]),
|
|
1928
|
-
copyable(scope.$index + 1 + pagecontext.value * pagesize.value - 1) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1929
|
-
key: 0,
|
|
1930
|
-
link: "",
|
|
1931
|
-
size: "small",
|
|
1932
|
-
type: "primary",
|
|
1933
|
-
title: "复制",
|
|
1934
|
-
icon: unref(DocumentCopy),
|
|
1935
|
-
disabled: _ctx.disabled,
|
|
1936
|
-
onClick: ($event) => copyHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1937
|
-
}, null, 8, ["icon", "disabled", "onClick"])) : createCommentVNode("", true)
|
|
1938
|
-
]),
|
|
1939
|
-
_: 3
|
|
1940
|
-
}, 8, ["width", "fixed"]),
|
|
1941
|
-
_ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1942
|
-
key: 1,
|
|
1943
|
-
label: "排序",
|
|
1944
|
-
width: "60"
|
|
1945
|
-
}, {
|
|
1946
|
-
default: withCtx((scope) => [
|
|
1947
|
-
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
1948
|
-
key: 0,
|
|
1949
|
-
content: "点击上移,双击置顶",
|
|
1950
|
-
placement: "top"
|
|
1951
|
-
}, {
|
|
1952
|
-
default: withCtx(() => [
|
|
1953
|
-
createVNode(unref(TMagicButton), {
|
|
1954
|
-
plain: "",
|
|
1955
|
-
size: "small",
|
|
1956
|
-
type: "primary",
|
|
1957
|
-
icon: unref(ArrowUp),
|
|
1958
|
-
disabled: _ctx.disabled,
|
|
1959
|
-
link: "",
|
|
1960
|
-
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1961
|
-
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1962
|
-
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1963
|
-
]),
|
|
1964
|
-
_: 2
|
|
1965
|
-
}, 1024)) : createCommentVNode("", true),
|
|
1966
|
-
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
1967
|
-
key: 1,
|
|
1968
|
-
content: "点击下移,双击置底",
|
|
1969
|
-
placement: "top"
|
|
1970
|
-
}, {
|
|
1971
|
-
default: withCtx(() => [
|
|
1972
|
-
createVNode(unref(TMagicButton), {
|
|
1973
|
-
plain: "",
|
|
1974
|
-
size: "small",
|
|
1975
|
-
type: "primary",
|
|
1976
|
-
icon: unref(ArrowDown),
|
|
1977
|
-
disabled: _ctx.disabled,
|
|
1978
|
-
link: "",
|
|
1979
|
-
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1980
|
-
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1981
|
-
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1982
|
-
]),
|
|
1983
|
-
_: 2
|
|
1984
|
-
}, 1024)) : createCommentVNode("", true)
|
|
1985
|
-
]),
|
|
1986
|
-
_: 1
|
|
1987
|
-
})) : createCommentVNode("", true),
|
|
1988
|
-
selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1989
|
-
key: 2,
|
|
1990
|
-
align: "center",
|
|
1991
|
-
"header-align": "center",
|
|
1992
|
-
type: "selection",
|
|
1993
|
-
width: "45"
|
|
1994
|
-
})) : createCommentVNode("", true),
|
|
1995
|
-
_ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1996
|
-
key: 3,
|
|
1997
|
-
width: "60",
|
|
1998
|
-
label: "序号"
|
|
1999
|
-
}, {
|
|
2000
|
-
default: withCtx((scope) => [
|
|
2001
|
-
createTextVNode(toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value), 1)
|
|
2002
|
-
]),
|
|
2003
|
-
_: 1
|
|
2004
|
-
})) : createCommentVNode("", true),
|
|
2005
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (column, index) => {
|
|
2006
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
2007
|
-
column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
2008
|
-
prop: column.name,
|
|
2009
|
-
width: column.width,
|
|
2010
|
-
label: column.label,
|
|
2011
|
-
sortable: column.sortable,
|
|
2012
|
-
"sort-orders": ["ascending", "descending"],
|
|
2013
|
-
key: column[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
2014
|
-
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
2015
|
-
}, {
|
|
2016
|
-
default: withCtx((scope) => [
|
|
2017
|
-
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$x, {
|
|
2018
|
-
key: 0,
|
|
2019
|
-
labelWidth: "0",
|
|
2020
|
-
disabled: _ctx.disabled,
|
|
2021
|
-
prop: getProp(scope.$index),
|
|
2022
|
-
rules: column.rules,
|
|
2023
|
-
config: makeConfig(column, scope.row),
|
|
2024
|
-
model: scope.row,
|
|
2025
|
-
lastValues: lastData.value[scope.$index],
|
|
2026
|
-
"is-compare": _ctx.isCompare,
|
|
2027
|
-
size: _ctx.size,
|
|
2028
|
-
onChange: changeHandler,
|
|
2029
|
-
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
2030
|
-
}, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("", true)
|
|
2031
|
-
]),
|
|
2032
|
-
_: 2
|
|
2033
|
-
}, 1032, ["prop", "width", "label", "sortable", "class-name"])) : createCommentVNode("", true)
|
|
2034
|
-
], 64);
|
|
2035
|
-
}), 256))
|
|
2036
|
-
]),
|
|
2037
|
-
_: 3
|
|
2038
|
-
}, 8, ["row-key", "data", "lastData", "border", "max-height"])) : createCommentVNode("", true)
|
|
2039
|
-
]),
|
|
2040
|
-
_: 3
|
|
2041
|
-
}, 8, ["disabled"]),
|
|
2042
|
-
renderSlot(_ctx.$slots, "default"),
|
|
2043
|
-
createElementVNode("div", _hoisted_4, [
|
|
2044
|
-
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
2018
|
+
createElementVNode(
|
|
2019
|
+
"div",
|
|
2020
|
+
{
|
|
2021
|
+
ref_key: "mTable",
|
|
2022
|
+
ref: mTable,
|
|
2023
|
+
class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
|
|
2024
|
+
},
|
|
2025
|
+
[
|
|
2026
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
2045
2027
|
key: 0,
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2028
|
+
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
2029
|
+
innerHTML: _ctx.config.extra
|
|
2030
|
+
}, null, 8, _hoisted_2$2)) : createCommentVNode("v-if", true),
|
|
2031
|
+
createVNode(unref(TMagicTooltip), {
|
|
2032
|
+
content: "拖拽可排序",
|
|
2033
|
+
placement: "left-start",
|
|
2034
|
+
disabled: _ctx.config.dropSort !== true
|
|
2051
2035
|
}, {
|
|
2052
|
-
default: withCtx(() =>
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2036
|
+
default: withCtx(() => [
|
|
2037
|
+
_ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
|
|
2038
|
+
ref_key: "tMagicTable",
|
|
2039
|
+
ref: tMagicTable,
|
|
2040
|
+
style: { "width": "100%" },
|
|
2041
|
+
"row-key": _ctx.config.rowKey || "id",
|
|
2042
|
+
data: data.value,
|
|
2043
|
+
lastData: lastData.value,
|
|
2044
|
+
border: _ctx.config.border,
|
|
2045
|
+
"max-height": _ctx.config.maxHeight,
|
|
2046
|
+
"default-expand-all": true,
|
|
2047
|
+
key: updateKey.value,
|
|
2048
|
+
onSelect: selectHandle,
|
|
2049
|
+
onSortChange: sortChange
|
|
2050
|
+
}, {
|
|
2051
|
+
default: withCtx(() => [
|
|
2052
|
+
_ctx.config.itemExtra && !_ctx.config.dropSort ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
2053
|
+
key: 0,
|
|
2054
|
+
fixed: "left",
|
|
2055
|
+
width: "30",
|
|
2056
|
+
type: "expand"
|
|
2057
|
+
}, {
|
|
2058
|
+
default: withCtx((scope) => [
|
|
2059
|
+
createElementVNode("span", {
|
|
2060
|
+
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
2061
|
+
class: "m-form-tip"
|
|
2062
|
+
}, null, 8, _hoisted_3)
|
|
2063
|
+
]),
|
|
2064
|
+
_: 1
|
|
2065
|
+
/* STABLE */
|
|
2066
|
+
})) : createCommentVNode("v-if", true),
|
|
2067
|
+
createVNode(unref(TMagicTableColumn), {
|
|
2068
|
+
label: "操作",
|
|
2069
|
+
width: _ctx.config.operateColWidth || 100,
|
|
2070
|
+
align: "center",
|
|
2071
|
+
fixed: _ctx.config.fixed === false ? undefined : "left"
|
|
2072
|
+
}, {
|
|
2073
|
+
default: withCtx((scope) => [
|
|
2074
|
+
renderSlot(_ctx.$slots, "operateCol", { scope }),
|
|
2075
|
+
withDirectives(createVNode(unref(TMagicButton), {
|
|
2076
|
+
size: "small",
|
|
2077
|
+
type: "danger",
|
|
2078
|
+
link: "",
|
|
2079
|
+
title: "删除",
|
|
2080
|
+
icon: unref(Delete),
|
|
2081
|
+
onClick: ($event) => removeHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
2082
|
+
}, null, 8, ["icon", "onClick"]), [
|
|
2083
|
+
[vShow, showDelete(scope.$index + 1 + pagecontext.value * pagesize.value - 1)]
|
|
2084
|
+
]),
|
|
2085
|
+
copyable(scope.$index + 1 + pagecontext.value * pagesize.value - 1) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
2086
|
+
key: 0,
|
|
2087
|
+
link: "",
|
|
2088
|
+
size: "small",
|
|
2089
|
+
type: "primary",
|
|
2090
|
+
title: "复制",
|
|
2091
|
+
icon: unref(DocumentCopy),
|
|
2092
|
+
disabled: _ctx.disabled,
|
|
2093
|
+
onClick: ($event) => copyHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
2094
|
+
}, null, 8, ["icon", "disabled", "onClick"])) : createCommentVNode("v-if", true)
|
|
2095
|
+
]),
|
|
2096
|
+
_: 3
|
|
2097
|
+
/* FORWARDED */
|
|
2098
|
+
}, 8, ["width", "fixed"]),
|
|
2099
|
+
_ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
2100
|
+
key: 1,
|
|
2101
|
+
label: "排序",
|
|
2102
|
+
width: "60"
|
|
2103
|
+
}, {
|
|
2104
|
+
default: withCtx((scope) => [
|
|
2105
|
+
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (openBlock(), createBlock(
|
|
2106
|
+
unref(TMagicTooltip),
|
|
2107
|
+
{
|
|
2108
|
+
key: 0,
|
|
2109
|
+
content: "点击上移,双击置顶",
|
|
2110
|
+
placement: "top"
|
|
2111
|
+
},
|
|
2112
|
+
{
|
|
2113
|
+
default: withCtx(() => [
|
|
2114
|
+
createVNode(unref(TMagicButton), {
|
|
2115
|
+
plain: "",
|
|
2116
|
+
size: "small",
|
|
2117
|
+
type: "primary",
|
|
2118
|
+
icon: unref(ArrowUp),
|
|
2119
|
+
disabled: _ctx.disabled,
|
|
2120
|
+
link: "",
|
|
2121
|
+
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
2122
|
+
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
2123
|
+
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
2124
|
+
]),
|
|
2125
|
+
_: 2
|
|
2126
|
+
/* DYNAMIC */
|
|
2127
|
+
},
|
|
2128
|
+
1024
|
|
2129
|
+
/* DYNAMIC_SLOTS */
|
|
2130
|
+
)) : createCommentVNode("v-if", true),
|
|
2131
|
+
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(
|
|
2132
|
+
unref(TMagicTooltip),
|
|
2133
|
+
{
|
|
2134
|
+
key: 1,
|
|
2135
|
+
content: "点击下移,双击置底",
|
|
2136
|
+
placement: "top"
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
default: withCtx(() => [
|
|
2140
|
+
createVNode(unref(TMagicButton), {
|
|
2141
|
+
plain: "",
|
|
2142
|
+
size: "small",
|
|
2143
|
+
type: "primary",
|
|
2144
|
+
icon: unref(ArrowDown),
|
|
2145
|
+
disabled: _ctx.disabled,
|
|
2146
|
+
link: "",
|
|
2147
|
+
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
2148
|
+
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
2149
|
+
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
2150
|
+
]),
|
|
2151
|
+
_: 2
|
|
2152
|
+
/* DYNAMIC */
|
|
2153
|
+
},
|
|
2154
|
+
1024
|
|
2155
|
+
/* DYNAMIC_SLOTS */
|
|
2156
|
+
)) : createCommentVNode("v-if", true)
|
|
2157
|
+
]),
|
|
2158
|
+
_: 1
|
|
2159
|
+
/* STABLE */
|
|
2160
|
+
})) : createCommentVNode("v-if", true),
|
|
2161
|
+
selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
2162
|
+
key: 2,
|
|
2163
|
+
align: "center",
|
|
2164
|
+
"header-align": "center",
|
|
2165
|
+
type: "selection",
|
|
2166
|
+
width: "45"
|
|
2167
|
+
})) : createCommentVNode("v-if", true),
|
|
2168
|
+
_ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
2169
|
+
key: 3,
|
|
2170
|
+
width: "60",
|
|
2171
|
+
label: "序号"
|
|
2172
|
+
}, {
|
|
2173
|
+
default: withCtx((scope) => [
|
|
2174
|
+
createTextVNode(
|
|
2175
|
+
toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value),
|
|
2176
|
+
1
|
|
2177
|
+
/* TEXT */
|
|
2178
|
+
)
|
|
2179
|
+
]),
|
|
2180
|
+
_: 1
|
|
2181
|
+
/* STABLE */
|
|
2182
|
+
})) : createCommentVNode("v-if", true),
|
|
2183
|
+
(openBlock(true), createElementBlock(
|
|
2184
|
+
Fragment,
|
|
2185
|
+
null,
|
|
2186
|
+
renderList(_ctx.config.items, (column, index) => {
|
|
2187
|
+
return openBlock(), createElementBlock(
|
|
2188
|
+
Fragment,
|
|
2189
|
+
null,
|
|
2190
|
+
[
|
|
2191
|
+
column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
2192
|
+
prop: column.name,
|
|
2193
|
+
width: column.width,
|
|
2194
|
+
label: column.label,
|
|
2195
|
+
sortable: column.sortable,
|
|
2196
|
+
"sort-orders": ["ascending", "descending"],
|
|
2197
|
+
key: column[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
2198
|
+
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
2199
|
+
}, {
|
|
2200
|
+
default: withCtx((scope) => [
|
|
2201
|
+
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$x, {
|
|
2202
|
+
key: 0,
|
|
2203
|
+
labelWidth: "0",
|
|
2204
|
+
disabled: _ctx.disabled,
|
|
2205
|
+
prop: getProp(scope.$index),
|
|
2206
|
+
rules: column.rules,
|
|
2207
|
+
config: makeConfig(column, scope.row),
|
|
2208
|
+
model: scope.row,
|
|
2209
|
+
lastValues: lastData.value[scope.$index],
|
|
2210
|
+
"is-compare": _ctx.isCompare,
|
|
2211
|
+
size: _ctx.size,
|
|
2212
|
+
onChange: changeHandler,
|
|
2213
|
+
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
2214
|
+
}, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("v-if", true)
|
|
2215
|
+
]),
|
|
2216
|
+
_: 2
|
|
2217
|
+
/* DYNAMIC */
|
|
2218
|
+
}, 1032, ["prop", "width", "label", "sortable", "class-name"])) : createCommentVNode("v-if", true)
|
|
2219
|
+
],
|
|
2220
|
+
64
|
|
2221
|
+
/* STABLE_FRAGMENT */
|
|
2222
|
+
);
|
|
2223
|
+
}),
|
|
2224
|
+
256
|
|
2225
|
+
/* UNKEYED_FRAGMENT */
|
|
2226
|
+
))
|
|
2227
|
+
]),
|
|
2228
|
+
_: 3
|
|
2229
|
+
/* FORWARDED */
|
|
2230
|
+
}, 8, ["row-key", "data", "lastData", "border", "max-height"])) : createCommentVNode("v-if", true)
|
|
2231
|
+
]),
|
|
2232
|
+
_: 3
|
|
2233
|
+
/* FORWARDED */
|
|
2234
|
+
}, 8, ["disabled"]),
|
|
2235
|
+
renderSlot(_ctx.$slots, "default"),
|
|
2236
|
+
createElementVNode("div", _hoisted_4, [
|
|
2237
|
+
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
2238
|
+
key: 0,
|
|
2109
2239
|
size: "small",
|
|
2110
|
-
type: "
|
|
2240
|
+
type: "primary",
|
|
2111
2241
|
disabled: _ctx.disabled,
|
|
2112
2242
|
plain: "",
|
|
2113
|
-
onClick: _cache[
|
|
2243
|
+
onClick: _cache[1] || (_cache[1] = ($event) => newHandler())
|
|
2114
2244
|
}, {
|
|
2115
|
-
default: withCtx(() => _cache[
|
|
2116
|
-
createTextVNode("
|
|
2245
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
2246
|
+
createTextVNode("新增一行")
|
|
2117
2247
|
])),
|
|
2118
2248
|
_: 1
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2249
|
+
/* STABLE */
|
|
2250
|
+
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
2251
|
+
createElementVNode("div", _hoisted_5, [
|
|
2252
|
+
_ctx.enableToggleMode && _ctx.config.enableToggleMode !== false && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
2253
|
+
key: 0,
|
|
2254
|
+
icon: unref(Grid),
|
|
2255
|
+
size: "small",
|
|
2256
|
+
type: "primary",
|
|
2257
|
+
onClick: toggleMode
|
|
2258
|
+
}, {
|
|
2259
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
2260
|
+
createTextVNode("展开配置")
|
|
2261
|
+
])),
|
|
2262
|
+
_: 1
|
|
2263
|
+
/* STABLE */
|
|
2264
|
+
}, 8, ["icon"])) : createCommentVNode("v-if", true),
|
|
2265
|
+
_ctx.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
2266
|
+
key: 1,
|
|
2267
|
+
icon: unref(FullScreen),
|
|
2268
|
+
size: "small",
|
|
2269
|
+
type: "primary",
|
|
2270
|
+
onClick: toggleFullscreen
|
|
2271
|
+
}, {
|
|
2272
|
+
default: withCtx(() => [
|
|
2273
|
+
createTextVNode(
|
|
2274
|
+
toDisplayString(isFullscreen.value ? "退出全屏" : "全屏编辑"),
|
|
2275
|
+
1
|
|
2276
|
+
/* TEXT */
|
|
2277
|
+
)
|
|
2278
|
+
]),
|
|
2279
|
+
_: 1
|
|
2280
|
+
/* STABLE */
|
|
2281
|
+
}, 8, ["icon"])) : createCommentVNode("v-if", true),
|
|
2282
|
+
importable.value ? (openBlock(), createBlock(unref(TMagicUpload), {
|
|
2283
|
+
key: 2,
|
|
2284
|
+
style: { "display": "inline-block" },
|
|
2285
|
+
ref_key: "excelBtn",
|
|
2286
|
+
ref: excelBtn,
|
|
2287
|
+
action: "/noop",
|
|
2288
|
+
disabled: _ctx.disabled,
|
|
2289
|
+
"on-change": excelHandler,
|
|
2290
|
+
"auto-upload": false
|
|
2291
|
+
}, {
|
|
2292
|
+
default: withCtx(() => [
|
|
2293
|
+
createVNode(unref(TMagicButton), {
|
|
2294
|
+
size: "small",
|
|
2295
|
+
type: "success",
|
|
2296
|
+
disabled: _ctx.disabled,
|
|
2297
|
+
plain: ""
|
|
2298
|
+
}, {
|
|
2299
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
2300
|
+
createTextVNode("导入EXCEL")
|
|
2301
|
+
])),
|
|
2302
|
+
_: 1
|
|
2303
|
+
/* STABLE */
|
|
2304
|
+
}, 8, ["disabled"])
|
|
2305
|
+
]),
|
|
2306
|
+
_: 1
|
|
2307
|
+
/* STABLE */
|
|
2308
|
+
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
2309
|
+
importable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
2310
|
+
key: 3,
|
|
2311
|
+
size: "small",
|
|
2312
|
+
type: "warning",
|
|
2313
|
+
disabled: _ctx.disabled,
|
|
2314
|
+
plain: "",
|
|
2315
|
+
onClick: _cache[2] || (_cache[2] = ($event) => clearHandler())
|
|
2316
|
+
}, {
|
|
2317
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
2318
|
+
createTextVNode("清空")
|
|
2319
|
+
])),
|
|
2320
|
+
_: 1
|
|
2321
|
+
/* STABLE */
|
|
2322
|
+
}, 8, ["disabled"])) : createCommentVNode("v-if", true)
|
|
2323
|
+
])
|
|
2324
|
+
]),
|
|
2325
|
+
_ctx.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
2326
|
+
createVNode(unref(TMagicPagination), {
|
|
2327
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
2328
|
+
"hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
|
|
2329
|
+
"current-page": pagecontext.value + 1,
|
|
2330
|
+
"page-sizes": [pagesize.value, 60, 120, 300],
|
|
2331
|
+
"page-size": pagesize.value,
|
|
2332
|
+
total: _ctx.model[modelName.value].length,
|
|
2333
|
+
onSizeChange: handleSizeChange,
|
|
2334
|
+
onCurrentChange: handleCurrentChange
|
|
2335
|
+
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
|
|
2336
|
+
])) : createCommentVNode("v-if", true)
|
|
2337
|
+
],
|
|
2338
|
+
2
|
|
2339
|
+
/* CLASS */
|
|
2340
|
+
)
|
|
2135
2341
|
], 8, ["disabled"]))
|
|
2136
2342
|
]);
|
|
2137
2343
|
};
|
|
@@ -2163,7 +2369,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2163
2369
|
const { config, model, prop } = props2;
|
|
2164
2370
|
const { active } = config;
|
|
2165
2371
|
if (typeof active === "function") return active(mForm2, { model, formValue: mForm2?.values, prop });
|
|
2166
|
-
if (
|
|
2372
|
+
if (0 >= props2.config.items.length) return "0";
|
|
2167
2373
|
if (typeof active !== "undefined") return active;
|
|
2168
2374
|
return "0";
|
|
2169
2375
|
};
|
|
@@ -2181,7 +2387,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2181
2387
|
const props = __props;
|
|
2182
2388
|
const emit = __emit;
|
|
2183
2389
|
const mForm = inject("mForm");
|
|
2184
|
-
const activeTabName = ref(getActive(mForm, props
|
|
2390
|
+
const activeTabName = ref(getActive(mForm, props));
|
|
2185
2391
|
const diffCount = ref({});
|
|
2186
2392
|
const tabs = computed(() => {
|
|
2187
2393
|
if (props.config.dynamic) {
|
|
@@ -2276,47 +2482,71 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2276
2482
|
}
|
|
2277
2483
|
), {
|
|
2278
2484
|
default: withCtx(() => [
|
|
2279
|
-
(openBlock(true), createElementBlock(
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2485
|
+
(openBlock(true), createElementBlock(
|
|
2486
|
+
Fragment,
|
|
2487
|
+
null,
|
|
2488
|
+
renderList(tabs.value, (tab, tabIndex) => {
|
|
2489
|
+
return openBlock(), createBlock(
|
|
2490
|
+
resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"),
|
|
2491
|
+
mergeProps(
|
|
2492
|
+
{
|
|
2493
|
+
key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex,
|
|
2494
|
+
ref_for: true
|
|
2495
|
+
},
|
|
2496
|
+
unref(tabPaneComponent)?.props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false }) || {}
|
|
2497
|
+
),
|
|
2498
|
+
{
|
|
2499
|
+
label: withCtx(() => [
|
|
2500
|
+
createElementVNode("span", null, [
|
|
2501
|
+
createTextVNode(
|
|
2502
|
+
toDisplayString(filter(tab.title)),
|
|
2503
|
+
1
|
|
2504
|
+
/* TEXT */
|
|
2505
|
+
),
|
|
2506
|
+
createVNode(unref(TMagicBadge), {
|
|
2507
|
+
hidden: !diffCount.value[tabIndex],
|
|
2508
|
+
value: diffCount.value[tabIndex],
|
|
2509
|
+
class: "diff-count-badge"
|
|
2510
|
+
}, null, 8, ["hidden", "value"])
|
|
2511
|
+
])
|
|
2512
|
+
]),
|
|
2513
|
+
default: withCtx(() => [
|
|
2514
|
+
(openBlock(true), createElementBlock(
|
|
2515
|
+
Fragment,
|
|
2516
|
+
null,
|
|
2517
|
+
renderList(tabItems(tab), (item) => {
|
|
2518
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
2519
|
+
key: item[unref(mForm)?.keyProp || "__key"],
|
|
2520
|
+
config: item,
|
|
2521
|
+
disabled: _ctx.disabled,
|
|
2522
|
+
model: _ctx.config.dynamic ? (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model)[tabIndex] : tab.name ? (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model)[tab.name] : _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
2523
|
+
"last-values": unref(isEmpty)(_ctx.lastValues) ? {} : _ctx.config.dynamic ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tabIndex] : tab.name ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tab.name] : _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
2524
|
+
"is-compare": _ctx.isCompare,
|
|
2525
|
+
prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
|
|
2526
|
+
size: _ctx.size,
|
|
2527
|
+
"label-width": tab.labelWidth || _ctx.labelWidth,
|
|
2528
|
+
"expand-more": _ctx.expandMore,
|
|
2529
|
+
onChange: changeHandler,
|
|
2530
|
+
onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
|
|
2531
|
+
}, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
|
|
2532
|
+
}),
|
|
2533
|
+
128
|
|
2534
|
+
/* KEYED_FRAGMENT */
|
|
2535
|
+
))
|
|
2536
|
+
]),
|
|
2537
|
+
_: 2
|
|
2538
|
+
/* DYNAMIC */
|
|
2539
|
+
},
|
|
2540
|
+
1040
|
|
2541
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
2542
|
+
);
|
|
2543
|
+
}),
|
|
2544
|
+
128
|
|
2545
|
+
/* KEYED_FRAGMENT */
|
|
2546
|
+
))
|
|
2318
2547
|
]),
|
|
2319
2548
|
_: 1
|
|
2549
|
+
/* STABLE */
|
|
2320
2550
|
}, 16, ["modelValue", "class"]);
|
|
2321
2551
|
};
|
|
2322
2552
|
}
|
|
@@ -2497,7 +2727,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2497
2727
|
} else {
|
|
2498
2728
|
return props.config.activeValue;
|
|
2499
2729
|
}
|
|
2500
|
-
return
|
|
2730
|
+
return undefined;
|
|
2501
2731
|
});
|
|
2502
2732
|
const inactiveValue = computed(() => {
|
|
2503
2733
|
if (typeof props.config.inactiveValue === "undefined") {
|
|
@@ -2507,7 +2737,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2507
2737
|
} else {
|
|
2508
2738
|
return props.config.inactiveValue;
|
|
2509
2739
|
}
|
|
2510
|
-
return
|
|
2740
|
+
return undefined;
|
|
2511
2741
|
});
|
|
2512
2742
|
const changeHandler = (value) => {
|
|
2513
2743
|
emit("change", value);
|
|
@@ -2523,9 +2753,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2523
2753
|
onChange: changeHandler
|
|
2524
2754
|
}, {
|
|
2525
2755
|
default: withCtx(() => [
|
|
2526
|
-
createTextVNode(
|
|
2756
|
+
createTextVNode(
|
|
2757
|
+
toDisplayString(_ctx.config.text),
|
|
2758
|
+
1
|
|
2759
|
+
/* TEXT */
|
|
2760
|
+
)
|
|
2527
2761
|
]),
|
|
2528
2762
|
_: 1
|
|
2763
|
+
/* STABLE */
|
|
2529
2764
|
}, 8, ["modelValue", "size", "trueValue", "falseValue", "disabled"]);
|
|
2530
2765
|
};
|
|
2531
2766
|
}
|
|
@@ -2574,20 +2809,32 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2574
2809
|
onChange: changeHandler
|
|
2575
2810
|
}, {
|
|
2576
2811
|
default: withCtx(() => [
|
|
2577
|
-
(openBlock(true), createElementBlock(
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2812
|
+
(openBlock(true), createElementBlock(
|
|
2813
|
+
Fragment,
|
|
2814
|
+
null,
|
|
2815
|
+
renderList(options.value, (option) => {
|
|
2816
|
+
return openBlock(), createBlock(unref(TMagicCheckbox), {
|
|
2817
|
+
value: option.value,
|
|
2818
|
+
key: option.value,
|
|
2819
|
+
disabled: option.disabled
|
|
2820
|
+
}, {
|
|
2821
|
+
default: withCtx(() => [
|
|
2822
|
+
createTextVNode(
|
|
2823
|
+
toDisplayString(option.text),
|
|
2824
|
+
1
|
|
2825
|
+
/* TEXT */
|
|
2826
|
+
)
|
|
2827
|
+
]),
|
|
2828
|
+
_: 2
|
|
2829
|
+
/* DYNAMIC */
|
|
2830
|
+
}, 1032, ["value", "disabled"]);
|
|
2831
|
+
}),
|
|
2832
|
+
128
|
|
2833
|
+
/* KEYED_FRAGMENT */
|
|
2834
|
+
))
|
|
2589
2835
|
]),
|
|
2590
2836
|
_: 1
|
|
2837
|
+
/* STABLE */
|
|
2591
2838
|
}, 8, ["modelValue", "size", "disabled"]);
|
|
2592
2839
|
};
|
|
2593
2840
|
}
|
|
@@ -2692,7 +2939,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2692
2939
|
useAddField(props.prop);
|
|
2693
2940
|
const { names } = props.config;
|
|
2694
2941
|
const value = ref([]);
|
|
2695
|
-
if (props.model !==
|
|
2942
|
+
if (props.model !== undefined) {
|
|
2696
2943
|
if (names?.length) {
|
|
2697
2944
|
watch(
|
|
2698
2945
|
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
@@ -2716,7 +2963,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2716
2963
|
const format = `${props.config.dateFormat || "YYYY/MM/DD"} ${props.config.timeFormat || "HH:mm:ss"}`;
|
|
2717
2964
|
if (start !== preStart)
|
|
2718
2965
|
value.value = start.map(
|
|
2719
|
-
(item) => item ? datetimeFormatter(item, "", format) :
|
|
2966
|
+
(item) => item ? datetimeFormatter(item, "", format) : undefined
|
|
2720
2967
|
);
|
|
2721
2968
|
},
|
|
2722
2969
|
{
|
|
@@ -2733,7 +2980,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2733
2980
|
if (Array.isArray(v)) {
|
|
2734
2981
|
props.model[item] = v[index];
|
|
2735
2982
|
} else {
|
|
2736
|
-
props.model[item] =
|
|
2983
|
+
props.model[item] = undefined;
|
|
2737
2984
|
}
|
|
2738
2985
|
});
|
|
2739
2986
|
};
|
|
@@ -2847,7 +3094,13 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2847
3094
|
}
|
|
2848
3095
|
useAddField(props.prop);
|
|
2849
3096
|
return (_ctx, _cache) => {
|
|
2850
|
-
return _ctx.model ? (openBlock(), createElementBlock(
|
|
3097
|
+
return _ctx.model ? (openBlock(), createElementBlock(
|
|
3098
|
+
"span",
|
|
3099
|
+
_hoisted_1$8,
|
|
3100
|
+
toDisplayString(_ctx.model[_ctx.name]),
|
|
3101
|
+
1
|
|
3102
|
+
/* TEXT */
|
|
3103
|
+
)) : createCommentVNode("v-if", true);
|
|
2851
3104
|
};
|
|
2852
3105
|
}
|
|
2853
3106
|
});
|
|
@@ -2887,9 +3140,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2887
3140
|
fieldMap.value = {};
|
|
2888
3141
|
fieldLabelMap.value = {};
|
|
2889
3142
|
fields.forEach((v) => {
|
|
2890
|
-
if (typeof v !== "object" || v.name ===
|
|
3143
|
+
if (typeof v !== "object" || v.name === undefined) return;
|
|
2891
3144
|
let oldVal = props.model?.[v.name] || "";
|
|
2892
|
-
if (!oldVal && v.defaultValue !==
|
|
3145
|
+
if (!oldVal && v.defaultValue !== undefined) {
|
|
2893
3146
|
oldVal = v.defaultValue;
|
|
2894
3147
|
emit("change", oldVal, { modifyKey: v.name });
|
|
2895
3148
|
}
|
|
@@ -2922,24 +3175,32 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2922
3175
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2923
3176
|
createVNode(unref(TMagicForm), { size: "small" }, {
|
|
2924
3177
|
default: withCtx(() => [
|
|
2925
|
-
(openBlock(true), createElementBlock(
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
3178
|
+
(openBlock(true), createElementBlock(
|
|
3179
|
+
Fragment,
|
|
3180
|
+
null,
|
|
3181
|
+
renderList(Object.keys(fieldMap.value), (key) => {
|
|
3182
|
+
return openBlock(), createBlock(unref(TMagicFormItem), {
|
|
3183
|
+
key,
|
|
3184
|
+
label: fieldLabelMap.value[key]
|
|
3185
|
+
}, {
|
|
3186
|
+
default: withCtx(() => [
|
|
3187
|
+
createVNode(unref(TMagicInput), {
|
|
3188
|
+
modelValue: fieldMap.value[key],
|
|
3189
|
+
"onUpdate:modelValue": ($event) => fieldMap.value[key] = $event,
|
|
3190
|
+
placeholder: fieldLabelMap.value[key],
|
|
3191
|
+
onChange: ($event) => inputChangeHandler(key)
|
|
3192
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"])
|
|
3193
|
+
]),
|
|
3194
|
+
_: 2
|
|
3195
|
+
/* DYNAMIC */
|
|
3196
|
+
}, 1032, ["label"]);
|
|
3197
|
+
}),
|
|
3198
|
+
128
|
|
3199
|
+
/* KEYED_FRAGMENT */
|
|
3200
|
+
))
|
|
2941
3201
|
]),
|
|
2942
3202
|
_: 1
|
|
3203
|
+
/* STABLE */
|
|
2943
3204
|
})
|
|
2944
3205
|
]);
|
|
2945
3206
|
};
|
|
@@ -2966,13 +3227,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2966
3227
|
const props = __props;
|
|
2967
3228
|
useAddField(props.prop);
|
|
2968
3229
|
return (_ctx, _cache) => {
|
|
2969
|
-
return _ctx.model ? withDirectives((openBlock(), createElementBlock(
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
3230
|
+
return _ctx.model ? withDirectives((openBlock(), createElementBlock(
|
|
3231
|
+
"input",
|
|
3232
|
+
{
|
|
3233
|
+
key: 0,
|
|
3234
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3235
|
+
type: "hidden"
|
|
3236
|
+
},
|
|
3237
|
+
null,
|
|
3238
|
+
512
|
|
3239
|
+
/* NEED_PATCH */
|
|
3240
|
+
)), [
|
|
2974
3241
|
[vModelText, _ctx.model[_ctx.name]]
|
|
2975
|
-
]) : createCommentVNode("", true);
|
|
3242
|
+
]) : createCommentVNode("v-if", true);
|
|
2976
3243
|
};
|
|
2977
3244
|
}
|
|
2978
3245
|
});
|
|
@@ -3132,22 +3399,29 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3132
3399
|
onSubmit: submitHandler
|
|
3133
3400
|
}, {
|
|
3134
3401
|
default: withCtx(() => [
|
|
3135
|
-
initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3402
|
+
initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(
|
|
3403
|
+
Fragment,
|
|
3404
|
+
{ key: 0 },
|
|
3405
|
+
renderList(_ctx.config, (item, index) => {
|
|
3406
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
3407
|
+
disabled: _ctx.disabled,
|
|
3408
|
+
key: item[_ctx.keyProp] ?? index,
|
|
3409
|
+
config: item,
|
|
3410
|
+
model: values.value,
|
|
3411
|
+
"last-values": lastValuesProcessed.value,
|
|
3412
|
+
"is-compare": _ctx.isCompare,
|
|
3413
|
+
"label-width": item.labelWidth || _ctx.labelWidth,
|
|
3414
|
+
"step-active": _ctx.stepActive,
|
|
3415
|
+
size: _ctx.size,
|
|
3416
|
+
onChange: changeHandler
|
|
3417
|
+
}, null, 8, ["disabled", "config", "model", "last-values", "is-compare", "label-width", "step-active", "size"]);
|
|
3418
|
+
}),
|
|
3419
|
+
128
|
|
3420
|
+
/* KEYED_FRAGMENT */
|
|
3421
|
+
)) : createCommentVNode("v-if", true)
|
|
3149
3422
|
]),
|
|
3150
3423
|
_: 1
|
|
3424
|
+
/* STABLE */
|
|
3151
3425
|
}, 8, ["model", "label-width", "style", "inline", "label-position"]);
|
|
3152
3426
|
};
|
|
3153
3427
|
}
|
|
@@ -3268,6 +3542,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3268
3542
|
])
|
|
3269
3543
|
]),
|
|
3270
3544
|
_: 3
|
|
3545
|
+
/* FORWARDED */
|
|
3271
3546
|
}),
|
|
3272
3547
|
createVNode(unref(TMagicCol), { span: 12 }, {
|
|
3273
3548
|
default: withCtx(() => [
|
|
@@ -3280,6 +3555,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3280
3555
|
createTextVNode("取 消")
|
|
3281
3556
|
])),
|
|
3282
3557
|
_: 1
|
|
3558
|
+
/* STABLE */
|
|
3283
3559
|
}),
|
|
3284
3560
|
hasStep.value && stepActive.value > 1 ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3285
3561
|
key: 0,
|
|
@@ -3291,7 +3567,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3291
3567
|
createTextVNode("上一步")
|
|
3292
3568
|
])),
|
|
3293
3569
|
_: 1
|
|
3294
|
-
|
|
3570
|
+
/* STABLE */
|
|
3571
|
+
})) : createCommentVNode("v-if", true),
|
|
3295
3572
|
hasStep.value && stepCount.value > stepActive.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3296
3573
|
key: 1,
|
|
3297
3574
|
type: "info",
|
|
@@ -3302,6 +3579,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3302
3579
|
createTextVNode("下一步")
|
|
3303
3580
|
])),
|
|
3304
3581
|
_: 1
|
|
3582
|
+
/* STABLE */
|
|
3305
3583
|
})) : (openBlock(), createBlock(unref(TMagicButton), {
|
|
3306
3584
|
key: 2,
|
|
3307
3585
|
type: "primary",
|
|
@@ -3311,44 +3589,58 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3311
3589
|
onClick: save
|
|
3312
3590
|
}, {
|
|
3313
3591
|
default: withCtx(() => [
|
|
3314
|
-
createTextVNode(
|
|
3592
|
+
createTextVNode(
|
|
3593
|
+
toDisplayString(_ctx.confirmText),
|
|
3594
|
+
1
|
|
3595
|
+
/* TEXT */
|
|
3596
|
+
)
|
|
3315
3597
|
]),
|
|
3316
3598
|
_: 1
|
|
3599
|
+
/* STABLE */
|
|
3317
3600
|
}, 8, ["disabled", "loading"]))
|
|
3318
3601
|
])
|
|
3319
3602
|
]),
|
|
3320
3603
|
_: 3
|
|
3604
|
+
/* FORWARDED */
|
|
3321
3605
|
})
|
|
3322
3606
|
]),
|
|
3323
3607
|
_: 3
|
|
3608
|
+
/* FORWARDED */
|
|
3324
3609
|
})
|
|
3325
3610
|
]),
|
|
3326
3611
|
default: withCtx(() => [
|
|
3327
|
-
dialogVisible.value ? (openBlock(), createElementBlock(
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3612
|
+
dialogVisible.value ? (openBlock(), createElementBlock(
|
|
3613
|
+
"div",
|
|
3614
|
+
{
|
|
3615
|
+
key: 0,
|
|
3616
|
+
class: "m-dialog-body",
|
|
3617
|
+
style: normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
|
|
3618
|
+
},
|
|
3619
|
+
[
|
|
3620
|
+
createVNode(_sfc_main$d, {
|
|
3621
|
+
modelValue: stepActive.value,
|
|
3622
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3623
|
+
ref_key: "form",
|
|
3624
|
+
ref: form,
|
|
3625
|
+
size: _ctx.size,
|
|
3626
|
+
disabled: _ctx.disabled,
|
|
3627
|
+
config: _ctx.config,
|
|
3628
|
+
"init-values": _ctx.values,
|
|
3629
|
+
"parent-values": _ctx.parentValues,
|
|
3630
|
+
"label-width": _ctx.labelWidth,
|
|
3631
|
+
"label-position": _ctx.labelPosition,
|
|
3632
|
+
inline: _ctx.inline,
|
|
3633
|
+
"prevent-submit-default": _ctx.preventSubmitDefault,
|
|
3634
|
+
onChange: changeHandler
|
|
3635
|
+
}, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
|
|
3636
|
+
renderSlot(_ctx.$slots, "default")
|
|
3637
|
+
],
|
|
3638
|
+
4
|
|
3639
|
+
/* STYLE */
|
|
3640
|
+
)) : createCommentVNode("v-if", true)
|
|
3350
3641
|
]),
|
|
3351
3642
|
_: 3
|
|
3643
|
+
/* FORWARDED */
|
|
3352
3644
|
}, 8, ["modelValue", "title", "width", "zIndex", "fullscreen"]);
|
|
3353
3645
|
};
|
|
3354
3646
|
}
|
|
@@ -3428,10 +3720,16 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3428
3720
|
target: "_blank",
|
|
3429
3721
|
href: href.value,
|
|
3430
3722
|
style: normalizeStyle(_ctx.config.css || {})
|
|
3431
|
-
}, toDisplayString(displayText.value), 13, _hoisted_1$5)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock(
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3723
|
+
}, toDisplayString(displayText.value), 13, _hoisted_1$5)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock(
|
|
3724
|
+
"span",
|
|
3725
|
+
{
|
|
3726
|
+
key: 1,
|
|
3727
|
+
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
3728
|
+
},
|
|
3729
|
+
toDisplayString(displayText.value),
|
|
3730
|
+
5
|
|
3731
|
+
/* TEXT, STYLE */
|
|
3732
|
+
)) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
3435
3733
|
createVNode(unref(TMagicButton), {
|
|
3436
3734
|
link: "",
|
|
3437
3735
|
type: "primary",
|
|
@@ -3441,6 +3739,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3441
3739
|
createTextVNode("点击编辑")
|
|
3442
3740
|
])),
|
|
3443
3741
|
_: 1
|
|
3742
|
+
/* STABLE */
|
|
3444
3743
|
}),
|
|
3445
3744
|
createVNode(_sfc_main$c, {
|
|
3446
3745
|
ref_key: "editor",
|
|
@@ -3502,7 +3801,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3502
3801
|
disabled: _ctx.disabled,
|
|
3503
3802
|
onChange: changeHandler,
|
|
3504
3803
|
onInput: inputHandler
|
|
3505
|
-
}, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("", true);
|
|
3804
|
+
}, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("v-if", true);
|
|
3506
3805
|
};
|
|
3507
3806
|
}
|
|
3508
3807
|
});
|
|
@@ -3548,7 +3847,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3548
3847
|
disabled: _ctx.disabled,
|
|
3549
3848
|
onChange: minChangeHandler
|
|
3550
3849
|
}, null, 8, ["modelValue", "size", "disabled"]),
|
|
3551
|
-
_cache[2] || (_cache[2] = createElementVNode(
|
|
3850
|
+
_cache[2] || (_cache[2] = createElementVNode(
|
|
3851
|
+
"span",
|
|
3852
|
+
{ class: "split-tag" },
|
|
3853
|
+
"-",
|
|
3854
|
+
-1
|
|
3855
|
+
/* HOISTED */
|
|
3856
|
+
)),
|
|
3552
3857
|
createVNode(unref(TMagicInput), {
|
|
3553
3858
|
modelValue: _ctx.model[_ctx.name][1],
|
|
3554
3859
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model[_ctx.name][1] = $event),
|
|
@@ -3601,52 +3906,87 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3601
3906
|
disabled: _ctx.disabled
|
|
3602
3907
|
}, {
|
|
3603
3908
|
default: withCtx(() => [
|
|
3604
|
-
(openBlock(true), createElementBlock(
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3909
|
+
(openBlock(true), createElementBlock(
|
|
3910
|
+
Fragment,
|
|
3911
|
+
null,
|
|
3912
|
+
renderList(_ctx.config.options, (option) => {
|
|
3913
|
+
return openBlock(), createBlock(resolveDynamicComponent(itemComponent.value), {
|
|
3914
|
+
value: option.value,
|
|
3915
|
+
key: `${option.value}`,
|
|
3916
|
+
onClick: withModifiers(($event) => clickHandler(option.value), ["prevent"])
|
|
3917
|
+
}, {
|
|
3918
|
+
default: withCtx(() => [
|
|
3919
|
+
option.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
3920
|
+
key: 0,
|
|
3921
|
+
placement: "top-start",
|
|
3922
|
+
content: option.tooltip
|
|
3923
|
+
}, {
|
|
3924
|
+
default: withCtx(() => [
|
|
3925
|
+
createElementVNode("div", null, [
|
|
3926
|
+
option.icon ? (openBlock(), createBlock(
|
|
3927
|
+
unref(TMagicIcon),
|
|
3928
|
+
{
|
|
3929
|
+
key: 0,
|
|
3930
|
+
size: "16"
|
|
3931
|
+
},
|
|
3932
|
+
{
|
|
3933
|
+
default: withCtx(() => [
|
|
3934
|
+
(openBlock(), createBlock(resolveDynamicComponent(option.icon)))
|
|
3935
|
+
]),
|
|
3936
|
+
_: 2
|
|
3937
|
+
/* DYNAMIC */
|
|
3938
|
+
},
|
|
3939
|
+
1024
|
|
3940
|
+
/* DYNAMIC_SLOTS */
|
|
3941
|
+
)) : createCommentVNode("v-if", true),
|
|
3942
|
+
createElementVNode(
|
|
3943
|
+
"span",
|
|
3944
|
+
null,
|
|
3945
|
+
toDisplayString(option.text),
|
|
3946
|
+
1
|
|
3947
|
+
/* TEXT */
|
|
3948
|
+
)
|
|
3949
|
+
])
|
|
3950
|
+
]),
|
|
3951
|
+
_: 2
|
|
3952
|
+
/* DYNAMIC */
|
|
3953
|
+
}, 1032, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3954
|
+
option.icon ? (openBlock(), createBlock(
|
|
3955
|
+
unref(TMagicIcon),
|
|
3956
|
+
{
|
|
3619
3957
|
key: 0,
|
|
3620
3958
|
size: "16"
|
|
3621
|
-
},
|
|
3959
|
+
},
|
|
3960
|
+
{
|
|
3622
3961
|
default: withCtx(() => [
|
|
3623
3962
|
(openBlock(), createBlock(resolveDynamicComponent(option.icon)))
|
|
3624
3963
|
]),
|
|
3625
3964
|
_: 2
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3965
|
+
/* DYNAMIC */
|
|
3966
|
+
},
|
|
3967
|
+
1024
|
|
3968
|
+
/* DYNAMIC_SLOTS */
|
|
3969
|
+
)) : createCommentVNode("v-if", true),
|
|
3970
|
+
createElementVNode(
|
|
3971
|
+
"span",
|
|
3972
|
+
null,
|
|
3973
|
+
toDisplayString(option.text),
|
|
3974
|
+
1
|
|
3975
|
+
/* TEXT */
|
|
3976
|
+
)
|
|
3977
|
+
]))
|
|
3978
|
+
]),
|
|
3979
|
+
_: 2
|
|
3980
|
+
/* DYNAMIC */
|
|
3981
|
+
}, 1032, ["value", "onClick"]);
|
|
3982
|
+
}),
|
|
3983
|
+
128
|
|
3984
|
+
/* KEYED_FRAGMENT */
|
|
3985
|
+
))
|
|
3647
3986
|
]),
|
|
3648
3987
|
_: 1
|
|
3649
|
-
|
|
3988
|
+
/* STABLE */
|
|
3989
|
+
}, 8, ["modelValue", "size", "disabled"])) : createCommentVNode("v-if", true);
|
|
3650
3990
|
};
|
|
3651
3991
|
}
|
|
3652
3992
|
});
|
|
@@ -3984,67 +4324,111 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3984
4324
|
onVisibleChange: visibleHandler
|
|
3985
4325
|
}, {
|
|
3986
4326
|
default: withCtx(() => [
|
|
3987
|
-
_ctx.config.group ? (openBlock(true), createElementBlock(
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4327
|
+
_ctx.config.group ? (openBlock(true), createElementBlock(
|
|
4328
|
+
Fragment,
|
|
4329
|
+
{ key: 0 },
|
|
4330
|
+
renderList(options.value, (group, index) => {
|
|
4331
|
+
return openBlock(), createBlock(
|
|
4332
|
+
resolveDynamicComponent(unref(optionGroupComponent)?.component || "el-option-group"),
|
|
4333
|
+
mergeProps(
|
|
4334
|
+
{
|
|
4335
|
+
key: index,
|
|
4336
|
+
ref_for: true
|
|
4337
|
+
},
|
|
4338
|
+
unref(optionGroupComponent)?.props({
|
|
4339
|
+
label: group.label,
|
|
4340
|
+
disabled: group.disabled
|
|
4341
|
+
}) || {
|
|
4342
|
+
label: group.label,
|
|
4343
|
+
disabled: group.disabled
|
|
4344
|
+
}
|
|
4345
|
+
),
|
|
4346
|
+
{
|
|
4347
|
+
default: withCtx(() => [
|
|
4348
|
+
(openBlock(true), createElementBlock(
|
|
4349
|
+
Fragment,
|
|
4350
|
+
null,
|
|
4351
|
+
renderList(group.options, (item, index2) => {
|
|
4352
|
+
return openBlock(), createBlock(
|
|
4353
|
+
resolveDynamicComponent(unref(optionComponent)?.component || "el-option"),
|
|
4354
|
+
mergeProps(
|
|
4355
|
+
{
|
|
4356
|
+
key: index2,
|
|
4357
|
+
ref_for: true
|
|
4358
|
+
},
|
|
4359
|
+
unref(optionComponent)?.props({
|
|
4360
|
+
label: item.label || item.text,
|
|
4361
|
+
value: item.value,
|
|
4362
|
+
disabled: item.disabled
|
|
4363
|
+
}) || {
|
|
4364
|
+
label: item.label || item.text,
|
|
4365
|
+
value: item.value,
|
|
4366
|
+
disabled: item.disabled
|
|
4367
|
+
}
|
|
4368
|
+
),
|
|
4369
|
+
null,
|
|
4370
|
+
16
|
|
4371
|
+
/* FULL_PROPS */
|
|
4372
|
+
);
|
|
4373
|
+
}),
|
|
4374
|
+
128
|
|
4375
|
+
/* KEYED_FRAGMENT */
|
|
4376
|
+
))
|
|
4377
|
+
]),
|
|
4378
|
+
_: 2
|
|
4379
|
+
/* DYNAMIC */
|
|
4380
|
+
},
|
|
4381
|
+
1040
|
|
4382
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
4383
|
+
);
|
|
4384
|
+
}),
|
|
4385
|
+
128
|
|
4386
|
+
/* KEYED_FRAGMENT */
|
|
4387
|
+
)) : (openBlock(true), createElementBlock(
|
|
4388
|
+
Fragment,
|
|
4389
|
+
{ key: 1 },
|
|
4390
|
+
renderList(options.value, (option) => {
|
|
4391
|
+
return openBlock(), createBlock(
|
|
4392
|
+
resolveDynamicComponent(unref(optionComponent)?.component || "el-option"),
|
|
4393
|
+
mergeProps(
|
|
4394
|
+
{
|
|
4395
|
+
class: "tmagic-design-option",
|
|
4396
|
+
key: _ctx.config.valueKey ? option.value[_ctx.config.valueKey] : option.value,
|
|
4397
|
+
ref_for: true
|
|
4398
|
+
},
|
|
4399
|
+
unref(optionComponent)?.props({
|
|
4400
|
+
label: option.text,
|
|
4401
|
+
value: option.value,
|
|
4402
|
+
disabled: option.disabled
|
|
4403
|
+
}) || {
|
|
4404
|
+
label: option.text,
|
|
4405
|
+
value: option.value,
|
|
4406
|
+
disabled: option.disabled
|
|
4407
|
+
}
|
|
4408
|
+
),
|
|
4409
|
+
null,
|
|
4410
|
+
16
|
|
4411
|
+
/* FULL_PROPS */
|
|
4412
|
+
);
|
|
4413
|
+
}),
|
|
4414
|
+
128
|
|
4415
|
+
/* KEYED_FRAGMENT */
|
|
4416
|
+
)),
|
|
4417
|
+
moreLoadingVisible.value ? withDirectives((openBlock(), createElementBlock(
|
|
4418
|
+
"div",
|
|
4419
|
+
_hoisted_1$2,
|
|
4420
|
+
null,
|
|
4421
|
+
512
|
|
4422
|
+
/* NEED_PATCH */
|
|
4423
|
+
)), [
|
|
4041
4424
|
[_directive_loading, true]
|
|
4042
|
-
]) : createCommentVNode("", true)
|
|
4425
|
+
]) : createCommentVNode("v-if", true)
|
|
4043
4426
|
]),
|
|
4044
4427
|
_: 1
|
|
4428
|
+
/* STABLE */
|
|
4045
4429
|
}, 8, ["modelValue", "clearable", "filterable", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method"])), [
|
|
4046
4430
|
[_directive_loading, loading.value]
|
|
4047
|
-
]) : createCommentVNode("", true);
|
|
4431
|
+
]) : createCommentVNode("v-if", true);
|
|
4048
4432
|
};
|
|
4049
4433
|
}
|
|
4050
4434
|
});
|
|
@@ -4136,7 +4520,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4136
4520
|
return {
|
|
4137
4521
|
text: props.config.append,
|
|
4138
4522
|
type: "button",
|
|
4139
|
-
handler:
|
|
4523
|
+
handler: undefined
|
|
4140
4524
|
};
|
|
4141
4525
|
}
|
|
4142
4526
|
if (props.config.append && typeof props.config.append === "object") {
|
|
@@ -4193,7 +4577,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4193
4577
|
unit = $2;
|
|
4194
4578
|
});
|
|
4195
4579
|
}
|
|
4196
|
-
if (num ===
|
|
4580
|
+
if (num === undefined) {
|
|
4197
4581
|
return;
|
|
4198
4582
|
}
|
|
4199
4583
|
const ctrl = navigator.platform.match("Mac") ? $event.metaKey : $event.ctrlKey;
|
|
@@ -4245,7 +4629,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4245
4629
|
const destroyPopover = () => {
|
|
4246
4630
|
if (!instanceRef.value) return;
|
|
4247
4631
|
instanceRef.value.destroy();
|
|
4248
|
-
instanceRef.value =
|
|
4632
|
+
instanceRef.value = undefined;
|
|
4249
4633
|
};
|
|
4250
4634
|
return (_ctx, _cache) => {
|
|
4251
4635
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
@@ -4261,7 +4645,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4261
4645
|
onChange: changeHandler,
|
|
4262
4646
|
onInput: inputHandler,
|
|
4263
4647
|
onKeyup: _cache[1] || (_cache[1] = ($event) => keyUpHandler($event))
|
|
4264
|
-
}, createSlots({
|
|
4648
|
+
}, createSlots({
|
|
4649
|
+
_: 2
|
|
4650
|
+
/* DYNAMIC */
|
|
4651
|
+
}, [
|
|
4265
4652
|
appendConfig.value ? {
|
|
4266
4653
|
name: "append",
|
|
4267
4654
|
fn: withCtx(() => [
|
|
@@ -4272,49 +4659,74 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4272
4659
|
onClick: withModifiers(buttonClickHandler, ["prevent"])
|
|
4273
4660
|
}, {
|
|
4274
4661
|
default: withCtx(() => [
|
|
4275
|
-
createTextVNode(
|
|
4662
|
+
createTextVNode(
|
|
4663
|
+
toDisplayString(appendConfig.value.text),
|
|
4664
|
+
1
|
|
4665
|
+
/* TEXT */
|
|
4666
|
+
)
|
|
4276
4667
|
]),
|
|
4277
4668
|
_: 1
|
|
4278
|
-
|
|
4669
|
+
/* STABLE */
|
|
4670
|
+
}, 8, ["size"])) : createCommentVNode("v-if", true)
|
|
4279
4671
|
]),
|
|
4280
4672
|
key: "0"
|
|
4281
|
-
} :
|
|
4673
|
+
} : undefined
|
|
4282
4674
|
]), 1032, ["modelValue", "size", "placeholder", "disabled"]),
|
|
4283
4675
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
4284
|
-
popoverVisible.value ? (openBlock(), createElementBlock(
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4676
|
+
popoverVisible.value ? (openBlock(), createElementBlock(
|
|
4677
|
+
"div",
|
|
4678
|
+
{
|
|
4679
|
+
key: 0,
|
|
4680
|
+
class: "tmagic-form-text-popper m-form-item__content",
|
|
4681
|
+
ref_key: "popoverEl",
|
|
4682
|
+
ref: popoverEl
|
|
4683
|
+
},
|
|
4684
|
+
[
|
|
4685
|
+
_cache[5] || (_cache[5] = createElementVNode(
|
|
4686
|
+
"div",
|
|
4687
|
+
{ class: "m-form-validate__warning" },
|
|
4688
|
+
"输入内容前后有空格,是否移除空格?",
|
|
4689
|
+
-1
|
|
4690
|
+
/* HOISTED */
|
|
4691
|
+
)),
|
|
4692
|
+
createElementVNode("div", _hoisted_2, [
|
|
4693
|
+
createVNode(unref(TMagicButton), {
|
|
4694
|
+
link: "",
|
|
4695
|
+
size: "small",
|
|
4696
|
+
onClick: _cache[2] || (_cache[2] = ($event) => popoverVisible.value = false)
|
|
4697
|
+
}, {
|
|
4698
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
4699
|
+
createTextVNode("保持原样")
|
|
4700
|
+
])),
|
|
4701
|
+
_: 1
|
|
4702
|
+
/* STABLE */
|
|
4703
|
+
}),
|
|
4704
|
+
createVNode(unref(TMagicButton), {
|
|
4705
|
+
type: "primary",
|
|
4706
|
+
size: "small",
|
|
4707
|
+
onClick: confirmTrimHandler
|
|
4708
|
+
}, {
|
|
4709
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
4710
|
+
createTextVNode("移除空格")
|
|
4711
|
+
])),
|
|
4712
|
+
_: 1
|
|
4713
|
+
/* STABLE */
|
|
4714
|
+
})
|
|
4715
|
+
]),
|
|
4716
|
+
_cache[6] || (_cache[6] = createElementVNode(
|
|
4717
|
+
"span",
|
|
4718
|
+
{
|
|
4719
|
+
class: "tmagic-form-text-popper-arrow",
|
|
4720
|
+
"data-popper-arrow": ""
|
|
4721
|
+
},
|
|
4722
|
+
null,
|
|
4723
|
+
-1
|
|
4724
|
+
/* HOISTED */
|
|
4725
|
+
))
|
|
4726
|
+
],
|
|
4727
|
+
512
|
|
4728
|
+
/* NEED_PATCH */
|
|
4729
|
+
)) : createCommentVNode("v-if", true)
|
|
4318
4730
|
]))
|
|
4319
4731
|
]);
|
|
4320
4732
|
};
|
|
@@ -4428,7 +4840,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4428
4840
|
useAddField(props.prop);
|
|
4429
4841
|
const { names } = props.config;
|
|
4430
4842
|
const value = ref([]);
|
|
4431
|
-
if (props.model !==
|
|
4843
|
+
if (props.model !== undefined && names?.length) {
|
|
4432
4844
|
watch(
|
|
4433
4845
|
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
4434
4846
|
([start, end], [preStart, preEnd]) => {
|
|
@@ -4452,7 +4864,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4452
4864
|
if (Array.isArray(v)) {
|
|
4453
4865
|
props.model[item] = v[index];
|
|
4454
4866
|
} else {
|
|
4455
|
-
props.model[item] =
|
|
4867
|
+
props.model[item] = undefined;
|
|
4456
4868
|
}
|
|
4457
4869
|
});
|
|
4458
4870
|
};
|
|
@@ -4591,6 +5003,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4591
5003
|
])
|
|
4592
5004
|
]),
|
|
4593
5005
|
_: 3
|
|
5006
|
+
/* FORWARDED */
|
|
4594
5007
|
}),
|
|
4595
5008
|
createVNode(unref(TMagicCol), { span: 12 }, {
|
|
4596
5009
|
default: withCtx(() => [
|
|
@@ -4600,6 +5013,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4600
5013
|
createTextVNode("关闭")
|
|
4601
5014
|
])),
|
|
4602
5015
|
_: 1
|
|
5016
|
+
/* STABLE */
|
|
4603
5017
|
}),
|
|
4604
5018
|
createVNode(unref(TMagicButton), {
|
|
4605
5019
|
type: "primary",
|
|
@@ -4608,43 +5022,57 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4608
5022
|
onClick: submitHandler
|
|
4609
5023
|
}, {
|
|
4610
5024
|
default: withCtx(() => [
|
|
4611
|
-
createTextVNode(
|
|
5025
|
+
createTextVNode(
|
|
5026
|
+
toDisplayString(_ctx.confirmText),
|
|
5027
|
+
1
|
|
5028
|
+
/* TEXT */
|
|
5029
|
+
)
|
|
4612
5030
|
]),
|
|
4613
5031
|
_: 1
|
|
5032
|
+
/* STABLE */
|
|
4614
5033
|
}, 8, ["disabled", "loading"])
|
|
4615
5034
|
])
|
|
4616
5035
|
]),
|
|
4617
5036
|
_: 3
|
|
5037
|
+
/* FORWARDED */
|
|
4618
5038
|
})
|
|
4619
5039
|
]),
|
|
4620
5040
|
_: 3
|
|
5041
|
+
/* FORWARDED */
|
|
4621
5042
|
})
|
|
4622
5043
|
]),
|
|
4623
5044
|
default: withCtx(() => [
|
|
4624
|
-
visible.value ? (openBlock(), createElementBlock(
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
5045
|
+
visible.value ? (openBlock(), createElementBlock(
|
|
5046
|
+
"div",
|
|
5047
|
+
{
|
|
5048
|
+
key: 0,
|
|
5049
|
+
ref_key: "drawerBody",
|
|
5050
|
+
ref: drawerBody,
|
|
5051
|
+
class: "m-drawer-body"
|
|
5052
|
+
},
|
|
5053
|
+
[
|
|
5054
|
+
createVNode(_sfc_main$d, {
|
|
5055
|
+
ref_key: "form",
|
|
5056
|
+
ref: form,
|
|
5057
|
+
size: _ctx.size,
|
|
5058
|
+
disabled: _ctx.disabled,
|
|
5059
|
+
config: _ctx.config,
|
|
5060
|
+
"init-values": _ctx.values,
|
|
5061
|
+
"parent-values": _ctx.parentValues,
|
|
5062
|
+
"label-width": _ctx.labelWidth,
|
|
5063
|
+
"label-position": _ctx.labelPosition,
|
|
5064
|
+
inline: _ctx.inline,
|
|
5065
|
+
"prevent-submit-default": _ctx.preventSubmitDefault,
|
|
5066
|
+
onChange: changeHandler
|
|
5067
|
+
}, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
|
|
5068
|
+
renderSlot(_ctx.$slots, "default")
|
|
5069
|
+
],
|
|
5070
|
+
512
|
|
5071
|
+
/* NEED_PATCH */
|
|
5072
|
+
)) : createCommentVNode("v-if", true)
|
|
4646
5073
|
]),
|
|
4647
5074
|
_: 3
|
|
5075
|
+
/* FORWARDED */
|
|
4648
5076
|
}, 8, ["modelValue", "title", "close-on-press-escape", "size", "zIndex", "before-close"]);
|
|
4649
5077
|
};
|
|
4650
5078
|
}
|
|
@@ -4715,60 +5143,84 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4715
5143
|
hide
|
|
4716
5144
|
});
|
|
4717
5145
|
return (_ctx, _cache) => {
|
|
4718
|
-
return openBlock(), createElementBlock(
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
config: _ctx.config,
|
|
4734
|
-
"init-values": _ctx.values,
|
|
4735
|
-
"parent-values": _ctx.parentValues,
|
|
4736
|
-
"label-width": _ctx.labelWidth,
|
|
4737
|
-
"label-position": _ctx.labelPosition,
|
|
4738
|
-
inline: _ctx.inline,
|
|
4739
|
-
"prevent-submit-default": _ctx.preventSubmitDefault,
|
|
4740
|
-
onChange: changeHandler
|
|
4741
|
-
}, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
|
|
4742
|
-
renderSlot(_ctx.$slots, "default")
|
|
4743
|
-
]),
|
|
4744
|
-
_: 3
|
|
4745
|
-
})
|
|
4746
|
-
], 4),
|
|
4747
|
-
createElementVNode("div", {
|
|
4748
|
-
class: "dialog-footer",
|
|
4749
|
-
style: normalizeStyle(`height: ${footerHeight}px`)
|
|
4750
|
-
}, [
|
|
4751
|
-
createElementVNode("div", null, [
|
|
4752
|
-
renderSlot(_ctx.$slots, "left")
|
|
4753
|
-
]),
|
|
4754
|
-
createElementVNode("div", null, [
|
|
4755
|
-
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
4756
|
-
createVNode(unref(TMagicButton), {
|
|
4757
|
-
type: "primary",
|
|
4758
|
-
size: _ctx.size,
|
|
4759
|
-
disabled: _ctx.disabled,
|
|
4760
|
-
loading: saveFetch.value,
|
|
4761
|
-
onClick: submitHandler
|
|
4762
|
-
}, {
|
|
5146
|
+
return openBlock(), createElementBlock(
|
|
5147
|
+
"div",
|
|
5148
|
+
{
|
|
5149
|
+
class: "m-form-box",
|
|
5150
|
+
style: normalizeStyle(style.value)
|
|
5151
|
+
},
|
|
5152
|
+
[
|
|
5153
|
+
createElementVNode(
|
|
5154
|
+
"div",
|
|
5155
|
+
{
|
|
5156
|
+
class: "m-box-body",
|
|
5157
|
+
style: normalizeStyle(bodyHeight.value ? { height: `${bodyHeight.value}px` } : {})
|
|
5158
|
+
},
|
|
5159
|
+
[
|
|
5160
|
+
createVNode(unref(TMagicScrollbar), null, {
|
|
4763
5161
|
default: withCtx(() => [
|
|
4764
|
-
|
|
5162
|
+
createVNode(_sfc_main$d, {
|
|
5163
|
+
ref_key: "form",
|
|
5164
|
+
ref: form,
|
|
5165
|
+
size: _ctx.size,
|
|
5166
|
+
disabled: _ctx.disabled,
|
|
5167
|
+
config: _ctx.config,
|
|
5168
|
+
"init-values": _ctx.values,
|
|
5169
|
+
"parent-values": _ctx.parentValues,
|
|
5170
|
+
"label-width": _ctx.labelWidth,
|
|
5171
|
+
"label-position": _ctx.labelPosition,
|
|
5172
|
+
inline: _ctx.inline,
|
|
5173
|
+
"prevent-submit-default": _ctx.preventSubmitDefault,
|
|
5174
|
+
onChange: changeHandler
|
|
5175
|
+
}, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
|
|
5176
|
+
renderSlot(_ctx.$slots, "default")
|
|
4765
5177
|
]),
|
|
4766
|
-
_:
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
5178
|
+
_: 3
|
|
5179
|
+
/* FORWARDED */
|
|
5180
|
+
})
|
|
5181
|
+
],
|
|
5182
|
+
4
|
|
5183
|
+
/* STYLE */
|
|
5184
|
+
),
|
|
5185
|
+
createElementVNode(
|
|
5186
|
+
"div",
|
|
5187
|
+
{
|
|
5188
|
+
class: "dialog-footer",
|
|
5189
|
+
style: normalizeStyle(`height: ${footerHeight}px`)
|
|
5190
|
+
},
|
|
5191
|
+
[
|
|
5192
|
+
createElementVNode("div", null, [
|
|
5193
|
+
renderSlot(_ctx.$slots, "left")
|
|
5194
|
+
]),
|
|
5195
|
+
createElementVNode("div", null, [
|
|
5196
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
5197
|
+
createVNode(unref(TMagicButton), {
|
|
5198
|
+
type: "primary",
|
|
5199
|
+
size: _ctx.size,
|
|
5200
|
+
disabled: _ctx.disabled,
|
|
5201
|
+
loading: saveFetch.value,
|
|
5202
|
+
onClick: submitHandler
|
|
5203
|
+
}, {
|
|
5204
|
+
default: withCtx(() => [
|
|
5205
|
+
createTextVNode(
|
|
5206
|
+
toDisplayString(_ctx.confirmText),
|
|
5207
|
+
1
|
|
5208
|
+
/* TEXT */
|
|
5209
|
+
)
|
|
5210
|
+
]),
|
|
5211
|
+
_: 1
|
|
5212
|
+
/* STABLE */
|
|
5213
|
+
}, 8, ["size", "disabled", "loading"])
|
|
5214
|
+
])
|
|
5215
|
+
])
|
|
5216
|
+
],
|
|
5217
|
+
4
|
|
5218
|
+
/* STYLE */
|
|
5219
|
+
)
|
|
5220
|
+
],
|
|
5221
|
+
4
|
|
5222
|
+
/* STYLE */
|
|
5223
|
+
);
|
|
4772
5224
|
};
|
|
4773
5225
|
}
|
|
4774
5226
|
});
|