@tmagic/form 1.3.0-alpha.1 → 1.3.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tmagic-form.js +889 -903
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +887 -901
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +10 -11
- package/src/Form.vue +5 -1
- package/src/FormDialog.vue +5 -1
- package/src/containers/Col.vue +5 -1
- package/src/containers/Container.vue +5 -1
- package/src/containers/Fieldset.vue +5 -1
- package/src/containers/GroupList.vue +5 -1
- package/src/containers/GroupListItem.vue +5 -1
- package/src/containers/Panel.vue +5 -1
- package/src/containers/Row.vue +5 -1
- package/src/containers/Step.vue +5 -1
- package/src/containers/Table.vue +5 -1
- package/src/containers/Tabs.vue +14 -8
- package/src/fields/Cascader.vue +5 -1
- package/src/fields/Checkbox.vue +5 -1
- package/src/fields/CheckboxGroup.vue +6 -2
- package/src/fields/ColorPicker.vue +5 -1
- package/src/fields/Date.vue +5 -1
- package/src/fields/DateTime.vue +5 -1
- package/src/fields/Daterange.vue +5 -1
- package/src/fields/Display.vue +5 -1
- package/src/fields/DynamicField.vue +5 -1
- package/src/fields/Hidden.vue +5 -1
- package/src/fields/Link.vue +5 -1
- package/src/fields/Number.vue +5 -1
- package/src/fields/RadioGroup.vue +5 -1
- package/src/fields/Select.vue +9 -9
- package/src/fields/SelectOptionGroups.vue +7 -3
- package/src/fields/SelectOptions.vue +5 -1
- package/src/fields/Switch.vue +5 -1
- package/src/fields/Text.vue +5 -1
- package/src/fields/Textarea.vue +5 -1
- package/src/fields/Time.vue +5 -1
- package/src/index.ts +39 -37
- package/types/Form.vue.d.ts +7 -4
- package/types/FormDialog.vue.d.ts +76 -121
- package/types/containers/Col.vue.d.ts +1 -1
- package/types/containers/Container.vue.d.ts +6 -3
- package/types/containers/Fieldset.vue.d.ts +6 -3
- package/types/containers/GroupList.vue.d.ts +1 -1
- package/types/containers/GroupListItem.vue.d.ts +1 -1
- package/types/containers/Panel.vue.d.ts +3 -3
- package/types/containers/Row.vue.d.ts +1 -1
- package/types/containers/Step.vue.d.ts +6 -3
- package/types/containers/Table.vue.d.ts +9 -6
- package/types/containers/Tabs.vue.d.ts +6 -3
- package/types/fields/Cascader.vue.d.ts +1 -1
- package/types/fields/Checkbox.vue.d.ts +1 -1
- package/types/fields/CheckboxGroup.vue.d.ts +1 -1
- package/types/fields/ColorPicker.vue.d.ts +1 -1
- package/types/fields/Date.vue.d.ts +1 -1
- package/types/fields/DateTime.vue.d.ts +1 -1
- package/types/fields/Daterange.vue.d.ts +1 -1
- package/types/fields/Display.vue.d.ts +2 -2
- package/types/fields/DynamicField.vue.d.ts +1 -10
- package/types/fields/Hidden.vue.d.ts +2 -2
- package/types/fields/Link.vue.d.ts +1 -1
- package/types/fields/Number.vue.d.ts +1 -1
- package/types/fields/RadioGroup.vue.d.ts +1 -1
- package/types/fields/Select.vue.d.ts +1 -1
- package/types/fields/SelectOptionGroups.vue.d.ts +2 -2
- package/types/fields/SelectOptions.vue.d.ts +2 -2
- package/types/fields/Switch.vue.d.ts +1 -1
- package/types/fields/Text.vue.d.ts +1 -1
- package/types/fields/Textarea.vue.d.ts +1 -1
- package/types/fields/Time.vue.d.ts +1 -1
- package/types/index.d.ts +4 -1
package/dist/tmagic-form.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass,
|
|
1
|
+
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, unref, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, mergeProps, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount, resolveDirective, createSlots, withModifiers } from 'vue';
|
|
2
2
|
import { WarningFilled, CaretBottom, CaretRight, Delete, CaretTop, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
|
|
3
3
|
import { cloneDeep, isEqual, isEmpty } from 'lodash-es';
|
|
4
4
|
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getConfig as getConfig$1, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicOptionGroup, TMagicOption, TMagicSelect, TMagicSwitch, TMagicTimePicker } from '@tmagic/design';
|
|
5
5
|
import Sortable from 'sortablejs';
|
|
6
|
-
import { asyncLoadJs, sleep, datetimeFormatter, isNumber } from '@tmagic/utils';
|
|
6
|
+
import { asyncLoadJs, sleep, datetimeFormatter, getValueByKeyPath, isNumber } from '@tmagic/utils';
|
|
7
7
|
import cloneDeep$1 from 'lodash-es/cloneDeep';
|
|
8
8
|
|
|
9
9
|
const isTableSelect = (type) => typeof type === "string" && ["table-select", "tableSelect"].includes(type);
|
|
@@ -167,35 +167,35 @@ const initValue = async (mForm, { initValues, config }) => {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
const _hoisted_1$b = ["innerHTML"];
|
|
170
|
-
const _hoisted_2$
|
|
171
|
-
const _hoisted_3$
|
|
172
|
-
const _hoisted_4$
|
|
173
|
-
const _hoisted_5$
|
|
174
|
-
const _hoisted_6$
|
|
175
|
-
const _hoisted_7$
|
|
176
|
-
const _hoisted_8$
|
|
177
|
-
const _hoisted_9
|
|
178
|
-
const _hoisted_10
|
|
170
|
+
const _hoisted_2$6 = ["innerHTML"];
|
|
171
|
+
const _hoisted_3$4 = ["innerHTML"];
|
|
172
|
+
const _hoisted_4$4 = ["innerHTML"];
|
|
173
|
+
const _hoisted_5$3 = ["innerHTML"];
|
|
174
|
+
const _hoisted_6$1 = ["innerHTML"];
|
|
175
|
+
const _hoisted_7$1 = ["innerHTML"];
|
|
176
|
+
const _hoisted_8$1 = ["innerHTML"];
|
|
177
|
+
const _hoisted_9 = ["innerHTML"];
|
|
178
|
+
const _hoisted_10 = ["innerHTML"];
|
|
179
179
|
const _hoisted_11 = ["innerHTML"];
|
|
180
180
|
const _hoisted_12 = ["innerHTML"];
|
|
181
181
|
const _hoisted_13 = {
|
|
182
182
|
key: 5,
|
|
183
183
|
style: { "text-align": "center" }
|
|
184
184
|
};
|
|
185
|
-
const __default__$v = defineComponent({
|
|
186
|
-
name: "MFormContainer"
|
|
187
|
-
});
|
|
188
185
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
189
|
-
...
|
|
186
|
+
...{
|
|
187
|
+
name: "MFormContainer"
|
|
188
|
+
},
|
|
189
|
+
__name: "Container",
|
|
190
190
|
props: {
|
|
191
|
-
model:
|
|
191
|
+
model: {},
|
|
192
192
|
lastValues: { default: () => ({}) },
|
|
193
|
-
config:
|
|
193
|
+
config: {},
|
|
194
194
|
prop: { default: "" },
|
|
195
195
|
disabled: { type: Boolean },
|
|
196
|
-
labelWidth:
|
|
196
|
+
labelWidth: {},
|
|
197
197
|
expandMore: { type: Boolean, default: false },
|
|
198
|
-
stepActive:
|
|
198
|
+
stepActive: {},
|
|
199
199
|
size: { default: "small" },
|
|
200
200
|
isCompare: { type: Boolean, default: false }
|
|
201
201
|
},
|
|
@@ -327,94 +327,94 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
327
327
|
return (_ctx, _cache) => {
|
|
328
328
|
const _component_m_fields_hidden = resolveComponent("m-fields-hidden");
|
|
329
329
|
const _component_Container = resolveComponent("Container", true);
|
|
330
|
-
return
|
|
330
|
+
return _ctx.config ? (openBlock(), createElementBlock("div", {
|
|
331
331
|
key: 0,
|
|
332
|
-
style: normalizeStyle(
|
|
333
|
-
class: normalizeClass([
|
|
332
|
+
style: normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
|
|
333
|
+
class: normalizeClass([_ctx.config.className, "m-form-container"])
|
|
334
334
|
}, [
|
|
335
|
-
|
|
335
|
+
type.value === "hidden" ? (openBlock(), createBlock(_component_m_fields_hidden, {
|
|
336
336
|
key: 0,
|
|
337
|
-
model:
|
|
338
|
-
config:
|
|
339
|
-
name:
|
|
340
|
-
disabled:
|
|
341
|
-
prop:
|
|
342
|
-
}, null, 8, ["model", "config", "name", "disabled", "prop"])) :
|
|
343
|
-
key: key(
|
|
344
|
-
size:
|
|
345
|
-
model:
|
|
346
|
-
"last-values":
|
|
347
|
-
"is-compare":
|
|
348
|
-
config:
|
|
349
|
-
disabled:
|
|
350
|
-
name:
|
|
351
|
-
prop:
|
|
352
|
-
"step-active":
|
|
337
|
+
model: _ctx.model,
|
|
338
|
+
config: _ctx.config,
|
|
339
|
+
name: _ctx.config.name,
|
|
340
|
+
disabled: disabled.value,
|
|
341
|
+
prop: itemProp.value
|
|
342
|
+
}, null, 8, ["model", "config", "name", "disabled", "prop"])) : items.value && !_ctx.config.text && type.value && display$1.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
343
|
+
key: key(_ctx.config),
|
|
344
|
+
size: _ctx.size,
|
|
345
|
+
model: _ctx.model,
|
|
346
|
+
"last-values": _ctx.lastValues,
|
|
347
|
+
"is-compare": _ctx.isCompare,
|
|
348
|
+
config: _ctx.config,
|
|
349
|
+
disabled: disabled.value,
|
|
350
|
+
name: name.value,
|
|
351
|
+
prop: itemProp.value,
|
|
352
|
+
"step-active": _ctx.stepActive,
|
|
353
353
|
"expand-more": expand.value,
|
|
354
|
-
"label-width":
|
|
354
|
+
"label-width": itemLabelWidth.value,
|
|
355
355
|
onChange: onChangeHandler,
|
|
356
356
|
onAddDiffCount
|
|
357
|
-
}, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) :
|
|
357
|
+
}, 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(Fragment, { key: 2 }, [
|
|
358
358
|
createVNode(unref(TMagicFormItem), {
|
|
359
|
-
style: normalizeStyle(
|
|
360
|
-
class: normalizeClass({ hidden: `${
|
|
361
|
-
prop:
|
|
362
|
-
"label-width":
|
|
363
|
-
rules:
|
|
359
|
+
style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
360
|
+
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !_ctx.config.text }),
|
|
361
|
+
prop: itemProp.value,
|
|
362
|
+
"label-width": itemLabelWidth.value,
|
|
363
|
+
rules: rule.value
|
|
364
364
|
}, {
|
|
365
365
|
label: withCtx(() => [
|
|
366
366
|
createElementVNode("span", {
|
|
367
|
-
innerHTML:
|
|
367
|
+
innerHTML: type.value === "checkbox" ? "" : _ctx.config.text
|
|
368
368
|
}, null, 8, _hoisted_1$b)
|
|
369
369
|
]),
|
|
370
370
|
default: withCtx(() => [
|
|
371
|
-
|
|
371
|
+
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
372
372
|
content: withCtx(() => [
|
|
373
|
-
createElementVNode("div", { innerHTML:
|
|
373
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$6)
|
|
374
374
|
]),
|
|
375
375
|
default: withCtx(() => [
|
|
376
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
377
|
-
key: key(
|
|
378
|
-
size:
|
|
379
|
-
model:
|
|
380
|
-
"last-values":
|
|
381
|
-
config:
|
|
382
|
-
name:
|
|
383
|
-
disabled:
|
|
384
|
-
prop:
|
|
376
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
377
|
+
key: key(_ctx.config),
|
|
378
|
+
size: _ctx.size,
|
|
379
|
+
model: _ctx.model,
|
|
380
|
+
"last-values": _ctx.lastValues,
|
|
381
|
+
config: _ctx.config,
|
|
382
|
+
name: name.value,
|
|
383
|
+
disabled: disabled.value,
|
|
384
|
+
prop: itemProp.value,
|
|
385
385
|
onChange: onChangeHandler,
|
|
386
386
|
onAddDiffCount
|
|
387
387
|
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
|
|
388
388
|
]),
|
|
389
389
|
_: 1
|
|
390
|
-
})) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
391
|
-
key: key(
|
|
392
|
-
size:
|
|
393
|
-
model:
|
|
394
|
-
"last-values":
|
|
395
|
-
config:
|
|
396
|
-
name:
|
|
397
|
-
disabled:
|
|
398
|
-
prop:
|
|
390
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
391
|
+
key: key(_ctx.config),
|
|
392
|
+
size: _ctx.size,
|
|
393
|
+
model: _ctx.model,
|
|
394
|
+
"last-values": _ctx.lastValues,
|
|
395
|
+
config: _ctx.config,
|
|
396
|
+
name: name.value,
|
|
397
|
+
disabled: disabled.value,
|
|
398
|
+
prop: itemProp.value,
|
|
399
399
|
onChange: onChangeHandler,
|
|
400
400
|
onAddDiffCount
|
|
401
401
|
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
|
|
402
|
-
|
|
402
|
+
extra.value && type.value !== "table" ? (openBlock(), createElementBlock("div", {
|
|
403
403
|
key: 2,
|
|
404
|
-
innerHTML:
|
|
404
|
+
innerHTML: extra.value,
|
|
405
405
|
class: "m-form-tip"
|
|
406
|
-
}, null, 8, _hoisted_3$
|
|
406
|
+
}, null, 8, _hoisted_3$4)) : createCommentVNode("", true)
|
|
407
407
|
]),
|
|
408
408
|
_: 1
|
|
409
409
|
}, 8, ["style", "class", "prop", "label-width", "rules"]),
|
|
410
|
-
|
|
410
|
+
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
411
411
|
key: 0,
|
|
412
412
|
placement: "left"
|
|
413
413
|
}, {
|
|
414
414
|
content: withCtx(() => [
|
|
415
415
|
createElementVNode("div", {
|
|
416
|
-
innerHTML:
|
|
417
|
-
}, null, 8, _hoisted_4$
|
|
416
|
+
innerHTML: _ctx.config.tip
|
|
417
|
+
}, null, 8, _hoisted_4$4)
|
|
418
418
|
]),
|
|
419
419
|
default: withCtx(() => [
|
|
420
420
|
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
@@ -426,63 +426,63 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
426
426
|
]),
|
|
427
427
|
_: 1
|
|
428
428
|
})) : createCommentVNode("", true)
|
|
429
|
-
], 64)) :
|
|
429
|
+
], 64)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
430
430
|
createVNode(unref(TMagicFormItem), {
|
|
431
|
-
style: normalizeStyle([
|
|
432
|
-
class: normalizeClass({ hidden: `${
|
|
433
|
-
prop:
|
|
434
|
-
"label-width":
|
|
435
|
-
rules:
|
|
431
|
+
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
432
|
+
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !_ctx.config.text }),
|
|
433
|
+
prop: itemProp.value,
|
|
434
|
+
"label-width": itemLabelWidth.value,
|
|
435
|
+
rules: rule.value
|
|
436
436
|
}, {
|
|
437
437
|
label: withCtx(() => [
|
|
438
438
|
createElementVNode("span", {
|
|
439
|
-
innerHTML:
|
|
440
|
-
}, null, 8, _hoisted_5$
|
|
439
|
+
innerHTML: type.value === "checkbox" ? "" : _ctx.config.text
|
|
440
|
+
}, null, 8, _hoisted_5$3)
|
|
441
441
|
]),
|
|
442
442
|
default: withCtx(() => [
|
|
443
|
-
|
|
443
|
+
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
444
444
|
content: withCtx(() => [
|
|
445
|
-
createElementVNode("div", { innerHTML:
|
|
445
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_6$1)
|
|
446
446
|
]),
|
|
447
447
|
default: withCtx(() => [
|
|
448
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
449
|
-
key: key(
|
|
450
|
-
size:
|
|
451
|
-
model:
|
|
452
|
-
config:
|
|
453
|
-
name:
|
|
454
|
-
disabled:
|
|
455
|
-
prop:
|
|
448
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
449
|
+
key: key(_ctx.config),
|
|
450
|
+
size: _ctx.size,
|
|
451
|
+
model: _ctx.lastValues,
|
|
452
|
+
config: _ctx.config,
|
|
453
|
+
name: name.value,
|
|
454
|
+
disabled: disabled.value,
|
|
455
|
+
prop: itemProp.value,
|
|
456
456
|
onChange: onChangeHandler
|
|
457
457
|
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
458
458
|
]),
|
|
459
459
|
_: 1
|
|
460
|
-
})) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
461
|
-
key: key(
|
|
462
|
-
size:
|
|
463
|
-
model:
|
|
464
|
-
config:
|
|
465
|
-
name:
|
|
466
|
-
disabled:
|
|
467
|
-
prop:
|
|
460
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
461
|
+
key: key(_ctx.config),
|
|
462
|
+
size: _ctx.size,
|
|
463
|
+
model: _ctx.lastValues,
|
|
464
|
+
config: _ctx.config,
|
|
465
|
+
name: name.value,
|
|
466
|
+
disabled: disabled.value,
|
|
467
|
+
prop: itemProp.value,
|
|
468
468
|
onChange: onChangeHandler
|
|
469
469
|
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
470
|
-
|
|
470
|
+
extra.value ? (openBlock(), createElementBlock("div", {
|
|
471
471
|
key: 2,
|
|
472
|
-
innerHTML:
|
|
472
|
+
innerHTML: extra.value,
|
|
473
473
|
class: "m-form-tip"
|
|
474
|
-
}, null, 8, _hoisted_7$
|
|
474
|
+
}, null, 8, _hoisted_7$1)) : createCommentVNode("", true)
|
|
475
475
|
]),
|
|
476
476
|
_: 1
|
|
477
477
|
}, 8, ["style", "class", "prop", "label-width", "rules"]),
|
|
478
|
-
|
|
478
|
+
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
479
479
|
key: 0,
|
|
480
480
|
placement: "left"
|
|
481
481
|
}, {
|
|
482
482
|
content: withCtx(() => [
|
|
483
483
|
createElementVNode("div", {
|
|
484
|
-
innerHTML:
|
|
485
|
-
}, null, 8, _hoisted_8$
|
|
484
|
+
innerHTML: _ctx.config.tip
|
|
485
|
+
}, null, 8, _hoisted_8$1)
|
|
486
486
|
]),
|
|
487
487
|
default: withCtx(() => [
|
|
488
488
|
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
@@ -495,60 +495,60 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
495
495
|
_: 1
|
|
496
496
|
})) : createCommentVNode("", true),
|
|
497
497
|
createVNode(unref(TMagicFormItem), {
|
|
498
|
-
style: normalizeStyle([
|
|
499
|
-
class: normalizeClass({ hidden: `${
|
|
500
|
-
prop:
|
|
501
|
-
"label-width":
|
|
502
|
-
rules:
|
|
498
|
+
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
499
|
+
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !_ctx.config.text }),
|
|
500
|
+
prop: itemProp.value,
|
|
501
|
+
"label-width": itemLabelWidth.value,
|
|
502
|
+
rules: rule.value
|
|
503
503
|
}, {
|
|
504
504
|
label: withCtx(() => [
|
|
505
505
|
createElementVNode("span", {
|
|
506
|
-
innerHTML:
|
|
507
|
-
}, null, 8, _hoisted_9
|
|
506
|
+
innerHTML: type.value === "checkbox" ? "" : _ctx.config.text
|
|
507
|
+
}, null, 8, _hoisted_9)
|
|
508
508
|
]),
|
|
509
509
|
default: withCtx(() => [
|
|
510
|
-
|
|
510
|
+
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
511
511
|
content: withCtx(() => [
|
|
512
|
-
createElementVNode("div", { innerHTML:
|
|
512
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_10)
|
|
513
513
|
]),
|
|
514
514
|
default: withCtx(() => [
|
|
515
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
516
|
-
key: key(
|
|
517
|
-
size:
|
|
518
|
-
model:
|
|
519
|
-
config:
|
|
520
|
-
name:
|
|
521
|
-
disabled:
|
|
522
|
-
prop:
|
|
515
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
516
|
+
key: key(_ctx.config),
|
|
517
|
+
size: _ctx.size,
|
|
518
|
+
model: _ctx.model,
|
|
519
|
+
config: _ctx.config,
|
|
520
|
+
name: name.value,
|
|
521
|
+
disabled: disabled.value,
|
|
522
|
+
prop: itemProp.value,
|
|
523
523
|
onChange: onChangeHandler
|
|
524
524
|
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
525
525
|
]),
|
|
526
526
|
_: 1
|
|
527
|
-
})) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
528
|
-
key: key(
|
|
529
|
-
size:
|
|
530
|
-
model:
|
|
531
|
-
config:
|
|
532
|
-
name:
|
|
533
|
-
disabled:
|
|
534
|
-
prop:
|
|
527
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
528
|
+
key: key(_ctx.config),
|
|
529
|
+
size: _ctx.size,
|
|
530
|
+
model: _ctx.model,
|
|
531
|
+
config: _ctx.config,
|
|
532
|
+
name: name.value,
|
|
533
|
+
disabled: disabled.value,
|
|
534
|
+
prop: itemProp.value,
|
|
535
535
|
onChange: onChangeHandler
|
|
536
536
|
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
537
|
-
|
|
537
|
+
extra.value ? (openBlock(), createElementBlock("div", {
|
|
538
538
|
key: 2,
|
|
539
|
-
innerHTML:
|
|
539
|
+
innerHTML: extra.value,
|
|
540
540
|
class: "m-form-tip"
|
|
541
541
|
}, null, 8, _hoisted_11)) : createCommentVNode("", true)
|
|
542
542
|
]),
|
|
543
543
|
_: 1
|
|
544
544
|
}, 8, ["style", "class", "prop", "label-width", "rules"]),
|
|
545
|
-
|
|
545
|
+
_ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
546
546
|
key: 1,
|
|
547
547
|
placement: "left"
|
|
548
548
|
}, {
|
|
549
549
|
content: withCtx(() => [
|
|
550
550
|
createElementVNode("div", {
|
|
551
|
-
innerHTML:
|
|
551
|
+
innerHTML: _ctx.config.tip
|
|
552
552
|
}, null, 8, _hoisted_12)
|
|
553
553
|
]),
|
|
554
554
|
default: withCtx(() => [
|
|
@@ -561,26 +561,26 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
561
561
|
]),
|
|
562
562
|
_: 1
|
|
563
563
|
})) : createCommentVNode("", true)
|
|
564
|
-
], 64)) :
|
|
565
|
-
(
|
|
564
|
+
], 64)) : items.value && display$1.value ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
565
|
+
(name.value || name.value === 0 ? _ctx.model[name.value] : _ctx.model) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(items.value, (item) => {
|
|
566
566
|
return openBlock(), createBlock(_component_Container, {
|
|
567
567
|
key: key(item),
|
|
568
|
-
model:
|
|
569
|
-
"last-values":
|
|
570
|
-
"is-compare":
|
|
568
|
+
model: name.value || name.value === 0 ? _ctx.model[name.value] : _ctx.model,
|
|
569
|
+
"last-values": name.value || name.value === 0 ? _ctx.lastValues[name.value] || {} : _ctx.lastValues,
|
|
570
|
+
"is-compare": _ctx.isCompare,
|
|
571
571
|
config: item,
|
|
572
|
-
size:
|
|
573
|
-
disabled:
|
|
574
|
-
"step-active":
|
|
572
|
+
size: _ctx.size,
|
|
573
|
+
disabled: disabled.value,
|
|
574
|
+
"step-active": _ctx.stepActive,
|
|
575
575
|
"expand-more": expand.value,
|
|
576
|
-
"label-width":
|
|
577
|
-
prop:
|
|
576
|
+
"label-width": itemLabelWidth.value,
|
|
577
|
+
prop: itemProp.value,
|
|
578
578
|
onChange: onChangeHandler,
|
|
579
579
|
onAddDiffCount
|
|
580
580
|
}, null, 8, ["model", "last-values", "is-compare", "config", "size", "disabled", "step-active", "expand-more", "label-width", "prop"]);
|
|
581
581
|
}), 128)) : createCommentVNode("", true)
|
|
582
582
|
], 64)) : createCommentVNode("", true),
|
|
583
|
-
|
|
583
|
+
_ctx.config.expand && type.value !== "fieldset" ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
584
584
|
createVNode(unref(TMagicButton), {
|
|
585
585
|
type: "primary",
|
|
586
586
|
size: "small",
|
|
@@ -600,29 +600,29 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
600
600
|
});
|
|
601
601
|
|
|
602
602
|
const _hoisted_1$a = ["innerHTML"];
|
|
603
|
-
const _hoisted_2$
|
|
604
|
-
const _hoisted_3$
|
|
605
|
-
const _hoisted_4$
|
|
606
|
-
const _hoisted_5$
|
|
607
|
-
const _hoisted_6
|
|
603
|
+
const _hoisted_2$5 = ["innerHTML"];
|
|
604
|
+
const _hoisted_3$3 = { key: 1 };
|
|
605
|
+
const _hoisted_4$3 = ["innerHTML"];
|
|
606
|
+
const _hoisted_5$2 = ["innerHTML"];
|
|
607
|
+
const _hoisted_6 = {
|
|
608
608
|
key: 2,
|
|
609
609
|
style: { "display": "flex" }
|
|
610
610
|
};
|
|
611
|
-
const _hoisted_7
|
|
612
|
-
const _hoisted_8
|
|
613
|
-
const __default__$u = defineComponent({
|
|
614
|
-
name: "MFormFieldset"
|
|
615
|
-
});
|
|
611
|
+
const _hoisted_7 = { style: { "flex": "1" } };
|
|
612
|
+
const _hoisted_8 = ["src"];
|
|
616
613
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
617
|
-
...
|
|
614
|
+
...{
|
|
615
|
+
name: "MFormFieldset"
|
|
616
|
+
},
|
|
617
|
+
__name: "Fieldset",
|
|
618
618
|
props: {
|
|
619
|
-
labelWidth:
|
|
619
|
+
labelWidth: {},
|
|
620
620
|
prop: { default: "" },
|
|
621
|
-
size:
|
|
622
|
-
model:
|
|
621
|
+
size: {},
|
|
622
|
+
model: {},
|
|
623
623
|
lastValues: { default: () => ({}) },
|
|
624
624
|
isCompare: { type: Boolean, default: false },
|
|
625
|
-
config:
|
|
625
|
+
config: {},
|
|
626
626
|
rules: { default: {} },
|
|
627
627
|
disabled: { type: Boolean }
|
|
628
628
|
},
|
|
@@ -649,61 +649,61 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
649
649
|
const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
|
|
650
650
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
651
651
|
return (_ctx, _cache) => {
|
|
652
|
-
return (
|
|
652
|
+
return (name.value ? _ctx.model[name.value] : _ctx.model) ? (openBlock(), createElementBlock("fieldset", {
|
|
653
653
|
key: 0,
|
|
654
654
|
class: "m-fieldset",
|
|
655
|
-
style: normalizeStyle(
|
|
655
|
+
style: normalizeStyle(show.value ? "padding: 15px 15px 0 5px;" : "border: 0")
|
|
656
656
|
}, [
|
|
657
|
-
|
|
657
|
+
name.value && _ctx.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!show.value ? "div" : "legend"), { key: 0 }, {
|
|
658
658
|
default: withCtx(() => [
|
|
659
659
|
createVNode(unref(TMagicCheckbox), {
|
|
660
|
-
modelValue:
|
|
660
|
+
modelValue: _ctx.model[name.value].value,
|
|
661
661
|
"onUpdate:modelValue": [
|
|
662
|
-
_cache[0] || (_cache[0] = ($event) =>
|
|
662
|
+
_cache[0] || (_cache[0] = ($event) => _ctx.model[name.value].value = $event),
|
|
663
663
|
change
|
|
664
664
|
],
|
|
665
|
-
prop: `${
|
|
665
|
+
prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.config.name}.value`,
|
|
666
666
|
"true-label": 1,
|
|
667
667
|
"false-label": 0
|
|
668
668
|
}, {
|
|
669
669
|
default: withCtx(() => [
|
|
670
670
|
createElementVNode("span", {
|
|
671
|
-
innerHTML:
|
|
671
|
+
innerHTML: _ctx.config.legend
|
|
672
672
|
}, null, 8, _hoisted_1$a),
|
|
673
|
-
|
|
673
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
674
674
|
key: 0,
|
|
675
|
-
innerHTML:
|
|
675
|
+
innerHTML: _ctx.config.extra,
|
|
676
676
|
class: "m-form-tip"
|
|
677
|
-
}, null, 8, _hoisted_2$
|
|
677
|
+
}, null, 8, _hoisted_2$5)) : createCommentVNode("", true)
|
|
678
678
|
]),
|
|
679
679
|
_: 1
|
|
680
680
|
}, 8, ["modelValue", "prop"])
|
|
681
681
|
]),
|
|
682
682
|
_: 1
|
|
683
|
-
})) : (openBlock(), createElementBlock("legend", _hoisted_3$
|
|
683
|
+
})) : (openBlock(), createElementBlock("legend", _hoisted_3$3, [
|
|
684
684
|
createElementVNode("span", {
|
|
685
|
-
innerHTML:
|
|
686
|
-
}, null, 8, _hoisted_4$
|
|
687
|
-
|
|
685
|
+
innerHTML: _ctx.config.legend
|
|
686
|
+
}, null, 8, _hoisted_4$3),
|
|
687
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
688
688
|
key: 0,
|
|
689
|
-
innerHTML:
|
|
689
|
+
innerHTML: _ctx.config.extra,
|
|
690
690
|
class: "m-form-tip"
|
|
691
|
-
}, null, 8, _hoisted_5$
|
|
691
|
+
}, null, 8, _hoisted_5$2)) : createCommentVNode("", true)
|
|
692
692
|
])),
|
|
693
|
-
|
|
694
|
-
createElementVNode("div", _hoisted_7
|
|
695
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
693
|
+
_ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
694
|
+
createElementVNode("div", _hoisted_7, [
|
|
695
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
|
|
696
696
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
697
697
|
key: key(item, index),
|
|
698
|
-
model:
|
|
699
|
-
lastValues:
|
|
700
|
-
"is-compare":
|
|
701
|
-
rules:
|
|
698
|
+
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
699
|
+
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
700
|
+
"is-compare": _ctx.isCompare,
|
|
701
|
+
rules: name.value ? _ctx.rules[name.value] : [],
|
|
702
702
|
config: item,
|
|
703
|
-
prop:
|
|
704
|
-
disabled:
|
|
705
|
-
labelWidth:
|
|
706
|
-
size:
|
|
703
|
+
prop: _ctx.prop,
|
|
704
|
+
disabled: _ctx.disabled,
|
|
705
|
+
labelWidth: lWidth.value,
|
|
706
|
+
size: _ctx.size,
|
|
707
707
|
onChange: change,
|
|
708
708
|
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
709
709
|
}, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "disabled", "labelWidth", "size"]);
|
|
@@ -711,20 +711,20 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
711
711
|
]),
|
|
712
712
|
createElementVNode("img", {
|
|
713
713
|
class: "m-form-schematic",
|
|
714
|
-
src:
|
|
715
|
-
}, null, 8, _hoisted_8
|
|
716
|
-
])) :
|
|
714
|
+
src: _ctx.config.schematic
|
|
715
|
+
}, null, 8, _hoisted_8)
|
|
716
|
+
])) : show.value ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.config.items, (item, index) => {
|
|
717
717
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
718
718
|
key: key(item, index),
|
|
719
|
-
model:
|
|
720
|
-
lastValues:
|
|
721
|
-
"is-compare":
|
|
722
|
-
rules:
|
|
719
|
+
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
720
|
+
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
721
|
+
"is-compare": _ctx.isCompare,
|
|
722
|
+
rules: name.value ? _ctx.rules[name.value] : [],
|
|
723
723
|
config: item,
|
|
724
|
-
prop:
|
|
725
|
-
labelWidth:
|
|
726
|
-
size:
|
|
727
|
-
disabled:
|
|
724
|
+
prop: _ctx.prop,
|
|
725
|
+
labelWidth: lWidth.value,
|
|
726
|
+
size: _ctx.size,
|
|
727
|
+
disabled: _ctx.disabled,
|
|
728
728
|
onChange: change,
|
|
729
729
|
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
730
730
|
}, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
|
|
@@ -735,24 +735,22 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
735
735
|
});
|
|
736
736
|
|
|
737
737
|
const _hoisted_1$9 = { class: "m-fields-group-list-item" };
|
|
738
|
-
const _hoisted_2$
|
|
739
|
-
const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("下移");
|
|
740
|
-
const _hoisted_4$4 = ["innerHTML"];
|
|
741
|
-
const __default__$t = defineComponent({
|
|
742
|
-
name: "MFormGroupListItem"
|
|
743
|
-
});
|
|
738
|
+
const _hoisted_2$4 = ["innerHTML"];
|
|
744
739
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
745
|
-
...
|
|
740
|
+
...{
|
|
741
|
+
name: "MFormGroupListItem"
|
|
742
|
+
},
|
|
743
|
+
__name: "GroupListItem",
|
|
746
744
|
props: {
|
|
747
|
-
model:
|
|
748
|
-
lastValues:
|
|
745
|
+
model: {},
|
|
746
|
+
lastValues: {},
|
|
749
747
|
isCompare: { type: Boolean },
|
|
750
|
-
groupModel:
|
|
751
|
-
config:
|
|
752
|
-
labelWidth:
|
|
753
|
-
prop:
|
|
754
|
-
size:
|
|
755
|
-
index:
|
|
748
|
+
groupModel: {},
|
|
749
|
+
config: {},
|
|
750
|
+
labelWidth: {},
|
|
751
|
+
prop: {},
|
|
752
|
+
size: {},
|
|
753
|
+
index: {},
|
|
756
754
|
disabled: { type: Boolean }
|
|
757
755
|
},
|
|
758
756
|
emits: ["swap-item", "remove-item", "change", "addDiffCount"],
|
|
@@ -806,12 +804,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
806
804
|
createElementVNode("div", null, [
|
|
807
805
|
createVNode(unref(TMagicButton), {
|
|
808
806
|
text: "",
|
|
809
|
-
disabled:
|
|
807
|
+
disabled: _ctx.disabled,
|
|
810
808
|
icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
|
|
811
809
|
onClick: expandHandler
|
|
812
810
|
}, {
|
|
813
811
|
default: withCtx(() => [
|
|
814
|
-
createTextVNode(toDisplayString(
|
|
812
|
+
createTextVNode(toDisplayString(title.value), 1)
|
|
815
813
|
]),
|
|
816
814
|
_: 1
|
|
817
815
|
}, 8, ["disabled", "icon"]),
|
|
@@ -819,20 +817,20 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
819
817
|
style: { "color": "#f56c6c" },
|
|
820
818
|
text: "",
|
|
821
819
|
icon: unref(Delete),
|
|
822
|
-
disabled:
|
|
820
|
+
disabled: _ctx.disabled,
|
|
823
821
|
onClick: removeHandler
|
|
824
822
|
}, null, 8, ["icon", "disabled"]), [
|
|
825
|
-
[vShow, showDelete(parseInt(String(
|
|
823
|
+
[vShow, showDelete(parseInt(String(_ctx.index)))]
|
|
826
824
|
]),
|
|
827
825
|
movable() ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
828
826
|
withDirectives(createVNode(unref(TMagicButton), {
|
|
829
827
|
text: "",
|
|
830
|
-
disabled:
|
|
828
|
+
disabled: _ctx.disabled,
|
|
831
829
|
size: "small",
|
|
832
830
|
onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
|
|
833
831
|
}, {
|
|
834
832
|
default: withCtx(() => [
|
|
835
|
-
|
|
833
|
+
createTextVNode("上移"),
|
|
836
834
|
createVNode(unref(TMagicIcon), null, {
|
|
837
835
|
default: withCtx(() => [
|
|
838
836
|
createVNode(unref(CaretTop))
|
|
@@ -842,16 +840,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
842
840
|
]),
|
|
843
841
|
_: 1
|
|
844
842
|
}, 8, ["disabled"]), [
|
|
845
|
-
[vShow,
|
|
843
|
+
[vShow, _ctx.index !== 0]
|
|
846
844
|
]),
|
|
847
845
|
withDirectives(createVNode(unref(TMagicButton), {
|
|
848
|
-
disabled:
|
|
846
|
+
disabled: _ctx.disabled,
|
|
849
847
|
text: "",
|
|
850
848
|
size: "small",
|
|
851
849
|
onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
|
|
852
850
|
}, {
|
|
853
851
|
default: withCtx(() => [
|
|
854
|
-
|
|
852
|
+
createTextVNode("下移"),
|
|
855
853
|
createVNode(unref(TMagicIcon), null, {
|
|
856
854
|
default: withCtx(() => [
|
|
857
855
|
createVNode(unref(CaretBottom))
|
|
@@ -861,25 +859,25 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
861
859
|
]),
|
|
862
860
|
_: 1
|
|
863
861
|
}, 8, ["disabled"]), [
|
|
864
|
-
[vShow,
|
|
862
|
+
[vShow, _ctx.index !== length.value - 1]
|
|
865
863
|
])
|
|
866
864
|
], 64)) : createCommentVNode("", true),
|
|
867
|
-
|
|
865
|
+
itemExtra.value ? (openBlock(), createElementBlock("span", {
|
|
868
866
|
key: 1,
|
|
869
|
-
innerHTML:
|
|
867
|
+
innerHTML: itemExtra.value,
|
|
870
868
|
class: "m-form-tip"
|
|
871
|
-
}, null, 8,
|
|
869
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true)
|
|
872
870
|
]),
|
|
873
871
|
expand.value ? (openBlock(), createBlock(_sfc_main$v, {
|
|
874
872
|
key: 0,
|
|
875
|
-
config:
|
|
876
|
-
model:
|
|
877
|
-
lastValues:
|
|
878
|
-
"is-compare":
|
|
879
|
-
labelWidth:
|
|
880
|
-
prop: `${
|
|
881
|
-
size:
|
|
882
|
-
disabled:
|
|
873
|
+
config: rowConfig.value,
|
|
874
|
+
model: _ctx.model,
|
|
875
|
+
lastValues: _ctx.lastValues,
|
|
876
|
+
"is-compare": _ctx.isCompare,
|
|
877
|
+
labelWidth: _ctx.labelWidth,
|
|
878
|
+
prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${String(_ctx.index)}`,
|
|
879
|
+
size: _ctx.size,
|
|
880
|
+
disabled: _ctx.disabled,
|
|
883
881
|
onChange: changeHandler,
|
|
884
882
|
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
885
883
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("", true)
|
|
@@ -889,31 +887,29 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
889
887
|
});
|
|
890
888
|
|
|
891
889
|
const _hoisted_1$8 = { class: "m-fields-group-list" };
|
|
892
|
-
const _hoisted_2$
|
|
893
|
-
const _hoisted_3$
|
|
890
|
+
const _hoisted_2$3 = ["innerHTML"];
|
|
891
|
+
const _hoisted_3$2 = {
|
|
894
892
|
key: 1,
|
|
895
893
|
class: "el-table__empty-block"
|
|
896
894
|
};
|
|
897
|
-
const _hoisted_4$
|
|
898
|
-
const _hoisted_5$
|
|
899
|
-
_hoisted_4$
|
|
895
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "el-table__empty-text" }, "暂无数据", -1);
|
|
896
|
+
const _hoisted_5$1 = [
|
|
897
|
+
_hoisted_4$2
|
|
900
898
|
];
|
|
901
|
-
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("添加组");
|
|
902
|
-
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("切换为表格");
|
|
903
|
-
const __default__$s = defineComponent({
|
|
904
|
-
name: "MFormGroupList"
|
|
905
|
-
});
|
|
906
899
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
907
|
-
...
|
|
900
|
+
...{
|
|
901
|
+
name: "MFormGroupList"
|
|
902
|
+
},
|
|
903
|
+
__name: "GroupList",
|
|
908
904
|
props: {
|
|
909
|
-
model:
|
|
910
|
-
lastValues:
|
|
905
|
+
model: {},
|
|
906
|
+
lastValues: {},
|
|
911
907
|
isCompare: { type: Boolean },
|
|
912
|
-
config:
|
|
913
|
-
name:
|
|
914
|
-
labelWidth:
|
|
915
|
-
prop:
|
|
916
|
-
size:
|
|
908
|
+
config: {},
|
|
909
|
+
name: {},
|
|
910
|
+
labelWidth: {},
|
|
911
|
+
prop: {},
|
|
912
|
+
size: {},
|
|
917
913
|
disabled: { type: Boolean }
|
|
918
914
|
},
|
|
919
915
|
emits: ["change", "addDiffCount"],
|
|
@@ -984,49 +980,49 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
984
980
|
const getLastValues = (item, index) => item?.[index] || {};
|
|
985
981
|
return (_ctx, _cache) => {
|
|
986
982
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
987
|
-
|
|
983
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("div", {
|
|
988
984
|
key: 0,
|
|
989
|
-
innerHTML:
|
|
985
|
+
innerHTML: _ctx.config.extra,
|
|
990
986
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
991
|
-
}, null, 8, _hoisted_2$
|
|
992
|
-
!
|
|
987
|
+
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
988
|
+
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$2, _hoisted_5$1)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
993
989
|
return openBlock(), createBlock(_sfc_main$t, {
|
|
994
990
|
key: index,
|
|
995
991
|
model: item,
|
|
996
|
-
lastValues: getLastValues(
|
|
997
|
-
"is-compare":
|
|
998
|
-
config:
|
|
999
|
-
prop:
|
|
992
|
+
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
993
|
+
"is-compare": _ctx.isCompare,
|
|
994
|
+
config: _ctx.config,
|
|
995
|
+
prop: _ctx.prop,
|
|
1000
996
|
index,
|
|
1001
|
-
"label-width":
|
|
1002
|
-
size:
|
|
1003
|
-
disabled:
|
|
1004
|
-
"group-model":
|
|
997
|
+
"label-width": _ctx.labelWidth,
|
|
998
|
+
size: _ctx.size,
|
|
999
|
+
disabled: _ctx.disabled,
|
|
1000
|
+
"group-model": _ctx.model[_ctx.name],
|
|
1005
1001
|
onRemoveItem: removeHandler,
|
|
1006
1002
|
onSwapItem: swapHandler,
|
|
1007
1003
|
onChange: changeHandler,
|
|
1008
1004
|
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
1009
1005
|
}, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
|
|
1010
1006
|
}), 128)),
|
|
1011
|
-
|
|
1007
|
+
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1012
1008
|
key: 3,
|
|
1013
1009
|
onClick: addHandler,
|
|
1014
1010
|
size: "small",
|
|
1015
|
-
disabled:
|
|
1011
|
+
disabled: _ctx.disabled
|
|
1016
1012
|
}, {
|
|
1017
1013
|
default: withCtx(() => [
|
|
1018
|
-
|
|
1014
|
+
createTextVNode("添加组")
|
|
1019
1015
|
]),
|
|
1020
1016
|
_: 1
|
|
1021
1017
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1022
|
-
|
|
1018
|
+
_ctx.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1023
1019
|
key: 4,
|
|
1024
1020
|
icon: unref(Grid),
|
|
1025
1021
|
size: "small",
|
|
1026
1022
|
onClick: toggleMode
|
|
1027
1023
|
}, {
|
|
1028
1024
|
default: withCtx(() => [
|
|
1029
|
-
|
|
1025
|
+
createTextVNode("切换为表格")
|
|
1030
1026
|
]),
|
|
1031
1027
|
_: 1
|
|
1032
1028
|
}, 8, ["icon"])) : createCommentVNode("", true)
|
|
@@ -1036,27 +1032,27 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1036
1032
|
});
|
|
1037
1033
|
|
|
1038
1034
|
const _hoisted_1$7 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1039
|
-
const _hoisted_2$
|
|
1040
|
-
const _hoisted_3$
|
|
1035
|
+
const _hoisted_2$2 = ["innerHTML"];
|
|
1036
|
+
const _hoisted_3$1 = {
|
|
1041
1037
|
key: 0,
|
|
1042
1038
|
style: { "display": "flex" }
|
|
1043
1039
|
};
|
|
1044
|
-
const _hoisted_4$
|
|
1045
|
-
const _hoisted_5
|
|
1046
|
-
const __default__$r = defineComponent({
|
|
1047
|
-
name: "MFormPanel"
|
|
1048
|
-
});
|
|
1040
|
+
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1041
|
+
const _hoisted_5 = ["src"];
|
|
1049
1042
|
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1050
|
-
...
|
|
1043
|
+
...{
|
|
1044
|
+
name: "MFormPanel"
|
|
1045
|
+
},
|
|
1046
|
+
__name: "Panel",
|
|
1051
1047
|
props: {
|
|
1052
|
-
model:
|
|
1053
|
-
lastValues:
|
|
1048
|
+
model: {},
|
|
1049
|
+
lastValues: {},
|
|
1054
1050
|
isCompare: { type: Boolean },
|
|
1055
|
-
config:
|
|
1056
|
-
name:
|
|
1057
|
-
labelWidth:
|
|
1058
|
-
prop:
|
|
1059
|
-
size:
|
|
1051
|
+
config: {},
|
|
1052
|
+
name: {},
|
|
1053
|
+
labelWidth: {},
|
|
1054
|
+
prop: {},
|
|
1055
|
+
size: {},
|
|
1060
1056
|
disabled: { type: Boolean }
|
|
1061
1057
|
},
|
|
1062
1058
|
emits: ["change", "addDiffCount"],
|
|
@@ -1069,7 +1065,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1069
1065
|
const changeHandler = () => emit("change", props.model);
|
|
1070
1066
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
1071
1067
|
return (_ctx, _cache) => {
|
|
1072
|
-
return
|
|
1068
|
+
return items.value && items.value.length ? (openBlock(), createBlock(unref(TMagicCard), {
|
|
1073
1069
|
key: 0,
|
|
1074
1070
|
class: "box-card m-form-panel",
|
|
1075
1071
|
"body-style": { display: expand.value ? "block" : "none" }
|
|
@@ -1082,32 +1078,32 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1082
1078
|
icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
|
|
1083
1079
|
onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value)
|
|
1084
1080
|
}, null, 8, ["icon"]),
|
|
1085
|
-
|
|
1081
|
+
_ctx.config && _ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
1086
1082
|
key: 0,
|
|
1087
|
-
innerHTML:
|
|
1083
|
+
innerHTML: _ctx.config.extra,
|
|
1088
1084
|
class: "m-form-tip"
|
|
1089
|
-
}, null, 8, _hoisted_2$
|
|
1085
|
+
}, null, 8, _hoisted_2$2)) : createCommentVNode("", true),
|
|
1090
1086
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1091
|
-
createTextVNode(toDisplayString(filter(
|
|
1087
|
+
createTextVNode(toDisplayString(filter(_ctx.config.title)), 1)
|
|
1092
1088
|
])
|
|
1093
1089
|
])
|
|
1094
1090
|
]),
|
|
1095
1091
|
default: withCtx(() => [
|
|
1096
1092
|
createElementVNode("div", null, [
|
|
1097
1093
|
renderSlot(_ctx.$slots, "default"),
|
|
1098
|
-
|
|
1099
|
-
createElementVNode("div", _hoisted_4$
|
|
1100
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1094
|
+
_ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1095
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
1096
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
1101
1097
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
1102
1098
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1103
1099
|
config: item,
|
|
1104
|
-
model:
|
|
1105
|
-
lastValues:
|
|
1106
|
-
"is-compare":
|
|
1107
|
-
prop:
|
|
1108
|
-
size:
|
|
1109
|
-
disabled:
|
|
1110
|
-
"label-width":
|
|
1100
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1101
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1102
|
+
"is-compare": _ctx.isCompare,
|
|
1103
|
+
prop: _ctx.prop,
|
|
1104
|
+
size: _ctx.size,
|
|
1105
|
+
disabled: _ctx.disabled,
|
|
1106
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1111
1107
|
onChange: changeHandler,
|
|
1112
1108
|
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1113
1109
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
|
|
@@ -1115,19 +1111,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1115
1111
|
]),
|
|
1116
1112
|
createElementVNode("img", {
|
|
1117
1113
|
class: "m-form-schematic",
|
|
1118
|
-
src:
|
|
1119
|
-
}, null, 8, _hoisted_5
|
|
1120
|
-
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(
|
|
1114
|
+
src: _ctx.config.schematic
|
|
1115
|
+
}, null, 8, _hoisted_5)
|
|
1116
|
+
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
|
|
1121
1117
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
1122
1118
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1123
1119
|
config: item,
|
|
1124
|
-
model:
|
|
1125
|
-
lastValues:
|
|
1126
|
-
"is-compare":
|
|
1127
|
-
prop:
|
|
1128
|
-
size:
|
|
1129
|
-
disabled:
|
|
1130
|
-
"label-width":
|
|
1120
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1121
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1122
|
+
"is-compare": _ctx.isCompare,
|
|
1123
|
+
prop: _ctx.prop,
|
|
1124
|
+
size: _ctx.size,
|
|
1125
|
+
disabled: _ctx.disabled,
|
|
1126
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1131
1127
|
onChange: changeHandler,
|
|
1132
1128
|
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
1133
1129
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
|
|
@@ -1140,21 +1136,21 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1140
1136
|
}
|
|
1141
1137
|
});
|
|
1142
1138
|
|
|
1143
|
-
const __default__$q = defineComponent({
|
|
1144
|
-
name: "MFormCol"
|
|
1145
|
-
});
|
|
1146
1139
|
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1147
|
-
...
|
|
1140
|
+
...{
|
|
1141
|
+
name: "MFormCol"
|
|
1142
|
+
},
|
|
1143
|
+
__name: "Col",
|
|
1148
1144
|
props: {
|
|
1149
|
-
model:
|
|
1150
|
-
lastValues:
|
|
1145
|
+
model: {},
|
|
1146
|
+
lastValues: {},
|
|
1151
1147
|
isCompare: { type: Boolean },
|
|
1152
|
-
config:
|
|
1153
|
-
labelWidth:
|
|
1148
|
+
config: {},
|
|
1149
|
+
labelWidth: {},
|
|
1154
1150
|
expandMore: { type: Boolean },
|
|
1155
|
-
span:
|
|
1156
|
-
size:
|
|
1157
|
-
prop:
|
|
1151
|
+
span: {},
|
|
1152
|
+
size: {},
|
|
1153
|
+
prop: {},
|
|
1158
1154
|
disabled: { type: Boolean }
|
|
1159
1155
|
},
|
|
1160
1156
|
emits: ["change", "addDiffCount"],
|
|
@@ -1165,44 +1161,44 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1165
1161
|
const changeHandler = () => emit("change", props.model);
|
|
1166
1162
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
1167
1163
|
return (_ctx, _cache) => {
|
|
1168
|
-
return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span:
|
|
1164
|
+
return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: _ctx.span }, {
|
|
1169
1165
|
default: withCtx(() => [
|
|
1170
1166
|
createVNode(_sfc_main$v, {
|
|
1171
|
-
model:
|
|
1172
|
-
lastValues:
|
|
1173
|
-
"is-compare":
|
|
1174
|
-
config:
|
|
1175
|
-
prop:
|
|
1176
|
-
"label-width":
|
|
1177
|
-
"expand-more":
|
|
1178
|
-
size:
|
|
1179
|
-
disabled:
|
|
1167
|
+
model: _ctx.model,
|
|
1168
|
+
lastValues: _ctx.lastValues,
|
|
1169
|
+
"is-compare": _ctx.isCompare,
|
|
1170
|
+
config: _ctx.config,
|
|
1171
|
+
prop: _ctx.prop,
|
|
1172
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1173
|
+
"expand-more": _ctx.expandMore,
|
|
1174
|
+
size: _ctx.size,
|
|
1175
|
+
disabled: _ctx.disabled,
|
|
1180
1176
|
onChange: changeHandler,
|
|
1181
1177
|
onAddDiffCount
|
|
1182
1178
|
}, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "label-width", "expand-more", "size", "disabled"])
|
|
1183
1179
|
]),
|
|
1184
1180
|
_: 1
|
|
1185
1181
|
}, 8, ["span"])), [
|
|
1186
|
-
[vShow,
|
|
1182
|
+
[vShow, display$1.value && _ctx.config.type !== "hidden"]
|
|
1187
1183
|
]);
|
|
1188
1184
|
};
|
|
1189
1185
|
}
|
|
1190
1186
|
});
|
|
1191
1187
|
|
|
1192
|
-
const __default__$p = defineComponent({
|
|
1193
|
-
name: "MFormRow"
|
|
1194
|
-
});
|
|
1195
1188
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1196
|
-
...
|
|
1189
|
+
...{
|
|
1190
|
+
name: "MFormRow"
|
|
1191
|
+
},
|
|
1192
|
+
__name: "Row",
|
|
1197
1193
|
props: {
|
|
1198
|
-
model:
|
|
1199
|
-
lastValues:
|
|
1194
|
+
model: {},
|
|
1195
|
+
lastValues: {},
|
|
1200
1196
|
isCompare: { type: Boolean },
|
|
1201
|
-
config:
|
|
1202
|
-
name:
|
|
1203
|
-
labelWidth:
|
|
1204
|
-
prop:
|
|
1205
|
-
size:
|
|
1197
|
+
config: {},
|
|
1198
|
+
name: {},
|
|
1199
|
+
labelWidth: {},
|
|
1200
|
+
prop: {},
|
|
1201
|
+
size: {},
|
|
1206
1202
|
expandMore: { type: Boolean },
|
|
1207
1203
|
disabled: { type: Boolean }
|
|
1208
1204
|
},
|
|
@@ -1215,19 +1211,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1215
1211
|
return (_ctx, _cache) => {
|
|
1216
1212
|
return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
|
|
1217
1213
|
default: withCtx(() => [
|
|
1218
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1214
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
|
|
1219
1215
|
return openBlock(), createBlock(_sfc_main$q, {
|
|
1220
1216
|
key: col[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1221
|
-
span: col.span ||
|
|
1217
|
+
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1222
1218
|
config: col,
|
|
1223
|
-
labelWidth:
|
|
1224
|
-
expandMore:
|
|
1225
|
-
model:
|
|
1226
|
-
lastValues:
|
|
1227
|
-
"is-compare":
|
|
1228
|
-
prop:
|
|
1229
|
-
size:
|
|
1230
|
-
disabled:
|
|
1219
|
+
labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1220
|
+
expandMore: _ctx.expandMore,
|
|
1221
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1222
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1223
|
+
"is-compare": _ctx.isCompare,
|
|
1224
|
+
prop: _ctx.prop,
|
|
1225
|
+
size: _ctx.size,
|
|
1226
|
+
disabled: _ctx.disabled,
|
|
1231
1227
|
onChange: changeHandler,
|
|
1232
1228
|
onAddDiffCount
|
|
1233
1229
|
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "lastValues", "is-compare", "prop", "size", "disabled"]);
|
|
@@ -1239,19 +1235,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1239
1235
|
}
|
|
1240
1236
|
});
|
|
1241
1237
|
|
|
1242
|
-
const __default__$o = defineComponent({
|
|
1243
|
-
name: "MFormStep"
|
|
1244
|
-
});
|
|
1245
1238
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
1246
|
-
...
|
|
1239
|
+
...{
|
|
1240
|
+
name: "MFormStep"
|
|
1241
|
+
},
|
|
1242
|
+
__name: "Step",
|
|
1247
1243
|
props: {
|
|
1248
|
-
model:
|
|
1249
|
-
lastValues:
|
|
1244
|
+
model: {},
|
|
1245
|
+
lastValues: {},
|
|
1250
1246
|
isCompare: { type: Boolean },
|
|
1251
|
-
config:
|
|
1247
|
+
config: {},
|
|
1252
1248
|
stepActive: { default: 1 },
|
|
1253
|
-
labelWidth:
|
|
1254
|
-
size:
|
|
1249
|
+
labelWidth: {},
|
|
1250
|
+
size: {},
|
|
1255
1251
|
disabled: { type: Boolean }
|
|
1256
1252
|
},
|
|
1257
1253
|
emits: ["change", "addDiffCount"],
|
|
@@ -1275,10 +1271,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1275
1271
|
createVNode(unref(TMagicSteps), {
|
|
1276
1272
|
active: active.value,
|
|
1277
1273
|
"align-center": "",
|
|
1278
|
-
space:
|
|
1274
|
+
space: _ctx.config.space
|
|
1279
1275
|
}, {
|
|
1280
1276
|
default: withCtx(() => [
|
|
1281
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1277
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
|
|
1282
1278
|
return openBlock(), createBlock(unref(TMagicStep), {
|
|
1283
1279
|
key: item.__key,
|
|
1284
1280
|
title: item.title,
|
|
@@ -1289,20 +1285,20 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1289
1285
|
]),
|
|
1290
1286
|
_: 1
|
|
1291
1287
|
}, 8, ["active", "space"]),
|
|
1292
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1288
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (step, index) => {
|
|
1293
1289
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1294
1290
|
(openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
|
|
1295
1291
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1296
1292
|
item ? withDirectives((openBlock(), createBlock(_sfc_main$v, {
|
|
1297
1293
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
1298
1294
|
config: item,
|
|
1299
|
-
model: step.name ?
|
|
1300
|
-
lastValues: step.name ?
|
|
1301
|
-
"is-compare":
|
|
1295
|
+
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
1296
|
+
lastValues: step.name ? _ctx.lastValues[step.name] : _ctx.lastValues,
|
|
1297
|
+
"is-compare": _ctx.isCompare,
|
|
1302
1298
|
prop: `${step.name}`,
|
|
1303
|
-
size:
|
|
1304
|
-
disabled:
|
|
1305
|
-
"label-width":
|
|
1299
|
+
size: _ctx.size,
|
|
1300
|
+
disabled: _ctx.disabled,
|
|
1301
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1306
1302
|
onChange: changeHandler,
|
|
1307
1303
|
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
1308
1304
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"])), [
|
|
@@ -1318,42 +1314,36 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1318
1314
|
});
|
|
1319
1315
|
|
|
1320
1316
|
const _hoisted_1$6 = ["innerHTML"];
|
|
1321
|
-
const _hoisted_2$
|
|
1322
|
-
const _hoisted_3
|
|
1323
|
-
const _hoisted_4
|
|
1324
|
-
const _hoisted_5 = /* @__PURE__ */ createTextVNode(" ");
|
|
1325
|
-
const _hoisted_6 = /* @__PURE__ */ createTextVNode("展开配置");
|
|
1326
|
-
const _hoisted_7 = /* @__PURE__ */ createTextVNode("导入EXCEL");
|
|
1327
|
-
const _hoisted_8 = /* @__PURE__ */ createTextVNode(" ");
|
|
1328
|
-
const _hoisted_9 = /* @__PURE__ */ createTextVNode("清空");
|
|
1329
|
-
const _hoisted_10 = {
|
|
1317
|
+
const _hoisted_2$1 = { class: "el-form-item__content" };
|
|
1318
|
+
const _hoisted_3 = ["innerHTML"];
|
|
1319
|
+
const _hoisted_4 = {
|
|
1330
1320
|
key: 1,
|
|
1331
1321
|
class: "bottom",
|
|
1332
1322
|
style: { "text-align": "right" }
|
|
1333
1323
|
};
|
|
1334
|
-
const __default__$n = defineComponent({
|
|
1335
|
-
name: "MFormTable"
|
|
1336
|
-
});
|
|
1337
1324
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1338
|
-
...
|
|
1325
|
+
...{
|
|
1326
|
+
name: "MFormTable"
|
|
1327
|
+
},
|
|
1328
|
+
__name: "Table",
|
|
1339
1329
|
props: {
|
|
1340
|
-
model:
|
|
1330
|
+
model: {},
|
|
1341
1331
|
lastValues: { default: () => ({}) },
|
|
1342
1332
|
isCompare: { type: Boolean, default: false },
|
|
1343
|
-
config:
|
|
1344
|
-
name:
|
|
1333
|
+
config: {},
|
|
1334
|
+
name: {},
|
|
1345
1335
|
prop: { default: "" },
|
|
1346
|
-
labelWidth:
|
|
1336
|
+
labelWidth: {},
|
|
1347
1337
|
sort: { type: Boolean },
|
|
1348
1338
|
disabled: { type: Boolean },
|
|
1349
1339
|
sortKey: { default: "" },
|
|
1350
|
-
text:
|
|
1351
|
-
size:
|
|
1340
|
+
text: {},
|
|
1341
|
+
size: {},
|
|
1352
1342
|
enableToggleMode: { type: Boolean, default: true },
|
|
1353
1343
|
showIndex: { type: Boolean, default: true }
|
|
1354
1344
|
},
|
|
1355
1345
|
emits: ["change", "select", "addDiffCount"],
|
|
1356
|
-
setup(__props, { expose, emit }) {
|
|
1346
|
+
setup(__props, { expose: __expose, emit }) {
|
|
1357
1347
|
const props = __props;
|
|
1358
1348
|
let timer = null;
|
|
1359
1349
|
const mForm = inject("mForm");
|
|
@@ -1673,43 +1663,43 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1673
1663
|
return `${prop.value}${prop.value ? "." : ""}${index + 1 + pagecontext.value * pagesize.value - 1}`;
|
|
1674
1664
|
};
|
|
1675
1665
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
1676
|
-
|
|
1666
|
+
__expose({
|
|
1677
1667
|
toggleRowSelection
|
|
1678
1668
|
});
|
|
1679
1669
|
return (_ctx, _cache) => {
|
|
1680
1670
|
return openBlock(), createElementBlock("div", {
|
|
1681
1671
|
ref_key: "mTable",
|
|
1682
1672
|
ref: mTable,
|
|
1683
|
-
class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra":
|
|
1673
|
+
class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
|
|
1684
1674
|
}, [
|
|
1685
|
-
|
|
1675
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
1686
1676
|
key: 0,
|
|
1687
1677
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1688
|
-
innerHTML:
|
|
1678
|
+
innerHTML: _ctx.config.extra
|
|
1689
1679
|
}, null, 8, _hoisted_1$6)) : createCommentVNode("", true),
|
|
1690
|
-
createElementVNode("div", _hoisted_2$
|
|
1680
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
1691
1681
|
createVNode(unref(TMagicTooltip), {
|
|
1692
1682
|
content: "拖拽可排序",
|
|
1693
1683
|
placement: "left-start",
|
|
1694
|
-
disabled:
|
|
1684
|
+
disabled: _ctx.config.dropSort !== true
|
|
1695
1685
|
}, {
|
|
1696
1686
|
default: withCtx(() => [
|
|
1697
|
-
|
|
1687
|
+
_ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
|
|
1698
1688
|
ref_key: "tMagicTable",
|
|
1699
1689
|
ref: tMagicTable,
|
|
1700
1690
|
style: { "width": "100%" },
|
|
1701
|
-
"row-key":
|
|
1702
|
-
data:
|
|
1703
|
-
lastData:
|
|
1704
|
-
border:
|
|
1705
|
-
"max-height":
|
|
1691
|
+
"row-key": _ctx.config.rowKey || "id",
|
|
1692
|
+
data: data.value,
|
|
1693
|
+
lastData: lastData.value,
|
|
1694
|
+
border: _ctx.config.border,
|
|
1695
|
+
"max-height": _ctx.config.maxHeight,
|
|
1706
1696
|
"default-expand-all": true,
|
|
1707
1697
|
key: updateKey.value,
|
|
1708
1698
|
onSelect: selectHandle,
|
|
1709
1699
|
onSortChange: sortChange
|
|
1710
1700
|
}, {
|
|
1711
1701
|
default: withCtx(() => [
|
|
1712
|
-
|
|
1702
|
+
_ctx.config.itemExtra ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1713
1703
|
key: 0,
|
|
1714
1704
|
fixed: "left",
|
|
1715
1705
|
width: "30",
|
|
@@ -1717,17 +1707,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1717
1707
|
}, {
|
|
1718
1708
|
default: withCtx((scope) => [
|
|
1719
1709
|
createElementVNode("span", {
|
|
1720
|
-
innerHTML: itemExtra(
|
|
1710
|
+
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
1721
1711
|
class: "m-form-tip"
|
|
1722
|
-
}, null, 8, _hoisted_3
|
|
1712
|
+
}, null, 8, _hoisted_3)
|
|
1723
1713
|
]),
|
|
1724
1714
|
_: 1
|
|
1725
1715
|
})) : createCommentVNode("", true),
|
|
1726
1716
|
createVNode(unref(TMagicTableColumn), {
|
|
1727
1717
|
label: "操作",
|
|
1728
|
-
width:
|
|
1718
|
+
width: _ctx.config.operateColWidth || 55,
|
|
1729
1719
|
align: "center",
|
|
1730
|
-
fixed:
|
|
1720
|
+
fixed: _ctx.config.fixed === false ? void 0 : "left"
|
|
1731
1721
|
}, {
|
|
1732
1722
|
default: withCtx((scope) => [
|
|
1733
1723
|
renderSlot(_ctx.$slots, "operateCol", { scope }),
|
|
@@ -1745,7 +1735,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1745
1735
|
]),
|
|
1746
1736
|
_: 3
|
|
1747
1737
|
}, 8, ["width", "fixed"]),
|
|
1748
|
-
|
|
1738
|
+
_ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1749
1739
|
key: 1,
|
|
1750
1740
|
label: "排序",
|
|
1751
1741
|
width: "60"
|
|
@@ -1762,7 +1752,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1762
1752
|
size: "small",
|
|
1763
1753
|
type: "primary",
|
|
1764
1754
|
icon: unref(ArrowUp),
|
|
1765
|
-
disabled:
|
|
1755
|
+
disabled: _ctx.disabled,
|
|
1766
1756
|
text: "",
|
|
1767
1757
|
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1768
1758
|
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
@@ -1770,7 +1760,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1770
1760
|
]),
|
|
1771
1761
|
_: 2
|
|
1772
1762
|
}, 1024)) : createCommentVNode("", true),
|
|
1773
|
-
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !==
|
|
1763
|
+
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
1774
1764
|
key: 1,
|
|
1775
1765
|
content: "点击下移,双击置底",
|
|
1776
1766
|
placement: "top"
|
|
@@ -1781,7 +1771,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1781
1771
|
size: "small",
|
|
1782
1772
|
type: "primary",
|
|
1783
1773
|
icon: unref(ArrowDown),
|
|
1784
|
-
disabled:
|
|
1774
|
+
disabled: _ctx.disabled,
|
|
1785
1775
|
text: "",
|
|
1786
1776
|
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1787
1777
|
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
@@ -1792,14 +1782,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1792
1782
|
]),
|
|
1793
1783
|
_: 1
|
|
1794
1784
|
})) : createCommentVNode("", true),
|
|
1795
|
-
|
|
1785
|
+
selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1796
1786
|
key: 2,
|
|
1797
1787
|
align: "center",
|
|
1798
1788
|
"header-align": "center",
|
|
1799
1789
|
type: "selection",
|
|
1800
1790
|
width: "45"
|
|
1801
1791
|
})) : createCommentVNode("", true),
|
|
1802
|
-
|
|
1792
|
+
_ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1803
1793
|
key: 3,
|
|
1804
1794
|
width: "60",
|
|
1805
1795
|
label: "序号"
|
|
@@ -1809,7 +1799,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1809
1799
|
]),
|
|
1810
1800
|
_: 1
|
|
1811
1801
|
})) : createCommentVNode("", true),
|
|
1812
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1802
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (column, index) => {
|
|
1813
1803
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1814
1804
|
column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1815
1805
|
prop: column.name,
|
|
@@ -1818,21 +1808,21 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1818
1808
|
sortable: column.sortable,
|
|
1819
1809
|
"sort-orders": ["ascending", "descending"],
|
|
1820
1810
|
key: column[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1821
|
-
"class-name":
|
|
1811
|
+
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1822
1812
|
}, {
|
|
1823
1813
|
default: withCtx((scope) => [
|
|
1824
1814
|
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$v, {
|
|
1825
1815
|
key: 0,
|
|
1826
1816
|
labelWidth: "0",
|
|
1827
|
-
disabled:
|
|
1817
|
+
disabled: _ctx.disabled,
|
|
1828
1818
|
prop: getProp(scope.$index),
|
|
1829
1819
|
rules: column.rules,
|
|
1830
1820
|
config: makeConfig(column, scope.row),
|
|
1831
1821
|
model: scope.row,
|
|
1832
|
-
lastValues:
|
|
1833
|
-
"is-compare":
|
|
1834
|
-
size:
|
|
1835
|
-
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change",
|
|
1822
|
+
lastValues: lastData.value[scope.$index],
|
|
1823
|
+
"is-compare": _ctx.isCompare,
|
|
1824
|
+
size: _ctx.size,
|
|
1825
|
+
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", _ctx.model[modelName.value])),
|
|
1836
1826
|
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1837
1827
|
}, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("", true)
|
|
1838
1828
|
]),
|
|
@@ -1847,21 +1837,21 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1847
1837
|
_: 3
|
|
1848
1838
|
}, 8, ["disabled"]),
|
|
1849
1839
|
renderSlot(_ctx.$slots, "default"),
|
|
1850
|
-
|
|
1840
|
+
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1851
1841
|
key: 0,
|
|
1852
1842
|
size: "small",
|
|
1853
1843
|
type: "primary",
|
|
1854
|
-
disabled:
|
|
1844
|
+
disabled: _ctx.disabled,
|
|
1855
1845
|
plain: "",
|
|
1856
1846
|
onClick: _cache[2] || (_cache[2] = ($event) => newHandler())
|
|
1857
1847
|
}, {
|
|
1858
1848
|
default: withCtx(() => [
|
|
1859
|
-
|
|
1849
|
+
createTextVNode("添加")
|
|
1860
1850
|
]),
|
|
1861
1851
|
_: 1
|
|
1862
1852
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1863
|
-
|
|
1864
|
-
|
|
1853
|
+
createTextVNode(" "),
|
|
1854
|
+
_ctx.enableToggleMode && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1865
1855
|
key: 1,
|
|
1866
1856
|
icon: unref(Grid),
|
|
1867
1857
|
size: "small",
|
|
@@ -1869,11 +1859,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1869
1859
|
onClick: toggleMode
|
|
1870
1860
|
}, {
|
|
1871
1861
|
default: withCtx(() => [
|
|
1872
|
-
|
|
1862
|
+
createTextVNode("展开配置")
|
|
1873
1863
|
]),
|
|
1874
1864
|
_: 1
|
|
1875
1865
|
}, 8, ["icon"])) : createCommentVNode("", true),
|
|
1876
|
-
|
|
1866
|
+
_ctx.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1877
1867
|
key: 2,
|
|
1878
1868
|
icon: unref(FullScreen),
|
|
1879
1869
|
size: "small",
|
|
@@ -1885,13 +1875,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1885
1875
|
]),
|
|
1886
1876
|
_: 1
|
|
1887
1877
|
}, 8, ["icon"])) : createCommentVNode("", true),
|
|
1888
|
-
|
|
1878
|
+
importable.value ? (openBlock(), createBlock(unref(TMagicUpload), {
|
|
1889
1879
|
key: 3,
|
|
1890
1880
|
style: { "display": "inline-block" },
|
|
1891
1881
|
ref_key: "excelBtn",
|
|
1892
1882
|
ref: excelBtn,
|
|
1893
1883
|
action: "/noop",
|
|
1894
|
-
disabled:
|
|
1884
|
+
disabled: _ctx.disabled,
|
|
1895
1885
|
"on-change": excelHandler,
|
|
1896
1886
|
"auto-upload": false
|
|
1897
1887
|
}, {
|
|
@@ -1899,40 +1889,40 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1899
1889
|
createVNode(unref(TMagicButton), {
|
|
1900
1890
|
size: "small",
|
|
1901
1891
|
type: "success",
|
|
1902
|
-
disabled:
|
|
1892
|
+
disabled: _ctx.disabled,
|
|
1903
1893
|
plain: ""
|
|
1904
1894
|
}, {
|
|
1905
1895
|
default: withCtx(() => [
|
|
1906
|
-
|
|
1896
|
+
createTextVNode("导入EXCEL")
|
|
1907
1897
|
]),
|
|
1908
1898
|
_: 1
|
|
1909
1899
|
}, 8, ["disabled"])
|
|
1910
1900
|
]),
|
|
1911
1901
|
_: 1
|
|
1912
1902
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1913
|
-
|
|
1914
|
-
|
|
1903
|
+
createTextVNode(" "),
|
|
1904
|
+
importable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1915
1905
|
key: 4,
|
|
1916
1906
|
size: "small",
|
|
1917
1907
|
type: "warning",
|
|
1918
|
-
disabled:
|
|
1908
|
+
disabled: _ctx.disabled,
|
|
1919
1909
|
plain: "",
|
|
1920
1910
|
onClick: _cache[3] || (_cache[3] = ($event) => clearHandler())
|
|
1921
1911
|
}, {
|
|
1922
1912
|
default: withCtx(() => [
|
|
1923
|
-
|
|
1913
|
+
createTextVNode("清空")
|
|
1924
1914
|
]),
|
|
1925
1915
|
_: 1
|
|
1926
1916
|
}, 8, ["disabled"])) : createCommentVNode("", true)
|
|
1927
1917
|
]),
|
|
1928
|
-
|
|
1918
|
+
_ctx.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1929
1919
|
createVNode(unref(TMagicPagination), {
|
|
1930
1920
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
1931
|
-
"hide-on-single-page":
|
|
1921
|
+
"hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
|
|
1932
1922
|
"current-page": pagecontext.value + 1,
|
|
1933
1923
|
"page-sizes": [pagesize.value, 60, 120, 300],
|
|
1934
1924
|
"page-size": pagesize.value,
|
|
1935
|
-
total:
|
|
1925
|
+
total: _ctx.model[modelName.value].length,
|
|
1936
1926
|
onSizeChange: handleSizeChange,
|
|
1937
1927
|
onCurrentChange: handleCurrentChange
|
|
1938
1928
|
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
|
|
@@ -1942,28 +1932,28 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1942
1932
|
}
|
|
1943
1933
|
});
|
|
1944
1934
|
|
|
1945
|
-
const __default__$m = defineComponent({
|
|
1946
|
-
name: "MFormTabs"
|
|
1947
|
-
});
|
|
1948
1935
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1949
|
-
...
|
|
1936
|
+
...{
|
|
1937
|
+
name: "MFormTabs"
|
|
1938
|
+
},
|
|
1939
|
+
__name: "Tabs",
|
|
1950
1940
|
props: {
|
|
1951
|
-
model:
|
|
1941
|
+
model: {},
|
|
1952
1942
|
lastValues: { default: () => ({}) },
|
|
1953
1943
|
isCompare: { type: Boolean, default: false },
|
|
1954
|
-
config:
|
|
1955
|
-
name:
|
|
1956
|
-
size:
|
|
1957
|
-
labelWidth:
|
|
1958
|
-
prop:
|
|
1944
|
+
config: {},
|
|
1945
|
+
name: {},
|
|
1946
|
+
size: {},
|
|
1947
|
+
labelWidth: {},
|
|
1948
|
+
prop: {},
|
|
1959
1949
|
expandMore: { type: Boolean },
|
|
1960
1950
|
disabled: { type: Boolean }
|
|
1961
1951
|
},
|
|
1962
1952
|
emits: ["change", "addDiffCount"],
|
|
1963
1953
|
setup(__props, { emit }) {
|
|
1964
1954
|
const props = __props;
|
|
1965
|
-
const tabPaneComponent = getConfig$1("components")
|
|
1966
|
-
const tabsComponent = getConfig$1("components")
|
|
1955
|
+
const tabPaneComponent = getConfig$1("components")?.tabPane;
|
|
1956
|
+
const tabsComponent = getConfig$1("components")?.tabs;
|
|
1967
1957
|
const getActive = (mForm2, props2, activeTabName2) => {
|
|
1968
1958
|
const { config, model, prop } = props2;
|
|
1969
1959
|
const { active } = config;
|
|
@@ -2059,28 +2049,31 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2059
2049
|
emit("addDiffCount");
|
|
2060
2050
|
};
|
|
2061
2051
|
return (_ctx, _cache) => {
|
|
2062
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent)
|
|
2052
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent)?.component || "el-tabs"), mergeProps(
|
|
2063
2053
|
{
|
|
2064
2054
|
modelValue: activeTabName.value,
|
|
2065
2055
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event)
|
|
2066
2056
|
},
|
|
2067
|
-
unref(tabsComponent)
|
|
2068
|
-
type:
|
|
2069
|
-
editable:
|
|
2070
|
-
tabPosition:
|
|
2071
|
-
}),
|
|
2057
|
+
unref(tabsComponent)?.props({
|
|
2058
|
+
type: _ctx.config.tabType,
|
|
2059
|
+
editable: _ctx.config.editable || false,
|
|
2060
|
+
tabPosition: _ctx.config.tabPosition || "top"
|
|
2061
|
+
}) || {},
|
|
2072
2062
|
{
|
|
2073
|
-
class: `tmagic-design-tabs ${
|
|
2063
|
+
class: `tmagic-design-tabs ${_ctx.config.dynamic ? "magic-form-dynamic-tab" : "magic-form-tab"}`,
|
|
2074
2064
|
onTabClick: tabClickHandler,
|
|
2075
2065
|
onTabAdd,
|
|
2076
2066
|
onTabRemove
|
|
2077
2067
|
}
|
|
2078
2068
|
), {
|
|
2079
2069
|
default: withCtx(() => [
|
|
2080
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
2081
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)
|
|
2082
|
-
|
|
2083
|
-
|
|
2070
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab, tabIndex) => {
|
|
2071
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"), mergeProps(
|
|
2072
|
+
{
|
|
2073
|
+
key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex
|
|
2074
|
+
},
|
|
2075
|
+
unref(tabPaneComponent)?.props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false }) || {}
|
|
2076
|
+
), {
|
|
2084
2077
|
label: withCtx(() => [
|
|
2085
2078
|
createElementVNode("span", null, [
|
|
2086
2079
|
createTextVNode(toDisplayString(filter(tab.title)), 1),
|
|
@@ -2096,14 +2089,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2096
2089
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
2097
2090
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
2098
2091
|
config: item,
|
|
2099
|
-
disabled:
|
|
2100
|
-
model:
|
|
2101
|
-
"last-values": unref(isEmpty)(
|
|
2102
|
-
"is-compare":
|
|
2103
|
-
prop:
|
|
2104
|
-
size:
|
|
2105
|
-
"label-width": tab.labelWidth ||
|
|
2106
|
-
"expand-more":
|
|
2092
|
+
disabled: _ctx.disabled,
|
|
2093
|
+
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,
|
|
2094
|
+
"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,
|
|
2095
|
+
"is-compare": _ctx.isCompare,
|
|
2096
|
+
prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
|
|
2097
|
+
size: _ctx.size,
|
|
2098
|
+
"label-width": tab.labelWidth || _ctx.labelWidth,
|
|
2099
|
+
"expand-more": _ctx.expandMore,
|
|
2107
2100
|
onChange: changeHandler,
|
|
2108
2101
|
onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
|
|
2109
2102
|
}, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
|
|
@@ -2145,21 +2138,21 @@ const useAddField = (prop) => {
|
|
|
2145
2138
|
);
|
|
2146
2139
|
};
|
|
2147
2140
|
|
|
2148
|
-
const __default__$l = defineComponent({
|
|
2149
|
-
name: "MFormCascader"
|
|
2150
|
-
});
|
|
2151
2141
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2152
|
-
...
|
|
2142
|
+
...{
|
|
2143
|
+
name: "MFormCascader"
|
|
2144
|
+
},
|
|
2145
|
+
__name: "Cascader",
|
|
2153
2146
|
props: {
|
|
2154
|
-
config:
|
|
2155
|
-
model:
|
|
2156
|
-
initValues:
|
|
2157
|
-
values:
|
|
2158
|
-
name:
|
|
2159
|
-
prop:
|
|
2147
|
+
config: {},
|
|
2148
|
+
model: {},
|
|
2149
|
+
initValues: {},
|
|
2150
|
+
values: {},
|
|
2151
|
+
name: {},
|
|
2152
|
+
prop: {},
|
|
2160
2153
|
disabled: { type: Boolean },
|
|
2161
|
-
size:
|
|
2162
|
-
lastValues:
|
|
2154
|
+
size: {},
|
|
2155
|
+
lastValues: {}
|
|
2163
2156
|
},
|
|
2164
2157
|
emits: ["change"],
|
|
2165
2158
|
setup(__props, { emit }) {
|
|
@@ -2215,39 +2208,39 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2215
2208
|
};
|
|
2216
2209
|
return (_ctx, _cache) => {
|
|
2217
2210
|
return openBlock(), createBlock(unref(TMagicCascader), {
|
|
2218
|
-
modelValue:
|
|
2219
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2211
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2212
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2220
2213
|
ref_key: "tMagicCascader",
|
|
2221
2214
|
ref: tMagicCascader,
|
|
2222
2215
|
style: { "width": "100%" },
|
|
2223
2216
|
clearable: "",
|
|
2224
2217
|
filterable: "",
|
|
2225
|
-
size:
|
|
2226
|
-
placeholder:
|
|
2227
|
-
disabled:
|
|
2218
|
+
size: _ctx.size,
|
|
2219
|
+
placeholder: _ctx.config.placeholder,
|
|
2220
|
+
disabled: _ctx.disabled,
|
|
2228
2221
|
options: unref(options),
|
|
2229
|
-
props: { multiple:
|
|
2222
|
+
props: { multiple: _ctx.config.multiple },
|
|
2230
2223
|
onChange: changeHandler
|
|
2231
2224
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "options", "props"]);
|
|
2232
2225
|
};
|
|
2233
2226
|
}
|
|
2234
2227
|
});
|
|
2235
2228
|
|
|
2236
|
-
const __default__$k = defineComponent({
|
|
2237
|
-
name: "MFormCheckbox"
|
|
2238
|
-
});
|
|
2239
2229
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2240
|
-
...
|
|
2230
|
+
...{
|
|
2231
|
+
name: "MFormCheckbox"
|
|
2232
|
+
},
|
|
2233
|
+
__name: "Checkbox",
|
|
2241
2234
|
props: {
|
|
2242
|
-
config:
|
|
2243
|
-
model:
|
|
2244
|
-
initValues:
|
|
2245
|
-
values:
|
|
2246
|
-
name:
|
|
2247
|
-
prop:
|
|
2235
|
+
config: {},
|
|
2236
|
+
model: {},
|
|
2237
|
+
initValues: {},
|
|
2238
|
+
values: {},
|
|
2239
|
+
name: {},
|
|
2240
|
+
prop: {},
|
|
2248
2241
|
disabled: { type: Boolean },
|
|
2249
|
-
size:
|
|
2250
|
-
lastValues:
|
|
2242
|
+
size: {},
|
|
2243
|
+
lastValues: {}
|
|
2251
2244
|
},
|
|
2252
2245
|
emits: ["change"],
|
|
2253
2246
|
setup(__props, { emit }) {
|
|
@@ -2278,16 +2271,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2278
2271
|
};
|
|
2279
2272
|
return (_ctx, _cache) => {
|
|
2280
2273
|
return openBlock(), createBlock(unref(TMagicCheckbox), {
|
|
2281
|
-
modelValue:
|
|
2282
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2283
|
-
size:
|
|
2284
|
-
trueLabel:
|
|
2285
|
-
falseLabel:
|
|
2286
|
-
disabled:
|
|
2274
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2275
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2276
|
+
size: _ctx.size,
|
|
2277
|
+
trueLabel: activeValue.value,
|
|
2278
|
+
falseLabel: inactiveValue.value,
|
|
2279
|
+
disabled: _ctx.disabled,
|
|
2287
2280
|
onChange: changeHandler
|
|
2288
2281
|
}, {
|
|
2289
2282
|
default: withCtx(() => [
|
|
2290
|
-
createTextVNode(toDisplayString(
|
|
2283
|
+
createTextVNode(toDisplayString(_ctx.config.text), 1)
|
|
2291
2284
|
]),
|
|
2292
2285
|
_: 1
|
|
2293
2286
|
}, 8, ["modelValue", "size", "trueLabel", "falseLabel", "disabled"]);
|
|
@@ -2295,21 +2288,21 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2295
2288
|
}
|
|
2296
2289
|
});
|
|
2297
2290
|
|
|
2298
|
-
const __default__$j = defineComponent({
|
|
2299
|
-
name: "MFormCheckGroup"
|
|
2300
|
-
});
|
|
2301
2291
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2302
|
-
...
|
|
2292
|
+
...{
|
|
2293
|
+
name: "MFormCheckGroup"
|
|
2294
|
+
},
|
|
2295
|
+
__name: "CheckboxGroup",
|
|
2303
2296
|
props: {
|
|
2304
|
-
config:
|
|
2305
|
-
model:
|
|
2306
|
-
initValues:
|
|
2307
|
-
values:
|
|
2308
|
-
name:
|
|
2309
|
-
prop:
|
|
2297
|
+
config: {},
|
|
2298
|
+
model: {},
|
|
2299
|
+
initValues: {},
|
|
2300
|
+
values: {},
|
|
2301
|
+
name: {},
|
|
2302
|
+
prop: {},
|
|
2310
2303
|
disabled: { type: Boolean },
|
|
2311
|
-
size:
|
|
2312
|
-
lastValues:
|
|
2304
|
+
size: {},
|
|
2305
|
+
lastValues: {}
|
|
2313
2306
|
},
|
|
2314
2307
|
emits: ["change"],
|
|
2315
2308
|
setup(__props, { emit }) {
|
|
@@ -2331,14 +2324,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2331
2324
|
});
|
|
2332
2325
|
return (_ctx, _cache) => {
|
|
2333
2326
|
return openBlock(), createBlock(unref(TMagicCheckboxGroup), {
|
|
2334
|
-
modelValue:
|
|
2335
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2336
|
-
size:
|
|
2337
|
-
disabled:
|
|
2327
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2328
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2329
|
+
size: _ctx.size,
|
|
2330
|
+
disabled: _ctx.disabled,
|
|
2338
2331
|
onChange: changeHandler
|
|
2339
2332
|
}, {
|
|
2340
2333
|
default: withCtx(() => [
|
|
2341
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
2334
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option) => {
|
|
2342
2335
|
return openBlock(), createBlock(unref(TMagicCheckbox), {
|
|
2343
2336
|
label: option.value,
|
|
2344
2337
|
value: option.value,
|
|
@@ -2358,21 +2351,21 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2358
2351
|
}
|
|
2359
2352
|
});
|
|
2360
2353
|
|
|
2361
|
-
const __default__$i = defineComponent({
|
|
2362
|
-
name: "MFormColorPicker"
|
|
2363
|
-
});
|
|
2364
2354
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2365
|
-
...
|
|
2355
|
+
...{
|
|
2356
|
+
name: "MFormColorPicker"
|
|
2357
|
+
},
|
|
2358
|
+
__name: "ColorPicker",
|
|
2366
2359
|
props: {
|
|
2367
|
-
config:
|
|
2368
|
-
model:
|
|
2369
|
-
initValues:
|
|
2370
|
-
values:
|
|
2371
|
-
name:
|
|
2372
|
-
prop:
|
|
2360
|
+
config: {},
|
|
2361
|
+
model: {},
|
|
2362
|
+
initValues: {},
|
|
2363
|
+
values: {},
|
|
2364
|
+
name: {},
|
|
2365
|
+
prop: {},
|
|
2373
2366
|
disabled: { type: Boolean },
|
|
2374
|
-
size:
|
|
2375
|
-
lastValues:
|
|
2367
|
+
size: {},
|
|
2368
|
+
lastValues: {}
|
|
2376
2369
|
},
|
|
2377
2370
|
emits: ["change"],
|
|
2378
2371
|
setup(__props, { emit }) {
|
|
@@ -2381,10 +2374,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2381
2374
|
const changeHandler = (value) => emit("change", value);
|
|
2382
2375
|
return (_ctx, _cache) => {
|
|
2383
2376
|
return openBlock(), createBlock(unref(TMagicColorPicker), {
|
|
2384
|
-
modelValue:
|
|
2385
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2386
|
-
size:
|
|
2387
|
-
disabled:
|
|
2377
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2378
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2379
|
+
size: _ctx.size,
|
|
2380
|
+
disabled: _ctx.disabled,
|
|
2388
2381
|
showAlpha: true,
|
|
2389
2382
|
onChange: changeHandler
|
|
2390
2383
|
}, null, 8, ["modelValue", "size", "disabled"]);
|
|
@@ -2392,21 +2385,21 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2392
2385
|
}
|
|
2393
2386
|
});
|
|
2394
2387
|
|
|
2395
|
-
const __default__$h = defineComponent({
|
|
2396
|
-
name: "MFormDate"
|
|
2397
|
-
});
|
|
2398
2388
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2399
|
-
...
|
|
2389
|
+
...{
|
|
2390
|
+
name: "MFormDate"
|
|
2391
|
+
},
|
|
2392
|
+
__name: "Date",
|
|
2400
2393
|
props: {
|
|
2401
|
-
config:
|
|
2402
|
-
model:
|
|
2403
|
-
initValues:
|
|
2404
|
-
values:
|
|
2405
|
-
name:
|
|
2406
|
-
prop:
|
|
2394
|
+
config: {},
|
|
2395
|
+
model: {},
|
|
2396
|
+
initValues: {},
|
|
2397
|
+
values: {},
|
|
2398
|
+
name: {},
|
|
2399
|
+
prop: {},
|
|
2407
2400
|
disabled: { type: Boolean },
|
|
2408
|
-
size:
|
|
2409
|
-
lastValues:
|
|
2401
|
+
size: {},
|
|
2402
|
+
lastValues: {}
|
|
2410
2403
|
},
|
|
2411
2404
|
emits: ["change"],
|
|
2412
2405
|
setup(__props, { emit }) {
|
|
@@ -2418,35 +2411,35 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2418
2411
|
};
|
|
2419
2412
|
return (_ctx, _cache) => {
|
|
2420
2413
|
return openBlock(), createBlock(unref(TMagicDatePicker), {
|
|
2421
|
-
modelValue:
|
|
2422
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2414
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2415
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2423
2416
|
type: "date",
|
|
2424
|
-
size:
|
|
2425
|
-
placeholder:
|
|
2426
|
-
disabled:
|
|
2427
|
-
format:
|
|
2428
|
-
"value-format":
|
|
2417
|
+
size: _ctx.size,
|
|
2418
|
+
placeholder: _ctx.config.placeholder,
|
|
2419
|
+
disabled: _ctx.disabled,
|
|
2420
|
+
format: _ctx.config.format,
|
|
2421
|
+
"value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
2429
2422
|
onChange: changeHandler
|
|
2430
2423
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format"]);
|
|
2431
2424
|
};
|
|
2432
2425
|
}
|
|
2433
2426
|
});
|
|
2434
2427
|
|
|
2435
|
-
const __default__$g = defineComponent({
|
|
2436
|
-
name: "MFormDateRange"
|
|
2437
|
-
});
|
|
2438
2428
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2439
|
-
...
|
|
2429
|
+
...{
|
|
2430
|
+
name: "MFormDateRange"
|
|
2431
|
+
},
|
|
2432
|
+
__name: "Daterange",
|
|
2440
2433
|
props: {
|
|
2441
|
-
config:
|
|
2442
|
-
model:
|
|
2443
|
-
initValues:
|
|
2444
|
-
values:
|
|
2445
|
-
name:
|
|
2446
|
-
prop:
|
|
2434
|
+
config: {},
|
|
2435
|
+
model: {},
|
|
2436
|
+
initValues: {},
|
|
2437
|
+
values: {},
|
|
2438
|
+
name: {},
|
|
2439
|
+
prop: {},
|
|
2447
2440
|
disabled: { type: Boolean },
|
|
2448
|
-
size:
|
|
2449
|
-
lastValues:
|
|
2441
|
+
size: {},
|
|
2442
|
+
lastValues: {}
|
|
2450
2443
|
},
|
|
2451
2444
|
emits: ["change"],
|
|
2452
2445
|
setup(__props, { emit }) {
|
|
@@ -2524,31 +2517,31 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2524
2517
|
"range-separator": "-",
|
|
2525
2518
|
"start-placeholder": "开始日期",
|
|
2526
2519
|
"end-placeholder": "结束日期",
|
|
2527
|
-
size:
|
|
2520
|
+
size: _ctx.size,
|
|
2528
2521
|
"unlink-panels": true,
|
|
2529
|
-
disabled:
|
|
2530
|
-
"default-time":
|
|
2522
|
+
disabled: _ctx.disabled,
|
|
2523
|
+
"default-time": _ctx.config.defaultTime,
|
|
2531
2524
|
onChange: changeHandler
|
|
2532
2525
|
}, null, 8, ["modelValue", "size", "disabled", "default-time"]);
|
|
2533
2526
|
};
|
|
2534
2527
|
}
|
|
2535
2528
|
});
|
|
2536
2529
|
|
|
2537
|
-
const __default__$f = defineComponent({
|
|
2538
|
-
name: "MFormDateTime"
|
|
2539
|
-
});
|
|
2540
2530
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2541
|
-
...
|
|
2531
|
+
...{
|
|
2532
|
+
name: "MFormDateTime"
|
|
2533
|
+
},
|
|
2534
|
+
__name: "DateTime",
|
|
2542
2535
|
props: {
|
|
2543
|
-
config:
|
|
2544
|
-
model:
|
|
2545
|
-
initValues:
|
|
2546
|
-
values:
|
|
2547
|
-
name:
|
|
2548
|
-
prop:
|
|
2536
|
+
config: {},
|
|
2537
|
+
model: {},
|
|
2538
|
+
initValues: {},
|
|
2539
|
+
values: {},
|
|
2540
|
+
name: {},
|
|
2541
|
+
prop: {},
|
|
2549
2542
|
disabled: { type: Boolean },
|
|
2550
|
-
size:
|
|
2551
|
-
lastValues:
|
|
2543
|
+
size: {},
|
|
2544
|
+
lastValues: {}
|
|
2552
2545
|
},
|
|
2553
2546
|
emits: ["change"],
|
|
2554
2547
|
setup(__props, { emit }) {
|
|
@@ -2567,16 +2560,16 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2567
2560
|
};
|
|
2568
2561
|
return (_ctx, _cache) => {
|
|
2569
2562
|
return openBlock(), createBlock(unref(TMagicDatePicker), {
|
|
2570
|
-
modelValue:
|
|
2571
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2563
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2564
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2572
2565
|
"popper-class": "magic-datetime-picker-popper",
|
|
2573
2566
|
type: "datetime",
|
|
2574
|
-
size:
|
|
2575
|
-
placeholder:
|
|
2576
|
-
disabled:
|
|
2577
|
-
format:
|
|
2578
|
-
"value-format":
|
|
2579
|
-
"default-time":
|
|
2567
|
+
size: _ctx.size,
|
|
2568
|
+
placeholder: _ctx.config.placeholder,
|
|
2569
|
+
disabled: _ctx.disabled,
|
|
2570
|
+
format: _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
|
|
2571
|
+
"value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
2572
|
+
"default-time": _ctx.config.defaultTime,
|
|
2580
2573
|
onChange: changeHandler
|
|
2581
2574
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "default-time"]);
|
|
2582
2575
|
};
|
|
@@ -2584,19 +2577,19 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2584
2577
|
});
|
|
2585
2578
|
|
|
2586
2579
|
const _hoisted_1$5 = { key: 0 };
|
|
2587
|
-
const __default__$e = defineComponent({
|
|
2588
|
-
name: "MFormDisplay"
|
|
2589
|
-
});
|
|
2590
2580
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2591
|
-
...
|
|
2581
|
+
...{
|
|
2582
|
+
name: "MFormDisplay"
|
|
2583
|
+
},
|
|
2584
|
+
__name: "Display",
|
|
2592
2585
|
props: {
|
|
2593
|
-
config:
|
|
2594
|
-
model:
|
|
2595
|
-
initValues:
|
|
2596
|
-
values:
|
|
2597
|
-
name:
|
|
2598
|
-
prop:
|
|
2599
|
-
lastValues:
|
|
2586
|
+
config: {},
|
|
2587
|
+
model: {},
|
|
2588
|
+
initValues: {},
|
|
2589
|
+
values: {},
|
|
2590
|
+
name: {},
|
|
2591
|
+
prop: {},
|
|
2592
|
+
lastValues: {}
|
|
2600
2593
|
},
|
|
2601
2594
|
setup(__props) {
|
|
2602
2595
|
const props = __props;
|
|
@@ -2605,27 +2598,27 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2605
2598
|
}
|
|
2606
2599
|
useAddField(props.prop);
|
|
2607
2600
|
return (_ctx, _cache) => {
|
|
2608
|
-
return
|
|
2601
|
+
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(_ctx.model[_ctx.name]), 1)) : createCommentVNode("", true);
|
|
2609
2602
|
};
|
|
2610
2603
|
}
|
|
2611
2604
|
});
|
|
2612
2605
|
|
|
2613
2606
|
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2614
|
-
const __default__$d = defineComponent({
|
|
2615
|
-
name: "MFormDynamicField"
|
|
2616
|
-
});
|
|
2617
2607
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2618
|
-
...
|
|
2608
|
+
...{
|
|
2609
|
+
name: "MFormDynamicField"
|
|
2610
|
+
},
|
|
2611
|
+
__name: "DynamicField",
|
|
2619
2612
|
props: {
|
|
2620
|
-
config:
|
|
2621
|
-
model:
|
|
2622
|
-
initValues:
|
|
2623
|
-
values:
|
|
2624
|
-
name:
|
|
2625
|
-
prop:
|
|
2613
|
+
config: {},
|
|
2614
|
+
model: {},
|
|
2615
|
+
initValues: {},
|
|
2616
|
+
values: {},
|
|
2617
|
+
name: {},
|
|
2618
|
+
prop: {},
|
|
2626
2619
|
disabled: { type: Boolean },
|
|
2627
|
-
size:
|
|
2628
|
-
lastValues:
|
|
2620
|
+
size: {},
|
|
2621
|
+
lastValues: {}
|
|
2629
2622
|
},
|
|
2630
2623
|
emits: ["change"],
|
|
2631
2624
|
setup(__props, { emit }) {
|
|
@@ -2703,40 +2696,40 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2703
2696
|
}
|
|
2704
2697
|
});
|
|
2705
2698
|
|
|
2706
|
-
const __default__$c = defineComponent({
|
|
2707
|
-
name: "MFormHidden"
|
|
2708
|
-
});
|
|
2709
2699
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2710
|
-
...
|
|
2700
|
+
...{
|
|
2701
|
+
name: "MFormHidden"
|
|
2702
|
+
},
|
|
2703
|
+
__name: "Hidden",
|
|
2711
2704
|
props: {
|
|
2712
|
-
config:
|
|
2713
|
-
model:
|
|
2714
|
-
initValues:
|
|
2715
|
-
values:
|
|
2716
|
-
name:
|
|
2717
|
-
prop:
|
|
2718
|
-
lastValues:
|
|
2705
|
+
config: {},
|
|
2706
|
+
model: {},
|
|
2707
|
+
initValues: {},
|
|
2708
|
+
values: {},
|
|
2709
|
+
name: {},
|
|
2710
|
+
prop: {},
|
|
2711
|
+
lastValues: {}
|
|
2719
2712
|
},
|
|
2720
2713
|
setup(__props) {
|
|
2721
2714
|
const props = __props;
|
|
2722
2715
|
useAddField(props.prop);
|
|
2723
2716
|
return (_ctx, _cache) => {
|
|
2724
|
-
return
|
|
2717
|
+
return _ctx.model ? withDirectives((openBlock(), createElementBlock("input", {
|
|
2725
2718
|
key: 0,
|
|
2726
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2719
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2727
2720
|
type: "hidden"
|
|
2728
2721
|
}, null, 512)), [
|
|
2729
|
-
[vModelText,
|
|
2722
|
+
[vModelText, _ctx.model[_ctx.name]]
|
|
2730
2723
|
]) : createCommentVNode("", true);
|
|
2731
2724
|
};
|
|
2732
2725
|
}
|
|
2733
2726
|
});
|
|
2734
2727
|
|
|
2735
|
-
const __default__$b = defineComponent({
|
|
2736
|
-
name: "MForm"
|
|
2737
|
-
});
|
|
2738
2728
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
2739
|
-
...
|
|
2729
|
+
...{
|
|
2730
|
+
name: "MForm"
|
|
2731
|
+
},
|
|
2732
|
+
__name: "Form",
|
|
2740
2733
|
props: {
|
|
2741
2734
|
config: { default: () => [] },
|
|
2742
2735
|
initValues: { default: () => ({}) },
|
|
@@ -2747,14 +2740,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2747
2740
|
disabled: { type: Boolean, default: false },
|
|
2748
2741
|
height: { default: "auto" },
|
|
2749
2742
|
stepActive: { default: 1 },
|
|
2750
|
-
size:
|
|
2743
|
+
size: {},
|
|
2751
2744
|
inline: { type: Boolean, default: false },
|
|
2752
2745
|
labelPosition: { default: "right" },
|
|
2753
2746
|
keyProp: { default: "__key" },
|
|
2754
|
-
popperClass:
|
|
2747
|
+
popperClass: {}
|
|
2755
2748
|
},
|
|
2756
2749
|
emits: ["change", "field-input", "field-change"],
|
|
2757
|
-
setup(__props, { expose, emit }) {
|
|
2750
|
+
setup(__props, { expose: __expose, emit }) {
|
|
2758
2751
|
const props = __props;
|
|
2759
2752
|
const tMagicForm = ref();
|
|
2760
2753
|
const initialized = ref(false);
|
|
@@ -2824,7 +2817,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2824
2817
|
const changeHandler = () => {
|
|
2825
2818
|
emit("change", values.value);
|
|
2826
2819
|
};
|
|
2827
|
-
|
|
2820
|
+
__expose({
|
|
2828
2821
|
values,
|
|
2829
2822
|
lastValuesProcessed,
|
|
2830
2823
|
formState,
|
|
@@ -2857,23 +2850,23 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2857
2850
|
ref_key: "tMagicForm",
|
|
2858
2851
|
ref: tMagicForm,
|
|
2859
2852
|
model: values.value,
|
|
2860
|
-
"label-width":
|
|
2861
|
-
style: normalizeStyle(`height: ${
|
|
2862
|
-
inline:
|
|
2863
|
-
"label-position":
|
|
2853
|
+
"label-width": _ctx.labelWidth,
|
|
2854
|
+
style: normalizeStyle(`height: ${_ctx.height}`),
|
|
2855
|
+
inline: _ctx.inline,
|
|
2856
|
+
"label-position": _ctx.labelPosition
|
|
2864
2857
|
}, {
|
|
2865
2858
|
default: withCtx(() => [
|
|
2866
|
-
initialized.value && Array.isArray(
|
|
2859
|
+
initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
|
|
2867
2860
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
2868
|
-
disabled:
|
|
2869
|
-
key: item[
|
|
2861
|
+
disabled: _ctx.disabled,
|
|
2862
|
+
key: item[_ctx.keyProp] ?? index,
|
|
2870
2863
|
config: item,
|
|
2871
2864
|
model: values.value,
|
|
2872
2865
|
"last-values": lastValuesProcessed.value,
|
|
2873
|
-
"is-compare":
|
|
2874
|
-
"label-width": item.labelWidth ||
|
|
2875
|
-
"step-active":
|
|
2876
|
-
size:
|
|
2866
|
+
"is-compare": _ctx.isCompare,
|
|
2867
|
+
"label-width": item.labelWidth || _ctx.labelWidth,
|
|
2868
|
+
"step-active": _ctx.stepActive,
|
|
2869
|
+
size: _ctx.size,
|
|
2877
2870
|
onChange: changeHandler
|
|
2878
2871
|
}, null, 8, ["disabled", "config", "model", "last-values", "is-compare", "label-width", "step-active", "size"]);
|
|
2879
2872
|
}), 128)) : createCommentVNode("", true)
|
|
@@ -2885,29 +2878,26 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2885
2878
|
});
|
|
2886
2879
|
|
|
2887
2880
|
const _hoisted_1$3 = { style: { "min-height": "1px" } };
|
|
2888
|
-
const _hoisted_2$1 = /* @__PURE__ */ createTextVNode("取 消");
|
|
2889
|
-
const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("上一步");
|
|
2890
|
-
const _hoisted_4 = /* @__PURE__ */ createTextVNode("下一步");
|
|
2891
|
-
const __default__$a = defineComponent({
|
|
2892
|
-
name: "MFormDialog"
|
|
2893
|
-
});
|
|
2894
2881
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
2895
|
-
...
|
|
2882
|
+
...{
|
|
2883
|
+
name: "MFormDialog"
|
|
2884
|
+
},
|
|
2885
|
+
__name: "FormDialog",
|
|
2896
2886
|
props: {
|
|
2897
2887
|
config: { default: () => [] },
|
|
2898
2888
|
values: { default: () => ({}) },
|
|
2899
|
-
parentValues:
|
|
2900
|
-
width:
|
|
2901
|
-
labelWidth:
|
|
2889
|
+
parentValues: {},
|
|
2890
|
+
width: {},
|
|
2891
|
+
labelWidth: {},
|
|
2902
2892
|
fullscreen: { type: Boolean },
|
|
2903
2893
|
disabled: { type: Boolean },
|
|
2904
|
-
title:
|
|
2905
|
-
zIndex:
|
|
2906
|
-
size:
|
|
2894
|
+
title: {},
|
|
2895
|
+
zIndex: {},
|
|
2896
|
+
size: {},
|
|
2907
2897
|
confirmText: { default: "确定" }
|
|
2908
2898
|
},
|
|
2909
2899
|
emits: ["close", "submit", "error", "change"],
|
|
2910
|
-
setup(__props, { expose, emit }) {
|
|
2900
|
+
setup(__props, { expose: __expose, emit }) {
|
|
2911
2901
|
const props = __props;
|
|
2912
2902
|
const form = ref();
|
|
2913
2903
|
const dialogVisible = ref(false);
|
|
@@ -2956,7 +2946,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2956
2946
|
const changeHandler = (value) => {
|
|
2957
2947
|
emit("change", value);
|
|
2958
2948
|
};
|
|
2959
|
-
|
|
2949
|
+
__expose({
|
|
2960
2950
|
form,
|
|
2961
2951
|
saveFetch,
|
|
2962
2952
|
dialogVisible,
|
|
@@ -2970,10 +2960,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2970
2960
|
class: "m-form-dialog",
|
|
2971
2961
|
top: "20px",
|
|
2972
2962
|
"append-to-body": "",
|
|
2973
|
-
title:
|
|
2974
|
-
width:
|
|
2975
|
-
zIndex:
|
|
2976
|
-
fullscreen:
|
|
2963
|
+
title: _ctx.title,
|
|
2964
|
+
width: _ctx.width,
|
|
2965
|
+
zIndex: _ctx.zIndex,
|
|
2966
|
+
fullscreen: _ctx.fullscreen,
|
|
2977
2967
|
"close-on-click-modal": false,
|
|
2978
2968
|
onClose: closeHandler
|
|
2979
2969
|
}, {
|
|
@@ -2999,29 +2989,29 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2999
2989
|
size: "small"
|
|
3000
2990
|
}, {
|
|
3001
2991
|
default: withCtx(() => [
|
|
3002
|
-
|
|
2992
|
+
createTextVNode("取 消")
|
|
3003
2993
|
]),
|
|
3004
2994
|
_: 1
|
|
3005
2995
|
}),
|
|
3006
|
-
|
|
2996
|
+
hasStep.value && stepActive.value > 1 ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3007
2997
|
key: 0,
|
|
3008
2998
|
type: "info",
|
|
3009
2999
|
size: "small",
|
|
3010
3000
|
onClick: preStep
|
|
3011
3001
|
}, {
|
|
3012
3002
|
default: withCtx(() => [
|
|
3013
|
-
|
|
3003
|
+
createTextVNode("上一步")
|
|
3014
3004
|
]),
|
|
3015
3005
|
_: 1
|
|
3016
3006
|
})) : createCommentVNode("", true),
|
|
3017
|
-
|
|
3007
|
+
hasStep.value && stepCount.value > stepActive.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3018
3008
|
key: 1,
|
|
3019
3009
|
type: "info",
|
|
3020
3010
|
size: "small",
|
|
3021
3011
|
onClick: nextStep
|
|
3022
3012
|
}, {
|
|
3023
3013
|
default: withCtx(() => [
|
|
3024
|
-
|
|
3014
|
+
createTextVNode("下一步")
|
|
3025
3015
|
]),
|
|
3026
3016
|
_: 1
|
|
3027
3017
|
})) : (openBlock(), createBlock(unref(TMagicButton), {
|
|
@@ -3032,7 +3022,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3032
3022
|
onClick: save
|
|
3033
3023
|
}, {
|
|
3034
3024
|
default: withCtx(() => [
|
|
3035
|
-
createTextVNode(toDisplayString(
|
|
3025
|
+
createTextVNode(toDisplayString(_ctx.confirmText), 1)
|
|
3036
3026
|
]),
|
|
3037
3027
|
_: 1
|
|
3038
3028
|
}, 8, ["loading"]))
|
|
@@ -3055,12 +3045,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3055
3045
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3056
3046
|
ref_key: "form",
|
|
3057
3047
|
ref: form,
|
|
3058
|
-
size:
|
|
3059
|
-
disabled:
|
|
3060
|
-
config:
|
|
3061
|
-
"init-values":
|
|
3062
|
-
"parent-values":
|
|
3063
|
-
"label-width":
|
|
3048
|
+
size: _ctx.size,
|
|
3049
|
+
disabled: _ctx.disabled,
|
|
3050
|
+
config: _ctx.config,
|
|
3051
|
+
"init-values": _ctx.values,
|
|
3052
|
+
"parent-values": _ctx.parentValues,
|
|
3053
|
+
"label-width": _ctx.labelWidth,
|
|
3064
3054
|
onChange: changeHandler
|
|
3065
3055
|
}, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width"]),
|
|
3066
3056
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -3077,22 +3067,21 @@ const _hoisted_2 = {
|
|
|
3077
3067
|
key: 2,
|
|
3078
3068
|
class: "m-fields-link"
|
|
3079
3069
|
};
|
|
3080
|
-
const _hoisted_3 = /* @__PURE__ */ createTextVNode("点击编辑");
|
|
3081
|
-
const __default__$9 = defineComponent({
|
|
3082
|
-
name: "MFormLink"
|
|
3083
|
-
});
|
|
3084
3070
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3085
|
-
...
|
|
3071
|
+
...{
|
|
3072
|
+
name: "MFormLink"
|
|
3073
|
+
},
|
|
3074
|
+
__name: "Link",
|
|
3086
3075
|
props: {
|
|
3087
|
-
config:
|
|
3088
|
-
model:
|
|
3089
|
-
initValues:
|
|
3090
|
-
values:
|
|
3091
|
-
name:
|
|
3092
|
-
prop:
|
|
3076
|
+
config: {},
|
|
3077
|
+
model: {},
|
|
3078
|
+
initValues: {},
|
|
3079
|
+
values: {},
|
|
3080
|
+
name: {},
|
|
3081
|
+
prop: {},
|
|
3093
3082
|
disabled: { type: Boolean },
|
|
3094
|
-
size:
|
|
3095
|
-
lastValues:
|
|
3083
|
+
size: {},
|
|
3084
|
+
lastValues: {}
|
|
3096
3085
|
},
|
|
3097
3086
|
emits: ["change"],
|
|
3098
3087
|
setup(__props, { emit }) {
|
|
@@ -3141,34 +3130,34 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3141
3130
|
editor.value && (editor.value.dialogVisible = false);
|
|
3142
3131
|
};
|
|
3143
3132
|
return (_ctx, _cache) => {
|
|
3144
|
-
return
|
|
3133
|
+
return _ctx.config.href && !_ctx.disabled ? (openBlock(), createElementBlock("a", {
|
|
3145
3134
|
key: 0,
|
|
3146
3135
|
target: "_blank",
|
|
3147
|
-
href:
|
|
3148
|
-
style: normalizeStyle(
|
|
3149
|
-
}, toDisplayString(
|
|
3136
|
+
href: href.value,
|
|
3137
|
+
style: normalizeStyle(_ctx.config.css || {})
|
|
3138
|
+
}, toDisplayString(displayText.value), 13, _hoisted_1$2)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
3150
3139
|
key: 1,
|
|
3151
|
-
style: normalizeStyle(
|
|
3152
|
-
}, toDisplayString(
|
|
3140
|
+
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
3141
|
+
}, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
3153
3142
|
createVNode(unref(TMagicButton), {
|
|
3154
3143
|
text: true,
|
|
3155
3144
|
type: "primary",
|
|
3156
3145
|
onClick: editHandler
|
|
3157
3146
|
}, {
|
|
3158
3147
|
default: withCtx(() => [
|
|
3159
|
-
|
|
3148
|
+
createTextVNode("点击编辑")
|
|
3160
3149
|
]),
|
|
3161
3150
|
_: 1
|
|
3162
3151
|
}),
|
|
3163
3152
|
createVNode(_sfc_main$a, {
|
|
3164
3153
|
ref_key: "editor",
|
|
3165
3154
|
ref: editor,
|
|
3166
|
-
title:
|
|
3167
|
-
width:
|
|
3155
|
+
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
3156
|
+
width: _ctx.config.formWidth,
|
|
3168
3157
|
values: formValue.value,
|
|
3169
|
-
config:
|
|
3170
|
-
parentValues:
|
|
3171
|
-
fullscreen:
|
|
3158
|
+
config: formConfig.value,
|
|
3159
|
+
parentValues: _ctx.values,
|
|
3160
|
+
fullscreen: _ctx.config.fullscreen,
|
|
3172
3161
|
onSubmit: action
|
|
3173
3162
|
}, null, 8, ["title", "width", "values", "config", "parentValues", "fullscreen"])
|
|
3174
3163
|
]));
|
|
@@ -3176,21 +3165,21 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3176
3165
|
}
|
|
3177
3166
|
});
|
|
3178
3167
|
|
|
3179
|
-
const __default__$8 = defineComponent({
|
|
3180
|
-
name: "MFormNumber"
|
|
3181
|
-
});
|
|
3182
3168
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3183
|
-
...
|
|
3169
|
+
...{
|
|
3170
|
+
name: "MFormNumber"
|
|
3171
|
+
},
|
|
3172
|
+
__name: "Number",
|
|
3184
3173
|
props: {
|
|
3185
|
-
config:
|
|
3186
|
-
model:
|
|
3187
|
-
initValues:
|
|
3188
|
-
values:
|
|
3189
|
-
name:
|
|
3190
|
-
prop:
|
|
3174
|
+
config: {},
|
|
3175
|
+
model: {},
|
|
3176
|
+
initValues: {},
|
|
3177
|
+
values: {},
|
|
3178
|
+
name: {},
|
|
3179
|
+
prop: {},
|
|
3191
3180
|
disabled: { type: Boolean },
|
|
3192
|
-
size:
|
|
3193
|
-
lastValues:
|
|
3181
|
+
size: {},
|
|
3182
|
+
lastValues: {}
|
|
3194
3183
|
},
|
|
3195
3184
|
emits: ["change", "input"],
|
|
3196
3185
|
setup(__props, { emit }) {
|
|
@@ -3205,18 +3194,18 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3205
3194
|
mForm?.$emit("field-input", props.prop, v);
|
|
3206
3195
|
};
|
|
3207
3196
|
return (_ctx, _cache) => {
|
|
3208
|
-
return
|
|
3197
|
+
return _ctx.model ? (openBlock(), createBlock(unref(TMagicInputNumber), {
|
|
3209
3198
|
key: 0,
|
|
3210
|
-
modelValue:
|
|
3211
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3199
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3200
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3212
3201
|
clearable: "",
|
|
3213
3202
|
"controls-position": "right",
|
|
3214
|
-
size:
|
|
3215
|
-
max:
|
|
3216
|
-
min:
|
|
3217
|
-
step:
|
|
3218
|
-
placeholder:
|
|
3219
|
-
disabled:
|
|
3203
|
+
size: _ctx.size,
|
|
3204
|
+
max: _ctx.config.max,
|
|
3205
|
+
min: _ctx.config.min,
|
|
3206
|
+
step: _ctx.config.step,
|
|
3207
|
+
placeholder: _ctx.config.placeholder,
|
|
3208
|
+
disabled: _ctx.disabled,
|
|
3220
3209
|
onChange: changeHandler,
|
|
3221
3210
|
onInput: inputHandler
|
|
3222
3211
|
}, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("", true);
|
|
@@ -3224,21 +3213,21 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3224
3213
|
}
|
|
3225
3214
|
});
|
|
3226
3215
|
|
|
3227
|
-
const __default__$7 = defineComponent({
|
|
3228
|
-
name: "MFormRadioGroup"
|
|
3229
|
-
});
|
|
3230
3216
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3231
|
-
...
|
|
3217
|
+
...{
|
|
3218
|
+
name: "MFormRadioGroup"
|
|
3219
|
+
},
|
|
3220
|
+
__name: "RadioGroup",
|
|
3232
3221
|
props: {
|
|
3233
|
-
config:
|
|
3234
|
-
model:
|
|
3235
|
-
initValues:
|
|
3236
|
-
values:
|
|
3237
|
-
name:
|
|
3238
|
-
prop:
|
|
3222
|
+
config: {},
|
|
3223
|
+
model: {},
|
|
3224
|
+
initValues: {},
|
|
3225
|
+
values: {},
|
|
3226
|
+
name: {},
|
|
3227
|
+
prop: {},
|
|
3239
3228
|
disabled: { type: Boolean },
|
|
3240
|
-
size:
|
|
3241
|
-
lastValues:
|
|
3229
|
+
size: {},
|
|
3230
|
+
lastValues: {}
|
|
3242
3231
|
},
|
|
3243
3232
|
emits: ["change"],
|
|
3244
3233
|
setup(__props, { emit }) {
|
|
@@ -3248,16 +3237,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3248
3237
|
};
|
|
3249
3238
|
useAddField(props.prop);
|
|
3250
3239
|
return (_ctx, _cache) => {
|
|
3251
|
-
return
|
|
3240
|
+
return _ctx.model ? (openBlock(), createBlock(unref(TMagicRadioGroup), {
|
|
3252
3241
|
key: 0,
|
|
3253
|
-
modelValue:
|
|
3254
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3255
|
-
size:
|
|
3256
|
-
disabled:
|
|
3242
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3243
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3244
|
+
size: _ctx.size,
|
|
3245
|
+
disabled: _ctx.disabled,
|
|
3257
3246
|
onChange: changeHandler
|
|
3258
3247
|
}, {
|
|
3259
3248
|
default: withCtx(() => [
|
|
3260
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3249
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.options, (option) => {
|
|
3261
3250
|
return openBlock(), createBlock(unref(TMagicRadio), {
|
|
3262
3251
|
label: option.value,
|
|
3263
3252
|
value: option.value,
|
|
@@ -3276,18 +3265,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3276
3265
|
}
|
|
3277
3266
|
});
|
|
3278
3267
|
|
|
3279
|
-
const __default__$6 = defineComponent({
|
|
3280
|
-
name: "MFormSelectOptionGroups"
|
|
3281
|
-
});
|
|
3282
3268
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3283
|
-
...
|
|
3269
|
+
...{
|
|
3270
|
+
name: "MFormSelectOptionGroups"
|
|
3271
|
+
},
|
|
3272
|
+
__name: "SelectOptionGroups",
|
|
3284
3273
|
props: {
|
|
3285
|
-
options:
|
|
3274
|
+
options: {}
|
|
3286
3275
|
},
|
|
3287
3276
|
setup(__props) {
|
|
3288
|
-
const uiComponent = getConfig$1("components").option;
|
|
3277
|
+
const uiComponent = getConfig$1("components")?.option.component || "el-option";
|
|
3289
3278
|
return (_ctx, _cache) => {
|
|
3290
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3279
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (group, index) => {
|
|
3291
3280
|
return openBlock(), createBlock(unref(TMagicOptionGroup), {
|
|
3292
3281
|
key: index,
|
|
3293
3282
|
label: group.label,
|
|
@@ -3295,7 +3284,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3295
3284
|
}, {
|
|
3296
3285
|
default: withCtx(() => [
|
|
3297
3286
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
|
|
3298
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent)
|
|
3287
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent)), {
|
|
3299
3288
|
key: index2,
|
|
3300
3289
|
label: item.label || item.text,
|
|
3301
3290
|
value: item.value,
|
|
@@ -3310,22 +3299,22 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3310
3299
|
}
|
|
3311
3300
|
});
|
|
3312
3301
|
|
|
3313
|
-
const __default__$5 = defineComponent({
|
|
3314
|
-
name: "MFormSelectOptions"
|
|
3315
|
-
});
|
|
3316
3302
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3317
|
-
...
|
|
3303
|
+
...{
|
|
3304
|
+
name: "MFormSelectOptions"
|
|
3305
|
+
},
|
|
3306
|
+
__name: "SelectOptions",
|
|
3318
3307
|
props: {
|
|
3319
|
-
options:
|
|
3320
|
-
valueKey:
|
|
3308
|
+
options: {},
|
|
3309
|
+
valueKey: {}
|
|
3321
3310
|
},
|
|
3322
3311
|
setup(__props) {
|
|
3323
3312
|
return (_ctx, _cache) => {
|
|
3324
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3313
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
|
|
3325
3314
|
return openBlock(), createBlock(unref(TMagicOption), {
|
|
3326
3315
|
label: option.text,
|
|
3327
3316
|
value: option.value,
|
|
3328
|
-
key:
|
|
3317
|
+
key: _ctx.valueKey ? option.value[_ctx.valueKey] : option.value,
|
|
3329
3318
|
disabled: option.disabled
|
|
3330
3319
|
}, null, 8, ["label", "value", "disabled"]);
|
|
3331
3320
|
}), 128);
|
|
@@ -3334,21 +3323,21 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3334
3323
|
});
|
|
3335
3324
|
|
|
3336
3325
|
const _hoisted_1$1 = { key: 2 };
|
|
3337
|
-
const __default__$4 = defineComponent({
|
|
3338
|
-
name: "MFormSelect"
|
|
3339
|
-
});
|
|
3340
3326
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3341
|
-
...
|
|
3327
|
+
...{
|
|
3328
|
+
name: "MFormSelect"
|
|
3329
|
+
},
|
|
3330
|
+
__name: "Select",
|
|
3342
3331
|
props: {
|
|
3343
|
-
config:
|
|
3344
|
-
model:
|
|
3345
|
-
initValues:
|
|
3346
|
-
values:
|
|
3347
|
-
name:
|
|
3348
|
-
prop:
|
|
3332
|
+
config: {},
|
|
3333
|
+
model: {},
|
|
3334
|
+
initValues: {},
|
|
3335
|
+
values: {},
|
|
3336
|
+
name: {},
|
|
3337
|
+
prop: {},
|
|
3349
3338
|
disabled: { type: Boolean },
|
|
3350
|
-
size:
|
|
3351
|
-
lastValues:
|
|
3339
|
+
size: {},
|
|
3340
|
+
lastValues: {}
|
|
3352
3341
|
},
|
|
3353
3342
|
emits: ["change"],
|
|
3354
3343
|
setup(__props, { emit }) {
|
|
@@ -3440,11 +3429,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3440
3429
|
postOptions
|
|
3441
3430
|
});
|
|
3442
3431
|
}
|
|
3443
|
-
const optionsData = root
|
|
3444
|
-
const resTotal = globalThis.parseInt(
|
|
3445
|
-
totalKey.split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res),
|
|
3446
|
-
10
|
|
3447
|
-
);
|
|
3432
|
+
const optionsData = getValueByKeyPath(root, res);
|
|
3433
|
+
const resTotal = globalThis.parseInt(getValueByKeyPath(totalKey, res), 10);
|
|
3448
3434
|
if (resTotal > 0) {
|
|
3449
3435
|
total.value = resTotal;
|
|
3450
3436
|
}
|
|
@@ -3544,7 +3530,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3544
3530
|
postOptions
|
|
3545
3531
|
});
|
|
3546
3532
|
}
|
|
3547
|
-
let initData = (initRoot || root
|
|
3533
|
+
let initData = getValueByKeyPath(initRoot || root, res);
|
|
3548
3534
|
if (initData) {
|
|
3549
3535
|
if (!Array.isArray(initData)) {
|
|
3550
3536
|
initData = [initData];
|
|
@@ -3649,29 +3635,29 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3649
3635
|
const groupOptions = options;
|
|
3650
3636
|
return (_ctx, _cache) => {
|
|
3651
3637
|
const _directive_loading = resolveDirective("loading");
|
|
3652
|
-
return
|
|
3638
|
+
return _ctx.model ? withDirectives((openBlock(), createBlock(unref(TMagicSelect), {
|
|
3653
3639
|
key: 0,
|
|
3654
|
-
modelValue:
|
|
3655
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3640
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3641
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3656
3642
|
class: "m-select",
|
|
3657
3643
|
ref_key: "tMagicSelect",
|
|
3658
3644
|
ref: tMagicSelect,
|
|
3659
|
-
clearable: typeof
|
|
3660
|
-
filterable: typeof
|
|
3645
|
+
clearable: typeof _ctx.config.clearable !== "undefined" ? _ctx.config.clearable : true,
|
|
3646
|
+
filterable: typeof _ctx.config.filterable !== "undefined" ? _ctx.config.filterable : true,
|
|
3661
3647
|
"popper-class": `m-select-popper ${unref(popperClass)}`,
|
|
3662
|
-
size:
|
|
3648
|
+
size: _ctx.size,
|
|
3663
3649
|
remote: remote.value,
|
|
3664
|
-
placeholder:
|
|
3665
|
-
multiple:
|
|
3666
|
-
"value-key":
|
|
3667
|
-
"allow-create":
|
|
3668
|
-
disabled:
|
|
3669
|
-
"remote-method":
|
|
3650
|
+
placeholder: _ctx.config.placeholder,
|
|
3651
|
+
multiple: _ctx.config.multiple,
|
|
3652
|
+
"value-key": _ctx.config.valueKey || "value",
|
|
3653
|
+
"allow-create": _ctx.config.allowCreate,
|
|
3654
|
+
disabled: _ctx.disabled,
|
|
3655
|
+
"remote-method": _ctx.config.remote && remoteMethod,
|
|
3670
3656
|
onChange: changeHandler,
|
|
3671
3657
|
onVisibleChange: visibleHandler
|
|
3672
3658
|
}, {
|
|
3673
3659
|
default: withCtx(() => [
|
|
3674
|
-
|
|
3660
|
+
_ctx.config.group ? (openBlock(), createBlock(_sfc_main$6, {
|
|
3675
3661
|
key: 0,
|
|
3676
3662
|
options: unref(groupOptions)
|
|
3677
3663
|
}, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$5, {
|
|
@@ -3690,21 +3676,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3690
3676
|
}
|
|
3691
3677
|
});
|
|
3692
3678
|
|
|
3693
|
-
const __default__$3 = defineComponent({
|
|
3694
|
-
name: "MFormSwitch"
|
|
3695
|
-
});
|
|
3696
3679
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3697
|
-
...
|
|
3680
|
+
...{
|
|
3681
|
+
name: "MFormSwitch"
|
|
3682
|
+
},
|
|
3683
|
+
__name: "Switch",
|
|
3698
3684
|
props: {
|
|
3699
|
-
config:
|
|
3700
|
-
model:
|
|
3701
|
-
initValues:
|
|
3702
|
-
values:
|
|
3703
|
-
name:
|
|
3704
|
-
prop:
|
|
3685
|
+
config: {},
|
|
3686
|
+
model: {},
|
|
3687
|
+
initValues: {},
|
|
3688
|
+
values: {},
|
|
3689
|
+
name: {},
|
|
3690
|
+
prop: {},
|
|
3705
3691
|
disabled: { type: Boolean },
|
|
3706
|
-
size:
|
|
3707
|
-
lastValues:
|
|
3692
|
+
size: {},
|
|
3693
|
+
lastValues: {}
|
|
3708
3694
|
},
|
|
3709
3695
|
emits: ["change"],
|
|
3710
3696
|
setup(__props, { emit }) {
|
|
@@ -3735,12 +3721,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3735
3721
|
});
|
|
3736
3722
|
return (_ctx, _cache) => {
|
|
3737
3723
|
return openBlock(), createBlock(unref(TMagicSwitch), {
|
|
3738
|
-
modelValue:
|
|
3739
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3740
|
-
size:
|
|
3741
|
-
activeValue:
|
|
3742
|
-
inactiveValue:
|
|
3743
|
-
disabled:
|
|
3724
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3725
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3726
|
+
size: _ctx.size,
|
|
3727
|
+
activeValue: activeValue.value,
|
|
3728
|
+
inactiveValue: inactiveValue.value,
|
|
3729
|
+
disabled: _ctx.disabled,
|
|
3744
3730
|
onChange: changeHandler
|
|
3745
3731
|
}, null, 8, ["modelValue", "size", "activeValue", "inactiveValue", "disabled"]);
|
|
3746
3732
|
};
|
|
@@ -3748,21 +3734,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3748
3734
|
});
|
|
3749
3735
|
|
|
3750
3736
|
const _hoisted_1 = { key: 0 };
|
|
3751
|
-
const __default__$2 = defineComponent({
|
|
3752
|
-
name: "MFormText"
|
|
3753
|
-
});
|
|
3754
3737
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3755
|
-
...
|
|
3738
|
+
...{
|
|
3739
|
+
name: "MFormText"
|
|
3740
|
+
},
|
|
3741
|
+
__name: "Text",
|
|
3756
3742
|
props: {
|
|
3757
|
-
config:
|
|
3758
|
-
model:
|
|
3759
|
-
initValues:
|
|
3760
|
-
values:
|
|
3761
|
-
name:
|
|
3762
|
-
prop:
|
|
3743
|
+
config: {},
|
|
3744
|
+
model: {},
|
|
3745
|
+
initValues: {},
|
|
3746
|
+
values: {},
|
|
3747
|
+
name: {},
|
|
3748
|
+
prop: {},
|
|
3763
3749
|
disabled: { type: Boolean },
|
|
3764
|
-
size:
|
|
3765
|
-
lastValues:
|
|
3750
|
+
size: {},
|
|
3751
|
+
lastValues: {}
|
|
3766
3752
|
},
|
|
3767
3753
|
emits: ["change", "input"],
|
|
3768
3754
|
setup(__props, { emit }) {
|
|
@@ -3839,53 +3825,54 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3839
3825
|
};
|
|
3840
3826
|
return (_ctx, _cache) => {
|
|
3841
3827
|
return openBlock(), createBlock(unref(TMagicInput), {
|
|
3842
|
-
modelValue:
|
|
3843
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3828
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3829
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3844
3830
|
clearable: "",
|
|
3845
|
-
size:
|
|
3846
|
-
placeholder:
|
|
3847
|
-
disabled:
|
|
3831
|
+
size: _ctx.size,
|
|
3832
|
+
placeholder: _ctx.config.placeholder,
|
|
3833
|
+
disabled: _ctx.disabled,
|
|
3848
3834
|
onChange: changeHandler,
|
|
3849
3835
|
onInput: inputHandler,
|
|
3850
3836
|
onKeyup: _cache[1] || (_cache[1] = ($event) => keyUpHandler($event))
|
|
3851
3837
|
}, createSlots({ _: 2 }, [
|
|
3852
|
-
|
|
3838
|
+
_ctx.config.append ? {
|
|
3853
3839
|
name: "append",
|
|
3854
3840
|
fn: withCtx(() => [
|
|
3855
|
-
typeof
|
|
3856
|
-
typeof
|
|
3841
|
+
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.config.append), 1)) : createCommentVNode("", true),
|
|
3842
|
+
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3857
3843
|
key: 1,
|
|
3858
3844
|
style: { "color": "#409eff" },
|
|
3859
|
-
size:
|
|
3845
|
+
size: _ctx.size,
|
|
3860
3846
|
onClick: withModifiers(buttonClickHandler, ["prevent"])
|
|
3861
3847
|
}, {
|
|
3862
3848
|
default: withCtx(() => [
|
|
3863
|
-
createTextVNode(toDisplayString(
|
|
3849
|
+
createTextVNode(toDisplayString(_ctx.config.append.text), 1)
|
|
3864
3850
|
]),
|
|
3865
3851
|
_: 1
|
|
3866
3852
|
}, 8, ["size", "onClick"])) : createCommentVNode("", true)
|
|
3867
|
-
])
|
|
3853
|
+
]),
|
|
3854
|
+
key: "0"
|
|
3868
3855
|
} : void 0
|
|
3869
3856
|
]), 1032, ["modelValue", "size", "placeholder", "disabled"]);
|
|
3870
3857
|
};
|
|
3871
3858
|
}
|
|
3872
3859
|
});
|
|
3873
3860
|
|
|
3874
|
-
const __default__$1 = defineComponent({
|
|
3875
|
-
name: "MFormTextarea"
|
|
3876
|
-
});
|
|
3877
3861
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3878
|
-
...
|
|
3862
|
+
...{
|
|
3863
|
+
name: "MFormTextarea"
|
|
3864
|
+
},
|
|
3865
|
+
__name: "Textarea",
|
|
3879
3866
|
props: {
|
|
3880
|
-
config:
|
|
3881
|
-
model:
|
|
3882
|
-
initValues:
|
|
3883
|
-
values:
|
|
3884
|
-
name:
|
|
3885
|
-
prop:
|
|
3867
|
+
config: {},
|
|
3868
|
+
model: {},
|
|
3869
|
+
initValues: {},
|
|
3870
|
+
values: {},
|
|
3871
|
+
name: {},
|
|
3872
|
+
prop: {},
|
|
3886
3873
|
disabled: { type: Boolean },
|
|
3887
|
-
size:
|
|
3888
|
-
lastValues:
|
|
3874
|
+
size: {},
|
|
3875
|
+
lastValues: {}
|
|
3889
3876
|
},
|
|
3890
3877
|
emits: ["change", "input"],
|
|
3891
3878
|
setup(__props, { emit }) {
|
|
@@ -3901,13 +3888,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3901
3888
|
};
|
|
3902
3889
|
return (_ctx, _cache) => {
|
|
3903
3890
|
return openBlock(), createBlock(unref(TMagicInput), {
|
|
3904
|
-
modelValue:
|
|
3905
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3891
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3892
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3906
3893
|
type: "textarea",
|
|
3907
|
-
size:
|
|
3894
|
+
size: _ctx.size,
|
|
3908
3895
|
clearable: "",
|
|
3909
|
-
placeholder:
|
|
3910
|
-
disabled:
|
|
3896
|
+
placeholder: _ctx.config.placeholder,
|
|
3897
|
+
disabled: _ctx.disabled,
|
|
3911
3898
|
onChange: changeHandler,
|
|
3912
3899
|
onInput: inputHandler
|
|
3913
3900
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled"]);
|
|
@@ -3915,21 +3902,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3915
3902
|
}
|
|
3916
3903
|
});
|
|
3917
3904
|
|
|
3918
|
-
const __default__ = defineComponent({
|
|
3919
|
-
name: "MFormTime"
|
|
3920
|
-
});
|
|
3921
3905
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3922
|
-
...
|
|
3906
|
+
...{
|
|
3907
|
+
name: "MFormTime"
|
|
3908
|
+
},
|
|
3909
|
+
__name: "Time",
|
|
3923
3910
|
props: {
|
|
3924
|
-
config:
|
|
3925
|
-
model:
|
|
3926
|
-
initValues:
|
|
3927
|
-
values:
|
|
3928
|
-
name:
|
|
3929
|
-
prop:
|
|
3911
|
+
config: {},
|
|
3912
|
+
model: {},
|
|
3913
|
+
initValues: {},
|
|
3914
|
+
values: {},
|
|
3915
|
+
name: {},
|
|
3916
|
+
prop: {},
|
|
3930
3917
|
disabled: { type: Boolean },
|
|
3931
|
-
size:
|
|
3932
|
-
lastValues:
|
|
3918
|
+
size: {},
|
|
3919
|
+
lastValues: {}
|
|
3933
3920
|
},
|
|
3934
3921
|
emits: ["change"],
|
|
3935
3922
|
setup(__props, { emit }) {
|
|
@@ -3940,13 +3927,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3940
3927
|
};
|
|
3941
3928
|
return (_ctx, _cache) => {
|
|
3942
3929
|
return openBlock(), createBlock(unref(TMagicTimePicker), {
|
|
3943
|
-
modelValue:
|
|
3944
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3945
|
-
"value-format":
|
|
3946
|
-
format:
|
|
3947
|
-
size:
|
|
3948
|
-
placeholder:
|
|
3949
|
-
disabled:
|
|
3930
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3931
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3932
|
+
"value-format": _ctx.config.valueFormat || "HH:mm:ss",
|
|
3933
|
+
format: _ctx.config.format || "HH:mm:ss",
|
|
3934
|
+
size: _ctx.size,
|
|
3935
|
+
placeholder: _ctx.config.placeholder,
|
|
3936
|
+
disabled: _ctx.disabled,
|
|
3950
3937
|
onChange: changeHandler
|
|
3951
3938
|
}, null, 8, ["modelValue", "value-format", "format", "size", "placeholder", "disabled"]);
|
|
3952
3939
|
};
|
|
@@ -3956,41 +3943,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3956
3943
|
const index$1 = '';
|
|
3957
3944
|
|
|
3958
3945
|
const defaultInstallOpt = {};
|
|
3959
|
-
const install = (app, opt) => {
|
|
3960
|
-
const option = Object.assign(defaultInstallOpt, opt);
|
|
3961
|
-
app.config.globalProperties.$MAGIC_FORM = option;
|
|
3962
|
-
setConfig(option);
|
|
3963
|
-
app.component("m-form", _sfc_main$b);
|
|
3964
|
-
app.component("m-form-dialog", _sfc_main$a);
|
|
3965
|
-
app.component("m-form-container", _sfc_main$v);
|
|
3966
|
-
app.component("m-form-fieldset", _sfc_main$u);
|
|
3967
|
-
app.component("m-form-group-list", _sfc_main$s);
|
|
3968
|
-
app.component("m-form-panel", _sfc_main$r);
|
|
3969
|
-
app.component("m-form-row", _sfc_main$p);
|
|
3970
|
-
app.component("m-form-step", _sfc_main$o);
|
|
3971
|
-
app.component("m-form-table", _sfc_main$n);
|
|
3972
|
-
app.component("m-form-tab", _sfc_main$m);
|
|
3973
|
-
app.component("m-fields-text", _sfc_main$2);
|
|
3974
|
-
app.component("m-fields-number", _sfc_main$8);
|
|
3975
|
-
app.component("m-fields-textarea", _sfc_main$1);
|
|
3976
|
-
app.component("m-fields-hidden", _sfc_main$c);
|
|
3977
|
-
app.component("m-fields-date", _sfc_main$h);
|
|
3978
|
-
app.component("m-fields-datetime", _sfc_main$f);
|
|
3979
|
-
app.component("m-fields-daterange", _sfc_main$g);
|
|
3980
|
-
app.component("m-fields-time", _sfc_main);
|
|
3981
|
-
app.component("m-fields-checkbox", _sfc_main$k);
|
|
3982
|
-
app.component("m-fields-switch", _sfc_main$3);
|
|
3983
|
-
app.component("m-fields-color-picker", _sfc_main$i);
|
|
3984
|
-
app.component("m-fields-checkbox-group", _sfc_main$j);
|
|
3985
|
-
app.component("m-fields-radio-group", _sfc_main$7);
|
|
3986
|
-
app.component("m-fields-display", _sfc_main$e);
|
|
3987
|
-
app.component("m-fields-link", _sfc_main$9);
|
|
3988
|
-
app.component("m-fields-select", _sfc_main$4);
|
|
3989
|
-
app.component("m-fields-cascader", _sfc_main$l);
|
|
3990
|
-
app.component("m-fields-dynamic-field", _sfc_main$d);
|
|
3991
|
-
};
|
|
3992
3946
|
const index = {
|
|
3993
|
-
install
|
|
3947
|
+
install(app, opt = {}) {
|
|
3948
|
+
const option = Object.assign(defaultInstallOpt, opt);
|
|
3949
|
+
app.config.globalProperties.$MAGIC_FORM = option;
|
|
3950
|
+
setConfig(option);
|
|
3951
|
+
app.component("m-form", _sfc_main$b);
|
|
3952
|
+
app.component("m-form-dialog", _sfc_main$a);
|
|
3953
|
+
app.component("m-form-container", _sfc_main$v);
|
|
3954
|
+
app.component("m-form-fieldset", _sfc_main$u);
|
|
3955
|
+
app.component("m-form-group-list", _sfc_main$s);
|
|
3956
|
+
app.component("m-form-panel", _sfc_main$r);
|
|
3957
|
+
app.component("m-form-row", _sfc_main$p);
|
|
3958
|
+
app.component("m-form-step", _sfc_main$o);
|
|
3959
|
+
app.component("m-form-table", _sfc_main$n);
|
|
3960
|
+
app.component("m-form-tab", _sfc_main$m);
|
|
3961
|
+
app.component("m-fields-text", _sfc_main$2);
|
|
3962
|
+
app.component("m-fields-number", _sfc_main$8);
|
|
3963
|
+
app.component("m-fields-textarea", _sfc_main$1);
|
|
3964
|
+
app.component("m-fields-hidden", _sfc_main$c);
|
|
3965
|
+
app.component("m-fields-date", _sfc_main$h);
|
|
3966
|
+
app.component("m-fields-datetime", _sfc_main$f);
|
|
3967
|
+
app.component("m-fields-daterange", _sfc_main$g);
|
|
3968
|
+
app.component("m-fields-time", _sfc_main);
|
|
3969
|
+
app.component("m-fields-checkbox", _sfc_main$k);
|
|
3970
|
+
app.component("m-fields-switch", _sfc_main$3);
|
|
3971
|
+
app.component("m-fields-color-picker", _sfc_main$i);
|
|
3972
|
+
app.component("m-fields-checkbox-group", _sfc_main$j);
|
|
3973
|
+
app.component("m-fields-radio-group", _sfc_main$7);
|
|
3974
|
+
app.component("m-fields-display", _sfc_main$e);
|
|
3975
|
+
app.component("m-fields-link", _sfc_main$9);
|
|
3976
|
+
app.component("m-fields-select", _sfc_main$4);
|
|
3977
|
+
app.component("m-fields-cascader", _sfc_main$l);
|
|
3978
|
+
app.component("m-fields-dynamic-field", _sfc_main$d);
|
|
3979
|
+
}
|
|
3994
3980
|
};
|
|
3995
3981
|
|
|
3996
3982
|
export { _sfc_main$l as MCascader, _sfc_main$k as MCheckbox, _sfc_main$j as MCheckboxGroup, _sfc_main$i as MColorPicker, _sfc_main$v as MContainer, _sfc_main$h as MDate, _sfc_main$f as MDateTime, _sfc_main$g as MDaterange, _sfc_main$e as MDisplay, _sfc_main$d as MDynamicField, _sfc_main$u as MFieldset, _sfc_main$b as MForm, _sfc_main$a as MFormDialog, _sfc_main$s as MGroupList, _sfc_main$c as MHidden, _sfc_main$9 as MLink, _sfc_main$8 as MNumber, _sfc_main$r as MPanel, _sfc_main$7 as MRadioGroup, _sfc_main$p as MRow, _sfc_main$4 as MSelect, _sfc_main$3 as MSwitch, _sfc_main$n as MTable, _sfc_main$m as MTabs, _sfc_main$2 as MText, _sfc_main$1 as MTextarea, _sfc_main as MTime, createValues, index as default, display, filterFunction, getRules, initValue, useAddField };
|