@tmagic/form 1.3.0-alpha.0 → 1.3.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tmagic-form.js +913 -917
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +911 -915
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +10 -11
- package/src/Form.vue +14 -2
- 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 +6 -2
- package/src/containers/GroupListItem.vue +7 -7
- 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 +6 -2
- 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 +26 -18
- 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/src/schema.ts +4 -3
- package/types/Form.vue.d.ts +9 -4
- package/types/FormDialog.vue.d.ts +83 -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/types/schema.d.ts +4 -3
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,34 +735,29 @@ 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"],
|
|
759
757
|
setup(__props, { emit }) {
|
|
760
758
|
const props = __props;
|
|
761
759
|
const mForm = inject("mForm");
|
|
762
|
-
const expand = ref(
|
|
763
|
-
watchEffect(() => {
|
|
764
|
-
expand.value = !props.index;
|
|
765
|
-
});
|
|
760
|
+
const expand = ref(props.config.expandAll || !props.index);
|
|
766
761
|
const rowConfig = computed(() => ({
|
|
767
762
|
type: "row",
|
|
768
763
|
span: props.config.span || 24,
|
|
@@ -806,12 +801,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
806
801
|
createElementVNode("div", null, [
|
|
807
802
|
createVNode(unref(TMagicButton), {
|
|
808
803
|
text: "",
|
|
809
|
-
disabled:
|
|
804
|
+
disabled: _ctx.disabled,
|
|
810
805
|
icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
|
|
811
806
|
onClick: expandHandler
|
|
812
807
|
}, {
|
|
813
808
|
default: withCtx(() => [
|
|
814
|
-
createTextVNode(toDisplayString(
|
|
809
|
+
createTextVNode(toDisplayString(title.value), 1)
|
|
815
810
|
]),
|
|
816
811
|
_: 1
|
|
817
812
|
}, 8, ["disabled", "icon"]),
|
|
@@ -819,20 +814,20 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
819
814
|
style: { "color": "#f56c6c" },
|
|
820
815
|
text: "",
|
|
821
816
|
icon: unref(Delete),
|
|
822
|
-
disabled:
|
|
817
|
+
disabled: _ctx.disabled,
|
|
823
818
|
onClick: removeHandler
|
|
824
819
|
}, null, 8, ["icon", "disabled"]), [
|
|
825
|
-
[vShow, showDelete(parseInt(String(
|
|
820
|
+
[vShow, showDelete(parseInt(String(_ctx.index)))]
|
|
826
821
|
]),
|
|
827
822
|
movable() ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
828
823
|
withDirectives(createVNode(unref(TMagicButton), {
|
|
829
824
|
text: "",
|
|
830
|
-
disabled:
|
|
825
|
+
disabled: _ctx.disabled,
|
|
831
826
|
size: "small",
|
|
832
827
|
onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
|
|
833
828
|
}, {
|
|
834
829
|
default: withCtx(() => [
|
|
835
|
-
|
|
830
|
+
createTextVNode("上移"),
|
|
836
831
|
createVNode(unref(TMagicIcon), null, {
|
|
837
832
|
default: withCtx(() => [
|
|
838
833
|
createVNode(unref(CaretTop))
|
|
@@ -842,16 +837,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
842
837
|
]),
|
|
843
838
|
_: 1
|
|
844
839
|
}, 8, ["disabled"]), [
|
|
845
|
-
[vShow,
|
|
840
|
+
[vShow, _ctx.index !== 0]
|
|
846
841
|
]),
|
|
847
842
|
withDirectives(createVNode(unref(TMagicButton), {
|
|
848
|
-
disabled:
|
|
843
|
+
disabled: _ctx.disabled,
|
|
849
844
|
text: "",
|
|
850
845
|
size: "small",
|
|
851
846
|
onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
|
|
852
847
|
}, {
|
|
853
848
|
default: withCtx(() => [
|
|
854
|
-
|
|
849
|
+
createTextVNode("下移"),
|
|
855
850
|
createVNode(unref(TMagicIcon), null, {
|
|
856
851
|
default: withCtx(() => [
|
|
857
852
|
createVNode(unref(CaretBottom))
|
|
@@ -861,25 +856,25 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
861
856
|
]),
|
|
862
857
|
_: 1
|
|
863
858
|
}, 8, ["disabled"]), [
|
|
864
|
-
[vShow,
|
|
859
|
+
[vShow, _ctx.index !== length.value - 1]
|
|
865
860
|
])
|
|
866
861
|
], 64)) : createCommentVNode("", true),
|
|
867
|
-
|
|
862
|
+
itemExtra.value ? (openBlock(), createElementBlock("span", {
|
|
868
863
|
key: 1,
|
|
869
|
-
innerHTML:
|
|
864
|
+
innerHTML: itemExtra.value,
|
|
870
865
|
class: "m-form-tip"
|
|
871
|
-
}, null, 8,
|
|
866
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true)
|
|
872
867
|
]),
|
|
873
868
|
expand.value ? (openBlock(), createBlock(_sfc_main$v, {
|
|
874
869
|
key: 0,
|
|
875
|
-
config:
|
|
876
|
-
model:
|
|
877
|
-
lastValues:
|
|
878
|
-
"is-compare":
|
|
879
|
-
labelWidth:
|
|
880
|
-
prop: `${
|
|
881
|
-
size:
|
|
882
|
-
disabled:
|
|
870
|
+
config: rowConfig.value,
|
|
871
|
+
model: _ctx.model,
|
|
872
|
+
lastValues: _ctx.lastValues,
|
|
873
|
+
"is-compare": _ctx.isCompare,
|
|
874
|
+
labelWidth: _ctx.labelWidth,
|
|
875
|
+
prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${String(_ctx.index)}`,
|
|
876
|
+
size: _ctx.size,
|
|
877
|
+
disabled: _ctx.disabled,
|
|
883
878
|
onChange: changeHandler,
|
|
884
879
|
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
885
880
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("", true)
|
|
@@ -889,31 +884,29 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
889
884
|
});
|
|
890
885
|
|
|
891
886
|
const _hoisted_1$8 = { class: "m-fields-group-list" };
|
|
892
|
-
const _hoisted_2$
|
|
893
|
-
const _hoisted_3$
|
|
887
|
+
const _hoisted_2$3 = ["innerHTML"];
|
|
888
|
+
const _hoisted_3$2 = {
|
|
894
889
|
key: 1,
|
|
895
890
|
class: "el-table__empty-block"
|
|
896
891
|
};
|
|
897
|
-
const _hoisted_4$
|
|
898
|
-
const _hoisted_5$
|
|
899
|
-
_hoisted_4$
|
|
892
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "el-table__empty-text" }, "暂无数据", -1);
|
|
893
|
+
const _hoisted_5$1 = [
|
|
894
|
+
_hoisted_4$2
|
|
900
895
|
];
|
|
901
|
-
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("添加组");
|
|
902
|
-
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("切换为表格");
|
|
903
|
-
const __default__$s = defineComponent({
|
|
904
|
-
name: "MFormGroupList"
|
|
905
|
-
});
|
|
906
896
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
907
|
-
...
|
|
897
|
+
...{
|
|
898
|
+
name: "MFormGroupList"
|
|
899
|
+
},
|
|
900
|
+
__name: "GroupList",
|
|
908
901
|
props: {
|
|
909
|
-
model:
|
|
910
|
-
lastValues:
|
|
902
|
+
model: {},
|
|
903
|
+
lastValues: {},
|
|
911
904
|
isCompare: { type: Boolean },
|
|
912
|
-
config:
|
|
913
|
-
name:
|
|
914
|
-
labelWidth:
|
|
915
|
-
prop:
|
|
916
|
-
size:
|
|
905
|
+
config: {},
|
|
906
|
+
name: {},
|
|
907
|
+
labelWidth: {},
|
|
908
|
+
prop: {},
|
|
909
|
+
size: {},
|
|
917
910
|
disabled: { type: Boolean }
|
|
918
911
|
},
|
|
919
912
|
emits: ["change", "addDiffCount"],
|
|
@@ -984,49 +977,49 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
984
977
|
const getLastValues = (item, index) => item?.[index] || {};
|
|
985
978
|
return (_ctx, _cache) => {
|
|
986
979
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
987
|
-
|
|
980
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("div", {
|
|
988
981
|
key: 0,
|
|
989
|
-
innerHTML:
|
|
982
|
+
innerHTML: _ctx.config.extra,
|
|
990
983
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
991
|
-
}, null, 8, _hoisted_2$
|
|
992
|
-
!
|
|
984
|
+
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
985
|
+
!_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
986
|
return openBlock(), createBlock(_sfc_main$t, {
|
|
994
987
|
key: index,
|
|
995
988
|
model: item,
|
|
996
|
-
lastValues: getLastValues(
|
|
997
|
-
"is-compare":
|
|
998
|
-
config:
|
|
999
|
-
prop:
|
|
989
|
+
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
990
|
+
"is-compare": _ctx.isCompare,
|
|
991
|
+
config: _ctx.config,
|
|
992
|
+
prop: _ctx.prop,
|
|
1000
993
|
index,
|
|
1001
|
-
"label-width":
|
|
1002
|
-
size:
|
|
1003
|
-
disabled:
|
|
1004
|
-
"group-model":
|
|
994
|
+
"label-width": _ctx.labelWidth,
|
|
995
|
+
size: _ctx.size,
|
|
996
|
+
disabled: _ctx.disabled,
|
|
997
|
+
"group-model": _ctx.model[_ctx.name],
|
|
1005
998
|
onRemoveItem: removeHandler,
|
|
1006
999
|
onSwapItem: swapHandler,
|
|
1007
1000
|
onChange: changeHandler,
|
|
1008
1001
|
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
1009
1002
|
}, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
|
|
1010
1003
|
}), 128)),
|
|
1011
|
-
|
|
1004
|
+
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1012
1005
|
key: 3,
|
|
1013
1006
|
onClick: addHandler,
|
|
1014
1007
|
size: "small",
|
|
1015
|
-
disabled:
|
|
1008
|
+
disabled: _ctx.disabled
|
|
1016
1009
|
}, {
|
|
1017
1010
|
default: withCtx(() => [
|
|
1018
|
-
|
|
1011
|
+
createTextVNode("新增")
|
|
1019
1012
|
]),
|
|
1020
1013
|
_: 1
|
|
1021
1014
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1022
|
-
|
|
1015
|
+
_ctx.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1023
1016
|
key: 4,
|
|
1024
1017
|
icon: unref(Grid),
|
|
1025
1018
|
size: "small",
|
|
1026
1019
|
onClick: toggleMode
|
|
1027
1020
|
}, {
|
|
1028
1021
|
default: withCtx(() => [
|
|
1029
|
-
|
|
1022
|
+
createTextVNode("切换为表格")
|
|
1030
1023
|
]),
|
|
1031
1024
|
_: 1
|
|
1032
1025
|
}, 8, ["icon"])) : createCommentVNode("", true)
|
|
@@ -1036,27 +1029,27 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1036
1029
|
});
|
|
1037
1030
|
|
|
1038
1031
|
const _hoisted_1$7 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1039
|
-
const _hoisted_2$
|
|
1040
|
-
const _hoisted_3$
|
|
1032
|
+
const _hoisted_2$2 = ["innerHTML"];
|
|
1033
|
+
const _hoisted_3$1 = {
|
|
1041
1034
|
key: 0,
|
|
1042
1035
|
style: { "display": "flex" }
|
|
1043
1036
|
};
|
|
1044
|
-
const _hoisted_4$
|
|
1045
|
-
const _hoisted_5
|
|
1046
|
-
const __default__$r = defineComponent({
|
|
1047
|
-
name: "MFormPanel"
|
|
1048
|
-
});
|
|
1037
|
+
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1038
|
+
const _hoisted_5 = ["src"];
|
|
1049
1039
|
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1050
|
-
...
|
|
1040
|
+
...{
|
|
1041
|
+
name: "MFormPanel"
|
|
1042
|
+
},
|
|
1043
|
+
__name: "Panel",
|
|
1051
1044
|
props: {
|
|
1052
|
-
model:
|
|
1053
|
-
lastValues:
|
|
1045
|
+
model: {},
|
|
1046
|
+
lastValues: {},
|
|
1054
1047
|
isCompare: { type: Boolean },
|
|
1055
|
-
config:
|
|
1056
|
-
name:
|
|
1057
|
-
labelWidth:
|
|
1058
|
-
prop:
|
|
1059
|
-
size:
|
|
1048
|
+
config: {},
|
|
1049
|
+
name: {},
|
|
1050
|
+
labelWidth: {},
|
|
1051
|
+
prop: {},
|
|
1052
|
+
size: {},
|
|
1060
1053
|
disabled: { type: Boolean }
|
|
1061
1054
|
},
|
|
1062
1055
|
emits: ["change", "addDiffCount"],
|
|
@@ -1069,7 +1062,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1069
1062
|
const changeHandler = () => emit("change", props.model);
|
|
1070
1063
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
1071
1064
|
return (_ctx, _cache) => {
|
|
1072
|
-
return
|
|
1065
|
+
return items.value && items.value.length ? (openBlock(), createBlock(unref(TMagicCard), {
|
|
1073
1066
|
key: 0,
|
|
1074
1067
|
class: "box-card m-form-panel",
|
|
1075
1068
|
"body-style": { display: expand.value ? "block" : "none" }
|
|
@@ -1082,32 +1075,32 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1082
1075
|
icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
|
|
1083
1076
|
onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value)
|
|
1084
1077
|
}, null, 8, ["icon"]),
|
|
1085
|
-
|
|
1078
|
+
_ctx.config && _ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
1086
1079
|
key: 0,
|
|
1087
|
-
innerHTML:
|
|
1080
|
+
innerHTML: _ctx.config.extra,
|
|
1088
1081
|
class: "m-form-tip"
|
|
1089
|
-
}, null, 8, _hoisted_2$
|
|
1082
|
+
}, null, 8, _hoisted_2$2)) : createCommentVNode("", true),
|
|
1090
1083
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1091
|
-
createTextVNode(toDisplayString(filter(
|
|
1084
|
+
createTextVNode(toDisplayString(filter(_ctx.config.title)), 1)
|
|
1092
1085
|
])
|
|
1093
1086
|
])
|
|
1094
1087
|
]),
|
|
1095
1088
|
default: withCtx(() => [
|
|
1096
1089
|
createElementVNode("div", null, [
|
|
1097
1090
|
renderSlot(_ctx.$slots, "default"),
|
|
1098
|
-
|
|
1099
|
-
createElementVNode("div", _hoisted_4$
|
|
1100
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1091
|
+
_ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1092
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
1093
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
1101
1094
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
1102
1095
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1103
1096
|
config: item,
|
|
1104
|
-
model:
|
|
1105
|
-
lastValues:
|
|
1106
|
-
"is-compare":
|
|
1107
|
-
prop:
|
|
1108
|
-
size:
|
|
1109
|
-
disabled:
|
|
1110
|
-
"label-width":
|
|
1097
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1098
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1099
|
+
"is-compare": _ctx.isCompare,
|
|
1100
|
+
prop: _ctx.prop,
|
|
1101
|
+
size: _ctx.size,
|
|
1102
|
+
disabled: _ctx.disabled,
|
|
1103
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1111
1104
|
onChange: changeHandler,
|
|
1112
1105
|
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1113
1106
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
|
|
@@ -1115,19 +1108,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1115
1108
|
]),
|
|
1116
1109
|
createElementVNode("img", {
|
|
1117
1110
|
class: "m-form-schematic",
|
|
1118
|
-
src:
|
|
1119
|
-
}, null, 8, _hoisted_5
|
|
1120
|
-
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(
|
|
1111
|
+
src: _ctx.config.schematic
|
|
1112
|
+
}, null, 8, _hoisted_5)
|
|
1113
|
+
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
|
|
1121
1114
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
1122
1115
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1123
1116
|
config: item,
|
|
1124
|
-
model:
|
|
1125
|
-
lastValues:
|
|
1126
|
-
"is-compare":
|
|
1127
|
-
prop:
|
|
1128
|
-
size:
|
|
1129
|
-
disabled:
|
|
1130
|
-
"label-width":
|
|
1117
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1118
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1119
|
+
"is-compare": _ctx.isCompare,
|
|
1120
|
+
prop: _ctx.prop,
|
|
1121
|
+
size: _ctx.size,
|
|
1122
|
+
disabled: _ctx.disabled,
|
|
1123
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1131
1124
|
onChange: changeHandler,
|
|
1132
1125
|
onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
|
|
1133
1126
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
|
|
@@ -1140,21 +1133,21 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1140
1133
|
}
|
|
1141
1134
|
});
|
|
1142
1135
|
|
|
1143
|
-
const __default__$q = defineComponent({
|
|
1144
|
-
name: "MFormCol"
|
|
1145
|
-
});
|
|
1146
1136
|
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1147
|
-
...
|
|
1137
|
+
...{
|
|
1138
|
+
name: "MFormCol"
|
|
1139
|
+
},
|
|
1140
|
+
__name: "Col",
|
|
1148
1141
|
props: {
|
|
1149
|
-
model:
|
|
1150
|
-
lastValues:
|
|
1142
|
+
model: {},
|
|
1143
|
+
lastValues: {},
|
|
1151
1144
|
isCompare: { type: Boolean },
|
|
1152
|
-
config:
|
|
1153
|
-
labelWidth:
|
|
1145
|
+
config: {},
|
|
1146
|
+
labelWidth: {},
|
|
1154
1147
|
expandMore: { type: Boolean },
|
|
1155
|
-
span:
|
|
1156
|
-
size:
|
|
1157
|
-
prop:
|
|
1148
|
+
span: {},
|
|
1149
|
+
size: {},
|
|
1150
|
+
prop: {},
|
|
1158
1151
|
disabled: { type: Boolean }
|
|
1159
1152
|
},
|
|
1160
1153
|
emits: ["change", "addDiffCount"],
|
|
@@ -1165,44 +1158,44 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1165
1158
|
const changeHandler = () => emit("change", props.model);
|
|
1166
1159
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
1167
1160
|
return (_ctx, _cache) => {
|
|
1168
|
-
return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span:
|
|
1161
|
+
return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: _ctx.span }, {
|
|
1169
1162
|
default: withCtx(() => [
|
|
1170
1163
|
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:
|
|
1164
|
+
model: _ctx.model,
|
|
1165
|
+
lastValues: _ctx.lastValues,
|
|
1166
|
+
"is-compare": _ctx.isCompare,
|
|
1167
|
+
config: _ctx.config,
|
|
1168
|
+
prop: _ctx.prop,
|
|
1169
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1170
|
+
"expand-more": _ctx.expandMore,
|
|
1171
|
+
size: _ctx.size,
|
|
1172
|
+
disabled: _ctx.disabled,
|
|
1180
1173
|
onChange: changeHandler,
|
|
1181
1174
|
onAddDiffCount
|
|
1182
1175
|
}, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "label-width", "expand-more", "size", "disabled"])
|
|
1183
1176
|
]),
|
|
1184
1177
|
_: 1
|
|
1185
1178
|
}, 8, ["span"])), [
|
|
1186
|
-
[vShow,
|
|
1179
|
+
[vShow, display$1.value && _ctx.config.type !== "hidden"]
|
|
1187
1180
|
]);
|
|
1188
1181
|
};
|
|
1189
1182
|
}
|
|
1190
1183
|
});
|
|
1191
1184
|
|
|
1192
|
-
const __default__$p = defineComponent({
|
|
1193
|
-
name: "MFormRow"
|
|
1194
|
-
});
|
|
1195
1185
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1196
|
-
...
|
|
1186
|
+
...{
|
|
1187
|
+
name: "MFormRow"
|
|
1188
|
+
},
|
|
1189
|
+
__name: "Row",
|
|
1197
1190
|
props: {
|
|
1198
|
-
model:
|
|
1199
|
-
lastValues:
|
|
1191
|
+
model: {},
|
|
1192
|
+
lastValues: {},
|
|
1200
1193
|
isCompare: { type: Boolean },
|
|
1201
|
-
config:
|
|
1202
|
-
name:
|
|
1203
|
-
labelWidth:
|
|
1204
|
-
prop:
|
|
1205
|
-
size:
|
|
1194
|
+
config: {},
|
|
1195
|
+
name: {},
|
|
1196
|
+
labelWidth: {},
|
|
1197
|
+
prop: {},
|
|
1198
|
+
size: {},
|
|
1206
1199
|
expandMore: { type: Boolean },
|
|
1207
1200
|
disabled: { type: Boolean }
|
|
1208
1201
|
},
|
|
@@ -1215,19 +1208,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1215
1208
|
return (_ctx, _cache) => {
|
|
1216
1209
|
return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
|
|
1217
1210
|
default: withCtx(() => [
|
|
1218
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1211
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
|
|
1219
1212
|
return openBlock(), createBlock(_sfc_main$q, {
|
|
1220
1213
|
key: col[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1221
|
-
span: col.span ||
|
|
1214
|
+
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1222
1215
|
config: col,
|
|
1223
|
-
labelWidth:
|
|
1224
|
-
expandMore:
|
|
1225
|
-
model:
|
|
1226
|
-
lastValues:
|
|
1227
|
-
"is-compare":
|
|
1228
|
-
prop:
|
|
1229
|
-
size:
|
|
1230
|
-
disabled:
|
|
1216
|
+
labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1217
|
+
expandMore: _ctx.expandMore,
|
|
1218
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1219
|
+
lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
|
|
1220
|
+
"is-compare": _ctx.isCompare,
|
|
1221
|
+
prop: _ctx.prop,
|
|
1222
|
+
size: _ctx.size,
|
|
1223
|
+
disabled: _ctx.disabled,
|
|
1231
1224
|
onChange: changeHandler,
|
|
1232
1225
|
onAddDiffCount
|
|
1233
1226
|
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "lastValues", "is-compare", "prop", "size", "disabled"]);
|
|
@@ -1239,19 +1232,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1239
1232
|
}
|
|
1240
1233
|
});
|
|
1241
1234
|
|
|
1242
|
-
const __default__$o = defineComponent({
|
|
1243
|
-
name: "MFormStep"
|
|
1244
|
-
});
|
|
1245
1235
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
1246
|
-
...
|
|
1236
|
+
...{
|
|
1237
|
+
name: "MFormStep"
|
|
1238
|
+
},
|
|
1239
|
+
__name: "Step",
|
|
1247
1240
|
props: {
|
|
1248
|
-
model:
|
|
1249
|
-
lastValues:
|
|
1241
|
+
model: {},
|
|
1242
|
+
lastValues: {},
|
|
1250
1243
|
isCompare: { type: Boolean },
|
|
1251
|
-
config:
|
|
1244
|
+
config: {},
|
|
1252
1245
|
stepActive: { default: 1 },
|
|
1253
|
-
labelWidth:
|
|
1254
|
-
size:
|
|
1246
|
+
labelWidth: {},
|
|
1247
|
+
size: {},
|
|
1255
1248
|
disabled: { type: Boolean }
|
|
1256
1249
|
},
|
|
1257
1250
|
emits: ["change", "addDiffCount"],
|
|
@@ -1275,10 +1268,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1275
1268
|
createVNode(unref(TMagicSteps), {
|
|
1276
1269
|
active: active.value,
|
|
1277
1270
|
"align-center": "",
|
|
1278
|
-
space:
|
|
1271
|
+
space: _ctx.config.space
|
|
1279
1272
|
}, {
|
|
1280
1273
|
default: withCtx(() => [
|
|
1281
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1274
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
|
|
1282
1275
|
return openBlock(), createBlock(unref(TMagicStep), {
|
|
1283
1276
|
key: item.__key,
|
|
1284
1277
|
title: item.title,
|
|
@@ -1289,20 +1282,20 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1289
1282
|
]),
|
|
1290
1283
|
_: 1
|
|
1291
1284
|
}, 8, ["active", "space"]),
|
|
1292
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1285
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (step, index) => {
|
|
1293
1286
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1294
1287
|
(openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
|
|
1295
1288
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1296
1289
|
item ? withDirectives((openBlock(), createBlock(_sfc_main$v, {
|
|
1297
1290
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
1298
1291
|
config: item,
|
|
1299
|
-
model: step.name ?
|
|
1300
|
-
lastValues: step.name ?
|
|
1301
|
-
"is-compare":
|
|
1292
|
+
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
1293
|
+
lastValues: step.name ? _ctx.lastValues[step.name] : _ctx.lastValues,
|
|
1294
|
+
"is-compare": _ctx.isCompare,
|
|
1302
1295
|
prop: `${step.name}`,
|
|
1303
|
-
size:
|
|
1304
|
-
disabled:
|
|
1305
|
-
"label-width":
|
|
1296
|
+
size: _ctx.size,
|
|
1297
|
+
disabled: _ctx.disabled,
|
|
1298
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1306
1299
|
onChange: changeHandler,
|
|
1307
1300
|
onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
|
|
1308
1301
|
}, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"])), [
|
|
@@ -1318,42 +1311,36 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1318
1311
|
});
|
|
1319
1312
|
|
|
1320
1313
|
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 = {
|
|
1314
|
+
const _hoisted_2$1 = { class: "el-form-item__content" };
|
|
1315
|
+
const _hoisted_3 = ["innerHTML"];
|
|
1316
|
+
const _hoisted_4 = {
|
|
1330
1317
|
key: 1,
|
|
1331
1318
|
class: "bottom",
|
|
1332
1319
|
style: { "text-align": "right" }
|
|
1333
1320
|
};
|
|
1334
|
-
const __default__$n = defineComponent({
|
|
1335
|
-
name: "MFormTable"
|
|
1336
|
-
});
|
|
1337
1321
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1338
|
-
...
|
|
1322
|
+
...{
|
|
1323
|
+
name: "MFormTable"
|
|
1324
|
+
},
|
|
1325
|
+
__name: "Table",
|
|
1339
1326
|
props: {
|
|
1340
|
-
model:
|
|
1327
|
+
model: {},
|
|
1341
1328
|
lastValues: { default: () => ({}) },
|
|
1342
1329
|
isCompare: { type: Boolean, default: false },
|
|
1343
|
-
config:
|
|
1344
|
-
name:
|
|
1330
|
+
config: {},
|
|
1331
|
+
name: {},
|
|
1345
1332
|
prop: { default: "" },
|
|
1346
|
-
labelWidth:
|
|
1333
|
+
labelWidth: {},
|
|
1347
1334
|
sort: { type: Boolean },
|
|
1348
1335
|
disabled: { type: Boolean },
|
|
1349
1336
|
sortKey: { default: "" },
|
|
1350
|
-
text:
|
|
1351
|
-
size:
|
|
1337
|
+
text: {},
|
|
1338
|
+
size: {},
|
|
1352
1339
|
enableToggleMode: { type: Boolean, default: true },
|
|
1353
1340
|
showIndex: { type: Boolean, default: true }
|
|
1354
1341
|
},
|
|
1355
1342
|
emits: ["change", "select", "addDiffCount"],
|
|
1356
|
-
setup(__props, { expose, emit }) {
|
|
1343
|
+
setup(__props, { expose: __expose, emit }) {
|
|
1357
1344
|
const props = __props;
|
|
1358
1345
|
let timer = null;
|
|
1359
1346
|
const mForm = inject("mForm");
|
|
@@ -1673,43 +1660,43 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1673
1660
|
return `${prop.value}${prop.value ? "." : ""}${index + 1 + pagecontext.value * pagesize.value - 1}`;
|
|
1674
1661
|
};
|
|
1675
1662
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
1676
|
-
|
|
1663
|
+
__expose({
|
|
1677
1664
|
toggleRowSelection
|
|
1678
1665
|
});
|
|
1679
1666
|
return (_ctx, _cache) => {
|
|
1680
1667
|
return openBlock(), createElementBlock("div", {
|
|
1681
1668
|
ref_key: "mTable",
|
|
1682
1669
|
ref: mTable,
|
|
1683
|
-
class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra":
|
|
1670
|
+
class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
|
|
1684
1671
|
}, [
|
|
1685
|
-
|
|
1672
|
+
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
1686
1673
|
key: 0,
|
|
1687
1674
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1688
|
-
innerHTML:
|
|
1675
|
+
innerHTML: _ctx.config.extra
|
|
1689
1676
|
}, null, 8, _hoisted_1$6)) : createCommentVNode("", true),
|
|
1690
|
-
createElementVNode("div", _hoisted_2$
|
|
1677
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
1691
1678
|
createVNode(unref(TMagicTooltip), {
|
|
1692
1679
|
content: "拖拽可排序",
|
|
1693
1680
|
placement: "left-start",
|
|
1694
|
-
disabled:
|
|
1681
|
+
disabled: _ctx.config.dropSort !== true
|
|
1695
1682
|
}, {
|
|
1696
1683
|
default: withCtx(() => [
|
|
1697
|
-
|
|
1684
|
+
_ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
|
|
1698
1685
|
ref_key: "tMagicTable",
|
|
1699
1686
|
ref: tMagicTable,
|
|
1700
1687
|
style: { "width": "100%" },
|
|
1701
|
-
"row-key":
|
|
1702
|
-
data:
|
|
1703
|
-
lastData:
|
|
1704
|
-
border:
|
|
1705
|
-
"max-height":
|
|
1688
|
+
"row-key": _ctx.config.rowKey || "id",
|
|
1689
|
+
data: data.value,
|
|
1690
|
+
lastData: lastData.value,
|
|
1691
|
+
border: _ctx.config.border,
|
|
1692
|
+
"max-height": _ctx.config.maxHeight,
|
|
1706
1693
|
"default-expand-all": true,
|
|
1707
1694
|
key: updateKey.value,
|
|
1708
1695
|
onSelect: selectHandle,
|
|
1709
1696
|
onSortChange: sortChange
|
|
1710
1697
|
}, {
|
|
1711
1698
|
default: withCtx(() => [
|
|
1712
|
-
|
|
1699
|
+
_ctx.config.itemExtra ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1713
1700
|
key: 0,
|
|
1714
1701
|
fixed: "left",
|
|
1715
1702
|
width: "30",
|
|
@@ -1717,17 +1704,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1717
1704
|
}, {
|
|
1718
1705
|
default: withCtx((scope) => [
|
|
1719
1706
|
createElementVNode("span", {
|
|
1720
|
-
innerHTML: itemExtra(
|
|
1707
|
+
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
1721
1708
|
class: "m-form-tip"
|
|
1722
|
-
}, null, 8, _hoisted_3
|
|
1709
|
+
}, null, 8, _hoisted_3)
|
|
1723
1710
|
]),
|
|
1724
1711
|
_: 1
|
|
1725
1712
|
})) : createCommentVNode("", true),
|
|
1726
1713
|
createVNode(unref(TMagicTableColumn), {
|
|
1727
1714
|
label: "操作",
|
|
1728
|
-
width:
|
|
1715
|
+
width: _ctx.config.operateColWidth || 55,
|
|
1729
1716
|
align: "center",
|
|
1730
|
-
fixed:
|
|
1717
|
+
fixed: _ctx.config.fixed === false ? void 0 : "left"
|
|
1731
1718
|
}, {
|
|
1732
1719
|
default: withCtx((scope) => [
|
|
1733
1720
|
renderSlot(_ctx.$slots, "operateCol", { scope }),
|
|
@@ -1745,7 +1732,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1745
1732
|
]),
|
|
1746
1733
|
_: 3
|
|
1747
1734
|
}, 8, ["width", "fixed"]),
|
|
1748
|
-
|
|
1735
|
+
_ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1749
1736
|
key: 1,
|
|
1750
1737
|
label: "排序",
|
|
1751
1738
|
width: "60"
|
|
@@ -1762,7 +1749,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1762
1749
|
size: "small",
|
|
1763
1750
|
type: "primary",
|
|
1764
1751
|
icon: unref(ArrowUp),
|
|
1765
|
-
disabled:
|
|
1752
|
+
disabled: _ctx.disabled,
|
|
1766
1753
|
text: "",
|
|
1767
1754
|
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1768
1755
|
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
@@ -1770,7 +1757,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1770
1757
|
]),
|
|
1771
1758
|
_: 2
|
|
1772
1759
|
}, 1024)) : createCommentVNode("", true),
|
|
1773
|
-
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !==
|
|
1760
|
+
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
1774
1761
|
key: 1,
|
|
1775
1762
|
content: "点击下移,双击置底",
|
|
1776
1763
|
placement: "top"
|
|
@@ -1781,7 +1768,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1781
1768
|
size: "small",
|
|
1782
1769
|
type: "primary",
|
|
1783
1770
|
icon: unref(ArrowDown),
|
|
1784
|
-
disabled:
|
|
1771
|
+
disabled: _ctx.disabled,
|
|
1785
1772
|
text: "",
|
|
1786
1773
|
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1787
1774
|
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
@@ -1792,14 +1779,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1792
1779
|
]),
|
|
1793
1780
|
_: 1
|
|
1794
1781
|
})) : createCommentVNode("", true),
|
|
1795
|
-
|
|
1782
|
+
selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1796
1783
|
key: 2,
|
|
1797
1784
|
align: "center",
|
|
1798
1785
|
"header-align": "center",
|
|
1799
1786
|
type: "selection",
|
|
1800
1787
|
width: "45"
|
|
1801
1788
|
})) : createCommentVNode("", true),
|
|
1802
|
-
|
|
1789
|
+
_ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1803
1790
|
key: 3,
|
|
1804
1791
|
width: "60",
|
|
1805
1792
|
label: "序号"
|
|
@@ -1809,7 +1796,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1809
1796
|
]),
|
|
1810
1797
|
_: 1
|
|
1811
1798
|
})) : createCommentVNode("", true),
|
|
1812
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1799
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (column, index) => {
|
|
1813
1800
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1814
1801
|
column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
|
|
1815
1802
|
prop: column.name,
|
|
@@ -1818,21 +1805,21 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1818
1805
|
sortable: column.sortable,
|
|
1819
1806
|
"sort-orders": ["ascending", "descending"],
|
|
1820
1807
|
key: column[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1821
|
-
"class-name":
|
|
1808
|
+
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1822
1809
|
}, {
|
|
1823
1810
|
default: withCtx((scope) => [
|
|
1824
1811
|
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$v, {
|
|
1825
1812
|
key: 0,
|
|
1826
1813
|
labelWidth: "0",
|
|
1827
|
-
disabled:
|
|
1814
|
+
disabled: _ctx.disabled,
|
|
1828
1815
|
prop: getProp(scope.$index),
|
|
1829
1816
|
rules: column.rules,
|
|
1830
1817
|
config: makeConfig(column, scope.row),
|
|
1831
1818
|
model: scope.row,
|
|
1832
|
-
lastValues:
|
|
1833
|
-
"is-compare":
|
|
1834
|
-
size:
|
|
1835
|
-
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change",
|
|
1819
|
+
lastValues: lastData.value[scope.$index],
|
|
1820
|
+
"is-compare": _ctx.isCompare,
|
|
1821
|
+
size: _ctx.size,
|
|
1822
|
+
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", _ctx.model[modelName.value])),
|
|
1836
1823
|
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1837
1824
|
}, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("", true)
|
|
1838
1825
|
]),
|
|
@@ -1847,21 +1834,21 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1847
1834
|
_: 3
|
|
1848
1835
|
}, 8, ["disabled"]),
|
|
1849
1836
|
renderSlot(_ctx.$slots, "default"),
|
|
1850
|
-
|
|
1837
|
+
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1851
1838
|
key: 0,
|
|
1852
1839
|
size: "small",
|
|
1853
1840
|
type: "primary",
|
|
1854
|
-
disabled:
|
|
1841
|
+
disabled: _ctx.disabled,
|
|
1855
1842
|
plain: "",
|
|
1856
1843
|
onClick: _cache[2] || (_cache[2] = ($event) => newHandler())
|
|
1857
1844
|
}, {
|
|
1858
1845
|
default: withCtx(() => [
|
|
1859
|
-
|
|
1846
|
+
createTextVNode("新增一行")
|
|
1860
1847
|
]),
|
|
1861
1848
|
_: 1
|
|
1862
1849
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1863
|
-
|
|
1864
|
-
|
|
1850
|
+
createTextVNode(" "),
|
|
1851
|
+
_ctx.enableToggleMode && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1865
1852
|
key: 1,
|
|
1866
1853
|
icon: unref(Grid),
|
|
1867
1854
|
size: "small",
|
|
@@ -1869,11 +1856,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1869
1856
|
onClick: toggleMode
|
|
1870
1857
|
}, {
|
|
1871
1858
|
default: withCtx(() => [
|
|
1872
|
-
|
|
1859
|
+
createTextVNode("展开配置")
|
|
1873
1860
|
]),
|
|
1874
1861
|
_: 1
|
|
1875
1862
|
}, 8, ["icon"])) : createCommentVNode("", true),
|
|
1876
|
-
|
|
1863
|
+
_ctx.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1877
1864
|
key: 2,
|
|
1878
1865
|
icon: unref(FullScreen),
|
|
1879
1866
|
size: "small",
|
|
@@ -1885,13 +1872,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1885
1872
|
]),
|
|
1886
1873
|
_: 1
|
|
1887
1874
|
}, 8, ["icon"])) : createCommentVNode("", true),
|
|
1888
|
-
|
|
1875
|
+
importable.value ? (openBlock(), createBlock(unref(TMagicUpload), {
|
|
1889
1876
|
key: 3,
|
|
1890
1877
|
style: { "display": "inline-block" },
|
|
1891
1878
|
ref_key: "excelBtn",
|
|
1892
1879
|
ref: excelBtn,
|
|
1893
1880
|
action: "/noop",
|
|
1894
|
-
disabled:
|
|
1881
|
+
disabled: _ctx.disabled,
|
|
1895
1882
|
"on-change": excelHandler,
|
|
1896
1883
|
"auto-upload": false
|
|
1897
1884
|
}, {
|
|
@@ -1899,40 +1886,40 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1899
1886
|
createVNode(unref(TMagicButton), {
|
|
1900
1887
|
size: "small",
|
|
1901
1888
|
type: "success",
|
|
1902
|
-
disabled:
|
|
1889
|
+
disabled: _ctx.disabled,
|
|
1903
1890
|
plain: ""
|
|
1904
1891
|
}, {
|
|
1905
1892
|
default: withCtx(() => [
|
|
1906
|
-
|
|
1893
|
+
createTextVNode("导入EXCEL")
|
|
1907
1894
|
]),
|
|
1908
1895
|
_: 1
|
|
1909
1896
|
}, 8, ["disabled"])
|
|
1910
1897
|
]),
|
|
1911
1898
|
_: 1
|
|
1912
1899
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1913
|
-
|
|
1914
|
-
|
|
1900
|
+
createTextVNode(" "),
|
|
1901
|
+
importable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1915
1902
|
key: 4,
|
|
1916
1903
|
size: "small",
|
|
1917
1904
|
type: "warning",
|
|
1918
|
-
disabled:
|
|
1905
|
+
disabled: _ctx.disabled,
|
|
1919
1906
|
plain: "",
|
|
1920
1907
|
onClick: _cache[3] || (_cache[3] = ($event) => clearHandler())
|
|
1921
1908
|
}, {
|
|
1922
1909
|
default: withCtx(() => [
|
|
1923
|
-
|
|
1910
|
+
createTextVNode("清空")
|
|
1924
1911
|
]),
|
|
1925
1912
|
_: 1
|
|
1926
1913
|
}, 8, ["disabled"])) : createCommentVNode("", true)
|
|
1927
1914
|
]),
|
|
1928
|
-
|
|
1915
|
+
_ctx.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1929
1916
|
createVNode(unref(TMagicPagination), {
|
|
1930
1917
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
1931
|
-
"hide-on-single-page":
|
|
1918
|
+
"hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
|
|
1932
1919
|
"current-page": pagecontext.value + 1,
|
|
1933
1920
|
"page-sizes": [pagesize.value, 60, 120, 300],
|
|
1934
1921
|
"page-size": pagesize.value,
|
|
1935
|
-
total:
|
|
1922
|
+
total: _ctx.model[modelName.value].length,
|
|
1936
1923
|
onSizeChange: handleSizeChange,
|
|
1937
1924
|
onCurrentChange: handleCurrentChange
|
|
1938
1925
|
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
|
|
@@ -1942,28 +1929,28 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1942
1929
|
}
|
|
1943
1930
|
});
|
|
1944
1931
|
|
|
1945
|
-
const __default__$m = defineComponent({
|
|
1946
|
-
name: "MFormTabs"
|
|
1947
|
-
});
|
|
1948
1932
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1949
|
-
...
|
|
1933
|
+
...{
|
|
1934
|
+
name: "MFormTabs"
|
|
1935
|
+
},
|
|
1936
|
+
__name: "Tabs",
|
|
1950
1937
|
props: {
|
|
1951
|
-
model:
|
|
1938
|
+
model: {},
|
|
1952
1939
|
lastValues: { default: () => ({}) },
|
|
1953
1940
|
isCompare: { type: Boolean, default: false },
|
|
1954
|
-
config:
|
|
1955
|
-
name:
|
|
1956
|
-
size:
|
|
1957
|
-
labelWidth:
|
|
1958
|
-
prop:
|
|
1941
|
+
config: {},
|
|
1942
|
+
name: {},
|
|
1943
|
+
size: {},
|
|
1944
|
+
labelWidth: {},
|
|
1945
|
+
prop: {},
|
|
1959
1946
|
expandMore: { type: Boolean },
|
|
1960
1947
|
disabled: { type: Boolean }
|
|
1961
1948
|
},
|
|
1962
1949
|
emits: ["change", "addDiffCount"],
|
|
1963
1950
|
setup(__props, { emit }) {
|
|
1964
1951
|
const props = __props;
|
|
1965
|
-
const tabPaneComponent = getConfig$1("components")
|
|
1966
|
-
const tabsComponent = getConfig$1("components")
|
|
1952
|
+
const tabPaneComponent = getConfig$1("components")?.tabPane;
|
|
1953
|
+
const tabsComponent = getConfig$1("components")?.tabs;
|
|
1967
1954
|
const getActive = (mForm2, props2, activeTabName2) => {
|
|
1968
1955
|
const { config, model, prop } = props2;
|
|
1969
1956
|
const { active } = config;
|
|
@@ -2059,28 +2046,31 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2059
2046
|
emit("addDiffCount");
|
|
2060
2047
|
};
|
|
2061
2048
|
return (_ctx, _cache) => {
|
|
2062
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent)
|
|
2049
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent)?.component || "el-tabs"), mergeProps(
|
|
2063
2050
|
{
|
|
2064
2051
|
modelValue: activeTabName.value,
|
|
2065
2052
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event)
|
|
2066
2053
|
},
|
|
2067
|
-
unref(tabsComponent)
|
|
2068
|
-
type:
|
|
2069
|
-
editable:
|
|
2070
|
-
tabPosition:
|
|
2071
|
-
}),
|
|
2054
|
+
unref(tabsComponent)?.props({
|
|
2055
|
+
type: _ctx.config.tabType,
|
|
2056
|
+
editable: _ctx.config.editable || false,
|
|
2057
|
+
tabPosition: _ctx.config.tabPosition || "top"
|
|
2058
|
+
}) || {},
|
|
2072
2059
|
{
|
|
2073
|
-
class: `tmagic-design-tabs ${
|
|
2060
|
+
class: `tmagic-design-tabs ${_ctx.config.dynamic ? "magic-form-dynamic-tab" : "magic-form-tab"}`,
|
|
2074
2061
|
onTabClick: tabClickHandler,
|
|
2075
2062
|
onTabAdd,
|
|
2076
2063
|
onTabRemove
|
|
2077
2064
|
}
|
|
2078
2065
|
), {
|
|
2079
2066
|
default: withCtx(() => [
|
|
2080
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
2081
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)
|
|
2082
|
-
|
|
2083
|
-
|
|
2067
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab, tabIndex) => {
|
|
2068
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"), mergeProps(
|
|
2069
|
+
{
|
|
2070
|
+
key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex
|
|
2071
|
+
},
|
|
2072
|
+
unref(tabPaneComponent)?.props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false }) || {}
|
|
2073
|
+
), {
|
|
2084
2074
|
label: withCtx(() => [
|
|
2085
2075
|
createElementVNode("span", null, [
|
|
2086
2076
|
createTextVNode(toDisplayString(filter(tab.title)), 1),
|
|
@@ -2096,14 +2086,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2096
2086
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
2097
2087
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
2098
2088
|
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":
|
|
2089
|
+
disabled: _ctx.disabled,
|
|
2090
|
+
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,
|
|
2091
|
+
"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,
|
|
2092
|
+
"is-compare": _ctx.isCompare,
|
|
2093
|
+
prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
|
|
2094
|
+
size: _ctx.size,
|
|
2095
|
+
"label-width": tab.labelWidth || _ctx.labelWidth,
|
|
2096
|
+
"expand-more": _ctx.expandMore,
|
|
2107
2097
|
onChange: changeHandler,
|
|
2108
2098
|
onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
|
|
2109
2099
|
}, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
|
|
@@ -2145,21 +2135,21 @@ const useAddField = (prop) => {
|
|
|
2145
2135
|
);
|
|
2146
2136
|
};
|
|
2147
2137
|
|
|
2148
|
-
const __default__$l = defineComponent({
|
|
2149
|
-
name: "MFormCascader"
|
|
2150
|
-
});
|
|
2151
2138
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2152
|
-
...
|
|
2139
|
+
...{
|
|
2140
|
+
name: "MFormCascader"
|
|
2141
|
+
},
|
|
2142
|
+
__name: "Cascader",
|
|
2153
2143
|
props: {
|
|
2154
|
-
config:
|
|
2155
|
-
model:
|
|
2156
|
-
initValues:
|
|
2157
|
-
values:
|
|
2158
|
-
name:
|
|
2159
|
-
prop:
|
|
2144
|
+
config: {},
|
|
2145
|
+
model: {},
|
|
2146
|
+
initValues: {},
|
|
2147
|
+
values: {},
|
|
2148
|
+
name: {},
|
|
2149
|
+
prop: {},
|
|
2160
2150
|
disabled: { type: Boolean },
|
|
2161
|
-
size:
|
|
2162
|
-
lastValues:
|
|
2151
|
+
size: {},
|
|
2152
|
+
lastValues: {}
|
|
2163
2153
|
},
|
|
2164
2154
|
emits: ["change"],
|
|
2165
2155
|
setup(__props, { emit }) {
|
|
@@ -2215,39 +2205,39 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2215
2205
|
};
|
|
2216
2206
|
return (_ctx, _cache) => {
|
|
2217
2207
|
return openBlock(), createBlock(unref(TMagicCascader), {
|
|
2218
|
-
modelValue:
|
|
2219
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2208
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2209
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2220
2210
|
ref_key: "tMagicCascader",
|
|
2221
2211
|
ref: tMagicCascader,
|
|
2222
2212
|
style: { "width": "100%" },
|
|
2223
2213
|
clearable: "",
|
|
2224
2214
|
filterable: "",
|
|
2225
|
-
size:
|
|
2226
|
-
placeholder:
|
|
2227
|
-
disabled:
|
|
2215
|
+
size: _ctx.size,
|
|
2216
|
+
placeholder: _ctx.config.placeholder,
|
|
2217
|
+
disabled: _ctx.disabled,
|
|
2228
2218
|
options: unref(options),
|
|
2229
|
-
props: { multiple:
|
|
2219
|
+
props: { multiple: _ctx.config.multiple },
|
|
2230
2220
|
onChange: changeHandler
|
|
2231
2221
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "options", "props"]);
|
|
2232
2222
|
};
|
|
2233
2223
|
}
|
|
2234
2224
|
});
|
|
2235
2225
|
|
|
2236
|
-
const __default__$k = defineComponent({
|
|
2237
|
-
name: "MFormCheckbox"
|
|
2238
|
-
});
|
|
2239
2226
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2240
|
-
...
|
|
2227
|
+
...{
|
|
2228
|
+
name: "MFormCheckbox"
|
|
2229
|
+
},
|
|
2230
|
+
__name: "Checkbox",
|
|
2241
2231
|
props: {
|
|
2242
|
-
config:
|
|
2243
|
-
model:
|
|
2244
|
-
initValues:
|
|
2245
|
-
values:
|
|
2246
|
-
name:
|
|
2247
|
-
prop:
|
|
2232
|
+
config: {},
|
|
2233
|
+
model: {},
|
|
2234
|
+
initValues: {},
|
|
2235
|
+
values: {},
|
|
2236
|
+
name: {},
|
|
2237
|
+
prop: {},
|
|
2248
2238
|
disabled: { type: Boolean },
|
|
2249
|
-
size:
|
|
2250
|
-
lastValues:
|
|
2239
|
+
size: {},
|
|
2240
|
+
lastValues: {}
|
|
2251
2241
|
},
|
|
2252
2242
|
emits: ["change"],
|
|
2253
2243
|
setup(__props, { emit }) {
|
|
@@ -2278,16 +2268,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2278
2268
|
};
|
|
2279
2269
|
return (_ctx, _cache) => {
|
|
2280
2270
|
return openBlock(), createBlock(unref(TMagicCheckbox), {
|
|
2281
|
-
modelValue:
|
|
2282
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2283
|
-
size:
|
|
2284
|
-
trueLabel:
|
|
2285
|
-
falseLabel:
|
|
2286
|
-
disabled:
|
|
2271
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2272
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2273
|
+
size: _ctx.size,
|
|
2274
|
+
trueLabel: activeValue.value,
|
|
2275
|
+
falseLabel: inactiveValue.value,
|
|
2276
|
+
disabled: _ctx.disabled,
|
|
2287
2277
|
onChange: changeHandler
|
|
2288
2278
|
}, {
|
|
2289
2279
|
default: withCtx(() => [
|
|
2290
|
-
createTextVNode(toDisplayString(
|
|
2280
|
+
createTextVNode(toDisplayString(_ctx.config.text), 1)
|
|
2291
2281
|
]),
|
|
2292
2282
|
_: 1
|
|
2293
2283
|
}, 8, ["modelValue", "size", "trueLabel", "falseLabel", "disabled"]);
|
|
@@ -2295,21 +2285,21 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2295
2285
|
}
|
|
2296
2286
|
});
|
|
2297
2287
|
|
|
2298
|
-
const __default__$j = defineComponent({
|
|
2299
|
-
name: "MFormCheckGroup"
|
|
2300
|
-
});
|
|
2301
2288
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2302
|
-
...
|
|
2289
|
+
...{
|
|
2290
|
+
name: "MFormCheckGroup"
|
|
2291
|
+
},
|
|
2292
|
+
__name: "CheckboxGroup",
|
|
2303
2293
|
props: {
|
|
2304
|
-
config:
|
|
2305
|
-
model:
|
|
2306
|
-
initValues:
|
|
2307
|
-
values:
|
|
2308
|
-
name:
|
|
2309
|
-
prop:
|
|
2294
|
+
config: {},
|
|
2295
|
+
model: {},
|
|
2296
|
+
initValues: {},
|
|
2297
|
+
values: {},
|
|
2298
|
+
name: {},
|
|
2299
|
+
prop: {},
|
|
2310
2300
|
disabled: { type: Boolean },
|
|
2311
|
-
size:
|
|
2312
|
-
lastValues:
|
|
2301
|
+
size: {},
|
|
2302
|
+
lastValues: {}
|
|
2313
2303
|
},
|
|
2314
2304
|
emits: ["change"],
|
|
2315
2305
|
setup(__props, { emit }) {
|
|
@@ -2331,14 +2321,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2331
2321
|
});
|
|
2332
2322
|
return (_ctx, _cache) => {
|
|
2333
2323
|
return openBlock(), createBlock(unref(TMagicCheckboxGroup), {
|
|
2334
|
-
modelValue:
|
|
2335
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2336
|
-
size:
|
|
2337
|
-
disabled:
|
|
2324
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2325
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2326
|
+
size: _ctx.size,
|
|
2327
|
+
disabled: _ctx.disabled,
|
|
2338
2328
|
onChange: changeHandler
|
|
2339
2329
|
}, {
|
|
2340
2330
|
default: withCtx(() => [
|
|
2341
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
2331
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option) => {
|
|
2342
2332
|
return openBlock(), createBlock(unref(TMagicCheckbox), {
|
|
2343
2333
|
label: option.value,
|
|
2344
2334
|
value: option.value,
|
|
@@ -2358,21 +2348,21 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2358
2348
|
}
|
|
2359
2349
|
});
|
|
2360
2350
|
|
|
2361
|
-
const __default__$i = defineComponent({
|
|
2362
|
-
name: "MFormColorPicker"
|
|
2363
|
-
});
|
|
2364
2351
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2365
|
-
...
|
|
2352
|
+
...{
|
|
2353
|
+
name: "MFormColorPicker"
|
|
2354
|
+
},
|
|
2355
|
+
__name: "ColorPicker",
|
|
2366
2356
|
props: {
|
|
2367
|
-
config:
|
|
2368
|
-
model:
|
|
2369
|
-
initValues:
|
|
2370
|
-
values:
|
|
2371
|
-
name:
|
|
2372
|
-
prop:
|
|
2357
|
+
config: {},
|
|
2358
|
+
model: {},
|
|
2359
|
+
initValues: {},
|
|
2360
|
+
values: {},
|
|
2361
|
+
name: {},
|
|
2362
|
+
prop: {},
|
|
2373
2363
|
disabled: { type: Boolean },
|
|
2374
|
-
size:
|
|
2375
|
-
lastValues:
|
|
2364
|
+
size: {},
|
|
2365
|
+
lastValues: {}
|
|
2376
2366
|
},
|
|
2377
2367
|
emits: ["change"],
|
|
2378
2368
|
setup(__props, { emit }) {
|
|
@@ -2381,10 +2371,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2381
2371
|
const changeHandler = (value) => emit("change", value);
|
|
2382
2372
|
return (_ctx, _cache) => {
|
|
2383
2373
|
return openBlock(), createBlock(unref(TMagicColorPicker), {
|
|
2384
|
-
modelValue:
|
|
2385
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2386
|
-
size:
|
|
2387
|
-
disabled:
|
|
2374
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2375
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2376
|
+
size: _ctx.size,
|
|
2377
|
+
disabled: _ctx.disabled,
|
|
2388
2378
|
showAlpha: true,
|
|
2389
2379
|
onChange: changeHandler
|
|
2390
2380
|
}, null, 8, ["modelValue", "size", "disabled"]);
|
|
@@ -2392,21 +2382,21 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2392
2382
|
}
|
|
2393
2383
|
});
|
|
2394
2384
|
|
|
2395
|
-
const __default__$h = defineComponent({
|
|
2396
|
-
name: "MFormDate"
|
|
2397
|
-
});
|
|
2398
2385
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2399
|
-
...
|
|
2386
|
+
...{
|
|
2387
|
+
name: "MFormDate"
|
|
2388
|
+
},
|
|
2389
|
+
__name: "Date",
|
|
2400
2390
|
props: {
|
|
2401
|
-
config:
|
|
2402
|
-
model:
|
|
2403
|
-
initValues:
|
|
2404
|
-
values:
|
|
2405
|
-
name:
|
|
2406
|
-
prop:
|
|
2391
|
+
config: {},
|
|
2392
|
+
model: {},
|
|
2393
|
+
initValues: {},
|
|
2394
|
+
values: {},
|
|
2395
|
+
name: {},
|
|
2396
|
+
prop: {},
|
|
2407
2397
|
disabled: { type: Boolean },
|
|
2408
|
-
size:
|
|
2409
|
-
lastValues:
|
|
2398
|
+
size: {},
|
|
2399
|
+
lastValues: {}
|
|
2410
2400
|
},
|
|
2411
2401
|
emits: ["change"],
|
|
2412
2402
|
setup(__props, { emit }) {
|
|
@@ -2418,35 +2408,35 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2418
2408
|
};
|
|
2419
2409
|
return (_ctx, _cache) => {
|
|
2420
2410
|
return openBlock(), createBlock(unref(TMagicDatePicker), {
|
|
2421
|
-
modelValue:
|
|
2422
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2411
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2412
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2423
2413
|
type: "date",
|
|
2424
|
-
size:
|
|
2425
|
-
placeholder:
|
|
2426
|
-
disabled:
|
|
2427
|
-
format:
|
|
2428
|
-
"value-format":
|
|
2414
|
+
size: _ctx.size,
|
|
2415
|
+
placeholder: _ctx.config.placeholder,
|
|
2416
|
+
disabled: _ctx.disabled,
|
|
2417
|
+
format: _ctx.config.format,
|
|
2418
|
+
"value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
2429
2419
|
onChange: changeHandler
|
|
2430
2420
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format"]);
|
|
2431
2421
|
};
|
|
2432
2422
|
}
|
|
2433
2423
|
});
|
|
2434
2424
|
|
|
2435
|
-
const __default__$g = defineComponent({
|
|
2436
|
-
name: "MFormDateRange"
|
|
2437
|
-
});
|
|
2438
2425
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2439
|
-
...
|
|
2426
|
+
...{
|
|
2427
|
+
name: "MFormDateRange"
|
|
2428
|
+
},
|
|
2429
|
+
__name: "Daterange",
|
|
2440
2430
|
props: {
|
|
2441
|
-
config:
|
|
2442
|
-
model:
|
|
2443
|
-
initValues:
|
|
2444
|
-
values:
|
|
2445
|
-
name:
|
|
2446
|
-
prop:
|
|
2431
|
+
config: {},
|
|
2432
|
+
model: {},
|
|
2433
|
+
initValues: {},
|
|
2434
|
+
values: {},
|
|
2435
|
+
name: {},
|
|
2436
|
+
prop: {},
|
|
2447
2437
|
disabled: { type: Boolean },
|
|
2448
|
-
size:
|
|
2449
|
-
lastValues:
|
|
2438
|
+
size: {},
|
|
2439
|
+
lastValues: {}
|
|
2450
2440
|
},
|
|
2451
2441
|
emits: ["change"],
|
|
2452
2442
|
setup(__props, { emit }) {
|
|
@@ -2524,31 +2514,31 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2524
2514
|
"range-separator": "-",
|
|
2525
2515
|
"start-placeholder": "开始日期",
|
|
2526
2516
|
"end-placeholder": "结束日期",
|
|
2527
|
-
size:
|
|
2517
|
+
size: _ctx.size,
|
|
2528
2518
|
"unlink-panels": true,
|
|
2529
|
-
disabled:
|
|
2530
|
-
"default-time":
|
|
2519
|
+
disabled: _ctx.disabled,
|
|
2520
|
+
"default-time": _ctx.config.defaultTime,
|
|
2531
2521
|
onChange: changeHandler
|
|
2532
2522
|
}, null, 8, ["modelValue", "size", "disabled", "default-time"]);
|
|
2533
2523
|
};
|
|
2534
2524
|
}
|
|
2535
2525
|
});
|
|
2536
2526
|
|
|
2537
|
-
const __default__$f = defineComponent({
|
|
2538
|
-
name: "MFormDateTime"
|
|
2539
|
-
});
|
|
2540
2527
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2541
|
-
...
|
|
2528
|
+
...{
|
|
2529
|
+
name: "MFormDateTime"
|
|
2530
|
+
},
|
|
2531
|
+
__name: "DateTime",
|
|
2542
2532
|
props: {
|
|
2543
|
-
config:
|
|
2544
|
-
model:
|
|
2545
|
-
initValues:
|
|
2546
|
-
values:
|
|
2547
|
-
name:
|
|
2548
|
-
prop:
|
|
2533
|
+
config: {},
|
|
2534
|
+
model: {},
|
|
2535
|
+
initValues: {},
|
|
2536
|
+
values: {},
|
|
2537
|
+
name: {},
|
|
2538
|
+
prop: {},
|
|
2549
2539
|
disabled: { type: Boolean },
|
|
2550
|
-
size:
|
|
2551
|
-
lastValues:
|
|
2540
|
+
size: {},
|
|
2541
|
+
lastValues: {}
|
|
2552
2542
|
},
|
|
2553
2543
|
emits: ["change"],
|
|
2554
2544
|
setup(__props, { emit }) {
|
|
@@ -2567,16 +2557,16 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2567
2557
|
};
|
|
2568
2558
|
return (_ctx, _cache) => {
|
|
2569
2559
|
return openBlock(), createBlock(unref(TMagicDatePicker), {
|
|
2570
|
-
modelValue:
|
|
2571
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2560
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2561
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2572
2562
|
"popper-class": "magic-datetime-picker-popper",
|
|
2573
2563
|
type: "datetime",
|
|
2574
|
-
size:
|
|
2575
|
-
placeholder:
|
|
2576
|
-
disabled:
|
|
2577
|
-
format:
|
|
2578
|
-
"value-format":
|
|
2579
|
-
"default-time":
|
|
2564
|
+
size: _ctx.size,
|
|
2565
|
+
placeholder: _ctx.config.placeholder,
|
|
2566
|
+
disabled: _ctx.disabled,
|
|
2567
|
+
format: _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
|
|
2568
|
+
"value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
2569
|
+
"default-time": _ctx.config.defaultTime,
|
|
2580
2570
|
onChange: changeHandler
|
|
2581
2571
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "default-time"]);
|
|
2582
2572
|
};
|
|
@@ -2584,19 +2574,19 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2584
2574
|
});
|
|
2585
2575
|
|
|
2586
2576
|
const _hoisted_1$5 = { key: 0 };
|
|
2587
|
-
const __default__$e = defineComponent({
|
|
2588
|
-
name: "MFormDisplay"
|
|
2589
|
-
});
|
|
2590
2577
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2591
|
-
...
|
|
2578
|
+
...{
|
|
2579
|
+
name: "MFormDisplay"
|
|
2580
|
+
},
|
|
2581
|
+
__name: "Display",
|
|
2592
2582
|
props: {
|
|
2593
|
-
config:
|
|
2594
|
-
model:
|
|
2595
|
-
initValues:
|
|
2596
|
-
values:
|
|
2597
|
-
name:
|
|
2598
|
-
prop:
|
|
2599
|
-
lastValues:
|
|
2583
|
+
config: {},
|
|
2584
|
+
model: {},
|
|
2585
|
+
initValues: {},
|
|
2586
|
+
values: {},
|
|
2587
|
+
name: {},
|
|
2588
|
+
prop: {},
|
|
2589
|
+
lastValues: {}
|
|
2600
2590
|
},
|
|
2601
2591
|
setup(__props) {
|
|
2602
2592
|
const props = __props;
|
|
@@ -2605,27 +2595,27 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2605
2595
|
}
|
|
2606
2596
|
useAddField(props.prop);
|
|
2607
2597
|
return (_ctx, _cache) => {
|
|
2608
|
-
return
|
|
2598
|
+
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(_ctx.model[_ctx.name]), 1)) : createCommentVNode("", true);
|
|
2609
2599
|
};
|
|
2610
2600
|
}
|
|
2611
2601
|
});
|
|
2612
2602
|
|
|
2613
2603
|
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2614
|
-
const __default__$d = defineComponent({
|
|
2615
|
-
name: "MFormDynamicField"
|
|
2616
|
-
});
|
|
2617
2604
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2618
|
-
...
|
|
2605
|
+
...{
|
|
2606
|
+
name: "MFormDynamicField"
|
|
2607
|
+
},
|
|
2608
|
+
__name: "DynamicField",
|
|
2619
2609
|
props: {
|
|
2620
|
-
config:
|
|
2621
|
-
model:
|
|
2622
|
-
initValues:
|
|
2623
|
-
values:
|
|
2624
|
-
name:
|
|
2625
|
-
prop:
|
|
2610
|
+
config: {},
|
|
2611
|
+
model: {},
|
|
2612
|
+
initValues: {},
|
|
2613
|
+
values: {},
|
|
2614
|
+
name: {},
|
|
2615
|
+
prop: {},
|
|
2626
2616
|
disabled: { type: Boolean },
|
|
2627
|
-
size:
|
|
2628
|
-
lastValues:
|
|
2617
|
+
size: {},
|
|
2618
|
+
lastValues: {}
|
|
2629
2619
|
},
|
|
2630
2620
|
emits: ["change"],
|
|
2631
2621
|
setup(__props, { emit }) {
|
|
@@ -2703,40 +2693,40 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2703
2693
|
}
|
|
2704
2694
|
});
|
|
2705
2695
|
|
|
2706
|
-
const __default__$c = defineComponent({
|
|
2707
|
-
name: "MFormHidden"
|
|
2708
|
-
});
|
|
2709
2696
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2710
|
-
...
|
|
2697
|
+
...{
|
|
2698
|
+
name: "MFormHidden"
|
|
2699
|
+
},
|
|
2700
|
+
__name: "Hidden",
|
|
2711
2701
|
props: {
|
|
2712
|
-
config:
|
|
2713
|
-
model:
|
|
2714
|
-
initValues:
|
|
2715
|
-
values:
|
|
2716
|
-
name:
|
|
2717
|
-
prop:
|
|
2718
|
-
lastValues:
|
|
2702
|
+
config: {},
|
|
2703
|
+
model: {},
|
|
2704
|
+
initValues: {},
|
|
2705
|
+
values: {},
|
|
2706
|
+
name: {},
|
|
2707
|
+
prop: {},
|
|
2708
|
+
lastValues: {}
|
|
2719
2709
|
},
|
|
2720
2710
|
setup(__props) {
|
|
2721
2711
|
const props = __props;
|
|
2722
2712
|
useAddField(props.prop);
|
|
2723
2713
|
return (_ctx, _cache) => {
|
|
2724
|
-
return
|
|
2714
|
+
return _ctx.model ? withDirectives((openBlock(), createElementBlock("input", {
|
|
2725
2715
|
key: 0,
|
|
2726
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2716
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2727
2717
|
type: "hidden"
|
|
2728
2718
|
}, null, 512)), [
|
|
2729
|
-
[vModelText,
|
|
2719
|
+
[vModelText, _ctx.model[_ctx.name]]
|
|
2730
2720
|
]) : createCommentVNode("", true);
|
|
2731
2721
|
};
|
|
2732
2722
|
}
|
|
2733
2723
|
});
|
|
2734
2724
|
|
|
2735
|
-
const __default__$b = defineComponent({
|
|
2736
|
-
name: "MForm"
|
|
2737
|
-
});
|
|
2738
2725
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
2739
|
-
...
|
|
2726
|
+
...{
|
|
2727
|
+
name: "MForm"
|
|
2728
|
+
},
|
|
2729
|
+
__name: "Form",
|
|
2740
2730
|
props: {
|
|
2741
2731
|
config: { default: () => [] },
|
|
2742
2732
|
initValues: { default: () => ({}) },
|
|
@@ -2747,14 +2737,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2747
2737
|
disabled: { type: Boolean, default: false },
|
|
2748
2738
|
height: { default: "auto" },
|
|
2749
2739
|
stepActive: { default: 1 },
|
|
2750
|
-
size:
|
|
2740
|
+
size: {},
|
|
2751
2741
|
inline: { type: Boolean, default: false },
|
|
2752
2742
|
labelPosition: { default: "right" },
|
|
2753
2743
|
keyProp: { default: "__key" },
|
|
2754
|
-
popperClass:
|
|
2744
|
+
popperClass: {},
|
|
2745
|
+
extendState: {}
|
|
2755
2746
|
},
|
|
2756
2747
|
emits: ["change", "field-input", "field-change"],
|
|
2757
|
-
setup(__props, { expose, emit }) {
|
|
2748
|
+
setup(__props, { expose: __expose, emit }) {
|
|
2758
2749
|
const props = __props;
|
|
2759
2750
|
const tMagicForm = ref();
|
|
2760
2751
|
const initialized = ref(false);
|
|
@@ -2786,7 +2777,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2786
2777
|
}
|
|
2787
2778
|
}
|
|
2788
2779
|
});
|
|
2789
|
-
watchEffect(() => {
|
|
2780
|
+
watchEffect(async () => {
|
|
2790
2781
|
formState.initValues = props.initValues;
|
|
2791
2782
|
formState.lastValues = props.lastValues;
|
|
2792
2783
|
formState.isCompare = props.isCompare;
|
|
@@ -2794,6 +2785,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2794
2785
|
formState.keyProp = props.keyProp;
|
|
2795
2786
|
formState.popperClass = props.popperClass;
|
|
2796
2787
|
formState.parentValues = props.parentValues;
|
|
2788
|
+
if (typeof props.extendState === "function") {
|
|
2789
|
+
const state = await props.extendState(formState) || {};
|
|
2790
|
+
Object.entries(state).forEach(([key, value]) => {
|
|
2791
|
+
formState[key] = value;
|
|
2792
|
+
});
|
|
2793
|
+
}
|
|
2797
2794
|
});
|
|
2798
2795
|
provide("mForm", formState);
|
|
2799
2796
|
watch(
|
|
@@ -2824,7 +2821,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2824
2821
|
const changeHandler = () => {
|
|
2825
2822
|
emit("change", values.value);
|
|
2826
2823
|
};
|
|
2827
|
-
|
|
2824
|
+
__expose({
|
|
2828
2825
|
values,
|
|
2829
2826
|
lastValuesProcessed,
|
|
2830
2827
|
formState,
|
|
@@ -2857,23 +2854,23 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2857
2854
|
ref_key: "tMagicForm",
|
|
2858
2855
|
ref: tMagicForm,
|
|
2859
2856
|
model: values.value,
|
|
2860
|
-
"label-width":
|
|
2861
|
-
style: normalizeStyle(`height: ${
|
|
2862
|
-
inline:
|
|
2863
|
-
"label-position":
|
|
2857
|
+
"label-width": _ctx.labelWidth,
|
|
2858
|
+
style: normalizeStyle(`height: ${_ctx.height}`),
|
|
2859
|
+
inline: _ctx.inline,
|
|
2860
|
+
"label-position": _ctx.labelPosition
|
|
2864
2861
|
}, {
|
|
2865
2862
|
default: withCtx(() => [
|
|
2866
|
-
initialized.value && Array.isArray(
|
|
2863
|
+
initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
|
|
2867
2864
|
return openBlock(), createBlock(_sfc_main$v, {
|
|
2868
|
-
disabled:
|
|
2869
|
-
key: item[
|
|
2865
|
+
disabled: _ctx.disabled,
|
|
2866
|
+
key: item[_ctx.keyProp] ?? index,
|
|
2870
2867
|
config: item,
|
|
2871
2868
|
model: values.value,
|
|
2872
2869
|
"last-values": lastValuesProcessed.value,
|
|
2873
|
-
"is-compare":
|
|
2874
|
-
"label-width": item.labelWidth ||
|
|
2875
|
-
"step-active":
|
|
2876
|
-
size:
|
|
2870
|
+
"is-compare": _ctx.isCompare,
|
|
2871
|
+
"label-width": item.labelWidth || _ctx.labelWidth,
|
|
2872
|
+
"step-active": _ctx.stepActive,
|
|
2873
|
+
size: _ctx.size,
|
|
2877
2874
|
onChange: changeHandler
|
|
2878
2875
|
}, null, 8, ["disabled", "config", "model", "last-values", "is-compare", "label-width", "step-active", "size"]);
|
|
2879
2876
|
}), 128)) : createCommentVNode("", true)
|
|
@@ -2885,29 +2882,26 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2885
2882
|
});
|
|
2886
2883
|
|
|
2887
2884
|
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
2885
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
2895
|
-
...
|
|
2886
|
+
...{
|
|
2887
|
+
name: "MFormDialog"
|
|
2888
|
+
},
|
|
2889
|
+
__name: "FormDialog",
|
|
2896
2890
|
props: {
|
|
2897
2891
|
config: { default: () => [] },
|
|
2898
2892
|
values: { default: () => ({}) },
|
|
2899
|
-
parentValues:
|
|
2900
|
-
width:
|
|
2901
|
-
labelWidth:
|
|
2893
|
+
parentValues: {},
|
|
2894
|
+
width: {},
|
|
2895
|
+
labelWidth: {},
|
|
2902
2896
|
fullscreen: { type: Boolean },
|
|
2903
2897
|
disabled: { type: Boolean },
|
|
2904
|
-
title:
|
|
2905
|
-
zIndex:
|
|
2906
|
-
size:
|
|
2898
|
+
title: {},
|
|
2899
|
+
zIndex: {},
|
|
2900
|
+
size: {},
|
|
2907
2901
|
confirmText: { default: "确定" }
|
|
2908
2902
|
},
|
|
2909
2903
|
emits: ["close", "submit", "error", "change"],
|
|
2910
|
-
setup(__props, { expose, emit }) {
|
|
2904
|
+
setup(__props, { expose: __expose, emit }) {
|
|
2911
2905
|
const props = __props;
|
|
2912
2906
|
const form = ref();
|
|
2913
2907
|
const dialogVisible = ref(false);
|
|
@@ -2956,7 +2950,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2956
2950
|
const changeHandler = (value) => {
|
|
2957
2951
|
emit("change", value);
|
|
2958
2952
|
};
|
|
2959
|
-
|
|
2953
|
+
__expose({
|
|
2960
2954
|
form,
|
|
2961
2955
|
saveFetch,
|
|
2962
2956
|
dialogVisible,
|
|
@@ -2970,10 +2964,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2970
2964
|
class: "m-form-dialog",
|
|
2971
2965
|
top: "20px",
|
|
2972
2966
|
"append-to-body": "",
|
|
2973
|
-
title:
|
|
2974
|
-
width:
|
|
2975
|
-
zIndex:
|
|
2976
|
-
fullscreen:
|
|
2967
|
+
title: _ctx.title,
|
|
2968
|
+
width: _ctx.width,
|
|
2969
|
+
zIndex: _ctx.zIndex,
|
|
2970
|
+
fullscreen: _ctx.fullscreen,
|
|
2977
2971
|
"close-on-click-modal": false,
|
|
2978
2972
|
onClose: closeHandler
|
|
2979
2973
|
}, {
|
|
@@ -2999,29 +2993,29 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2999
2993
|
size: "small"
|
|
3000
2994
|
}, {
|
|
3001
2995
|
default: withCtx(() => [
|
|
3002
|
-
|
|
2996
|
+
createTextVNode("取 消")
|
|
3003
2997
|
]),
|
|
3004
2998
|
_: 1
|
|
3005
2999
|
}),
|
|
3006
|
-
|
|
3000
|
+
hasStep.value && stepActive.value > 1 ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3007
3001
|
key: 0,
|
|
3008
3002
|
type: "info",
|
|
3009
3003
|
size: "small",
|
|
3010
3004
|
onClick: preStep
|
|
3011
3005
|
}, {
|
|
3012
3006
|
default: withCtx(() => [
|
|
3013
|
-
|
|
3007
|
+
createTextVNode("上一步")
|
|
3014
3008
|
]),
|
|
3015
3009
|
_: 1
|
|
3016
3010
|
})) : createCommentVNode("", true),
|
|
3017
|
-
|
|
3011
|
+
hasStep.value && stepCount.value > stepActive.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3018
3012
|
key: 1,
|
|
3019
3013
|
type: "info",
|
|
3020
3014
|
size: "small",
|
|
3021
3015
|
onClick: nextStep
|
|
3022
3016
|
}, {
|
|
3023
3017
|
default: withCtx(() => [
|
|
3024
|
-
|
|
3018
|
+
createTextVNode("下一步")
|
|
3025
3019
|
]),
|
|
3026
3020
|
_: 1
|
|
3027
3021
|
})) : (openBlock(), createBlock(unref(TMagicButton), {
|
|
@@ -3032,7 +3026,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3032
3026
|
onClick: save
|
|
3033
3027
|
}, {
|
|
3034
3028
|
default: withCtx(() => [
|
|
3035
|
-
createTextVNode(toDisplayString(
|
|
3029
|
+
createTextVNode(toDisplayString(_ctx.confirmText), 1)
|
|
3036
3030
|
]),
|
|
3037
3031
|
_: 1
|
|
3038
3032
|
}, 8, ["loading"]))
|
|
@@ -3055,12 +3049,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3055
3049
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3056
3050
|
ref_key: "form",
|
|
3057
3051
|
ref: form,
|
|
3058
|
-
size:
|
|
3059
|
-
disabled:
|
|
3060
|
-
config:
|
|
3061
|
-
"init-values":
|
|
3062
|
-
"parent-values":
|
|
3063
|
-
"label-width":
|
|
3052
|
+
size: _ctx.size,
|
|
3053
|
+
disabled: _ctx.disabled,
|
|
3054
|
+
config: _ctx.config,
|
|
3055
|
+
"init-values": _ctx.values,
|
|
3056
|
+
"parent-values": _ctx.parentValues,
|
|
3057
|
+
"label-width": _ctx.labelWidth,
|
|
3064
3058
|
onChange: changeHandler
|
|
3065
3059
|
}, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width"]),
|
|
3066
3060
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -3077,22 +3071,21 @@ const _hoisted_2 = {
|
|
|
3077
3071
|
key: 2,
|
|
3078
3072
|
class: "m-fields-link"
|
|
3079
3073
|
};
|
|
3080
|
-
const _hoisted_3 = /* @__PURE__ */ createTextVNode("点击编辑");
|
|
3081
|
-
const __default__$9 = defineComponent({
|
|
3082
|
-
name: "MFormLink"
|
|
3083
|
-
});
|
|
3084
3074
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3085
|
-
...
|
|
3075
|
+
...{
|
|
3076
|
+
name: "MFormLink"
|
|
3077
|
+
},
|
|
3078
|
+
__name: "Link",
|
|
3086
3079
|
props: {
|
|
3087
|
-
config:
|
|
3088
|
-
model:
|
|
3089
|
-
initValues:
|
|
3090
|
-
values:
|
|
3091
|
-
name:
|
|
3092
|
-
prop:
|
|
3080
|
+
config: {},
|
|
3081
|
+
model: {},
|
|
3082
|
+
initValues: {},
|
|
3083
|
+
values: {},
|
|
3084
|
+
name: {},
|
|
3085
|
+
prop: {},
|
|
3093
3086
|
disabled: { type: Boolean },
|
|
3094
|
-
size:
|
|
3095
|
-
lastValues:
|
|
3087
|
+
size: {},
|
|
3088
|
+
lastValues: {}
|
|
3096
3089
|
},
|
|
3097
3090
|
emits: ["change"],
|
|
3098
3091
|
setup(__props, { emit }) {
|
|
@@ -3141,34 +3134,34 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3141
3134
|
editor.value && (editor.value.dialogVisible = false);
|
|
3142
3135
|
};
|
|
3143
3136
|
return (_ctx, _cache) => {
|
|
3144
|
-
return
|
|
3137
|
+
return _ctx.config.href && !_ctx.disabled ? (openBlock(), createElementBlock("a", {
|
|
3145
3138
|
key: 0,
|
|
3146
3139
|
target: "_blank",
|
|
3147
|
-
href:
|
|
3148
|
-
style: normalizeStyle(
|
|
3149
|
-
}, toDisplayString(
|
|
3140
|
+
href: href.value,
|
|
3141
|
+
style: normalizeStyle(_ctx.config.css || {})
|
|
3142
|
+
}, toDisplayString(displayText.value), 13, _hoisted_1$2)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
3150
3143
|
key: 1,
|
|
3151
|
-
style: normalizeStyle(
|
|
3152
|
-
}, toDisplayString(
|
|
3144
|
+
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
3145
|
+
}, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
3153
3146
|
createVNode(unref(TMagicButton), {
|
|
3154
3147
|
text: true,
|
|
3155
3148
|
type: "primary",
|
|
3156
3149
|
onClick: editHandler
|
|
3157
3150
|
}, {
|
|
3158
3151
|
default: withCtx(() => [
|
|
3159
|
-
|
|
3152
|
+
createTextVNode("点击编辑")
|
|
3160
3153
|
]),
|
|
3161
3154
|
_: 1
|
|
3162
3155
|
}),
|
|
3163
3156
|
createVNode(_sfc_main$a, {
|
|
3164
3157
|
ref_key: "editor",
|
|
3165
3158
|
ref: editor,
|
|
3166
|
-
title:
|
|
3167
|
-
width:
|
|
3159
|
+
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
3160
|
+
width: _ctx.config.formWidth,
|
|
3168
3161
|
values: formValue.value,
|
|
3169
|
-
config:
|
|
3170
|
-
parentValues:
|
|
3171
|
-
fullscreen:
|
|
3162
|
+
config: formConfig.value,
|
|
3163
|
+
parentValues: _ctx.values,
|
|
3164
|
+
fullscreen: _ctx.config.fullscreen,
|
|
3172
3165
|
onSubmit: action
|
|
3173
3166
|
}, null, 8, ["title", "width", "values", "config", "parentValues", "fullscreen"])
|
|
3174
3167
|
]));
|
|
@@ -3176,21 +3169,21 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3176
3169
|
}
|
|
3177
3170
|
});
|
|
3178
3171
|
|
|
3179
|
-
const __default__$8 = defineComponent({
|
|
3180
|
-
name: "MFormNumber"
|
|
3181
|
-
});
|
|
3182
3172
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3183
|
-
...
|
|
3173
|
+
...{
|
|
3174
|
+
name: "MFormNumber"
|
|
3175
|
+
},
|
|
3176
|
+
__name: "Number",
|
|
3184
3177
|
props: {
|
|
3185
|
-
config:
|
|
3186
|
-
model:
|
|
3187
|
-
initValues:
|
|
3188
|
-
values:
|
|
3189
|
-
name:
|
|
3190
|
-
prop:
|
|
3178
|
+
config: {},
|
|
3179
|
+
model: {},
|
|
3180
|
+
initValues: {},
|
|
3181
|
+
values: {},
|
|
3182
|
+
name: {},
|
|
3183
|
+
prop: {},
|
|
3191
3184
|
disabled: { type: Boolean },
|
|
3192
|
-
size:
|
|
3193
|
-
lastValues:
|
|
3185
|
+
size: {},
|
|
3186
|
+
lastValues: {}
|
|
3194
3187
|
},
|
|
3195
3188
|
emits: ["change", "input"],
|
|
3196
3189
|
setup(__props, { emit }) {
|
|
@@ -3205,18 +3198,18 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3205
3198
|
mForm?.$emit("field-input", props.prop, v);
|
|
3206
3199
|
};
|
|
3207
3200
|
return (_ctx, _cache) => {
|
|
3208
|
-
return
|
|
3201
|
+
return _ctx.model ? (openBlock(), createBlock(unref(TMagicInputNumber), {
|
|
3209
3202
|
key: 0,
|
|
3210
|
-
modelValue:
|
|
3211
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3203
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3204
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3212
3205
|
clearable: "",
|
|
3213
3206
|
"controls-position": "right",
|
|
3214
|
-
size:
|
|
3215
|
-
max:
|
|
3216
|
-
min:
|
|
3217
|
-
step:
|
|
3218
|
-
placeholder:
|
|
3219
|
-
disabled:
|
|
3207
|
+
size: _ctx.size,
|
|
3208
|
+
max: _ctx.config.max,
|
|
3209
|
+
min: _ctx.config.min,
|
|
3210
|
+
step: _ctx.config.step,
|
|
3211
|
+
placeholder: _ctx.config.placeholder,
|
|
3212
|
+
disabled: _ctx.disabled,
|
|
3220
3213
|
onChange: changeHandler,
|
|
3221
3214
|
onInput: inputHandler
|
|
3222
3215
|
}, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("", true);
|
|
@@ -3224,21 +3217,21 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3224
3217
|
}
|
|
3225
3218
|
});
|
|
3226
3219
|
|
|
3227
|
-
const __default__$7 = defineComponent({
|
|
3228
|
-
name: "MFormRadioGroup"
|
|
3229
|
-
});
|
|
3230
3220
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3231
|
-
...
|
|
3221
|
+
...{
|
|
3222
|
+
name: "MFormRadioGroup"
|
|
3223
|
+
},
|
|
3224
|
+
__name: "RadioGroup",
|
|
3232
3225
|
props: {
|
|
3233
|
-
config:
|
|
3234
|
-
model:
|
|
3235
|
-
initValues:
|
|
3236
|
-
values:
|
|
3237
|
-
name:
|
|
3238
|
-
prop:
|
|
3226
|
+
config: {},
|
|
3227
|
+
model: {},
|
|
3228
|
+
initValues: {},
|
|
3229
|
+
values: {},
|
|
3230
|
+
name: {},
|
|
3231
|
+
prop: {},
|
|
3239
3232
|
disabled: { type: Boolean },
|
|
3240
|
-
size:
|
|
3241
|
-
lastValues:
|
|
3233
|
+
size: {},
|
|
3234
|
+
lastValues: {}
|
|
3242
3235
|
},
|
|
3243
3236
|
emits: ["change"],
|
|
3244
3237
|
setup(__props, { emit }) {
|
|
@@ -3248,16 +3241,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3248
3241
|
};
|
|
3249
3242
|
useAddField(props.prop);
|
|
3250
3243
|
return (_ctx, _cache) => {
|
|
3251
|
-
return
|
|
3244
|
+
return _ctx.model ? (openBlock(), createBlock(unref(TMagicRadioGroup), {
|
|
3252
3245
|
key: 0,
|
|
3253
|
-
modelValue:
|
|
3254
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3255
|
-
size:
|
|
3256
|
-
disabled:
|
|
3246
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3247
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3248
|
+
size: _ctx.size,
|
|
3249
|
+
disabled: _ctx.disabled,
|
|
3257
3250
|
onChange: changeHandler
|
|
3258
3251
|
}, {
|
|
3259
3252
|
default: withCtx(() => [
|
|
3260
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3253
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.options, (option) => {
|
|
3261
3254
|
return openBlock(), createBlock(unref(TMagicRadio), {
|
|
3262
3255
|
label: option.value,
|
|
3263
3256
|
value: option.value,
|
|
@@ -3276,18 +3269,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3276
3269
|
}
|
|
3277
3270
|
});
|
|
3278
3271
|
|
|
3279
|
-
const __default__$6 = defineComponent({
|
|
3280
|
-
name: "MFormSelectOptionGroups"
|
|
3281
|
-
});
|
|
3282
3272
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3283
|
-
...
|
|
3273
|
+
...{
|
|
3274
|
+
name: "MFormSelectOptionGroups"
|
|
3275
|
+
},
|
|
3276
|
+
__name: "SelectOptionGroups",
|
|
3284
3277
|
props: {
|
|
3285
|
-
options:
|
|
3278
|
+
options: {}
|
|
3286
3279
|
},
|
|
3287
3280
|
setup(__props) {
|
|
3288
|
-
const uiComponent = getConfig$1("components").option;
|
|
3281
|
+
const uiComponent = getConfig$1("components")?.option.component || "el-option";
|
|
3289
3282
|
return (_ctx, _cache) => {
|
|
3290
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3283
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (group, index) => {
|
|
3291
3284
|
return openBlock(), createBlock(unref(TMagicOptionGroup), {
|
|
3292
3285
|
key: index,
|
|
3293
3286
|
label: group.label,
|
|
@@ -3295,7 +3288,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3295
3288
|
}, {
|
|
3296
3289
|
default: withCtx(() => [
|
|
3297
3290
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
|
|
3298
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent)
|
|
3291
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent)), {
|
|
3299
3292
|
key: index2,
|
|
3300
3293
|
label: item.label || item.text,
|
|
3301
3294
|
value: item.value,
|
|
@@ -3310,22 +3303,22 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3310
3303
|
}
|
|
3311
3304
|
});
|
|
3312
3305
|
|
|
3313
|
-
const __default__$5 = defineComponent({
|
|
3314
|
-
name: "MFormSelectOptions"
|
|
3315
|
-
});
|
|
3316
3306
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3317
|
-
...
|
|
3307
|
+
...{
|
|
3308
|
+
name: "MFormSelectOptions"
|
|
3309
|
+
},
|
|
3310
|
+
__name: "SelectOptions",
|
|
3318
3311
|
props: {
|
|
3319
|
-
options:
|
|
3320
|
-
valueKey:
|
|
3312
|
+
options: {},
|
|
3313
|
+
valueKey: {}
|
|
3321
3314
|
},
|
|
3322
3315
|
setup(__props) {
|
|
3323
3316
|
return (_ctx, _cache) => {
|
|
3324
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3317
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
|
|
3325
3318
|
return openBlock(), createBlock(unref(TMagicOption), {
|
|
3326
3319
|
label: option.text,
|
|
3327
3320
|
value: option.value,
|
|
3328
|
-
key:
|
|
3321
|
+
key: _ctx.valueKey ? option.value[_ctx.valueKey] : option.value,
|
|
3329
3322
|
disabled: option.disabled
|
|
3330
3323
|
}, null, 8, ["label", "value", "disabled"]);
|
|
3331
3324
|
}), 128);
|
|
@@ -3334,21 +3327,21 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3334
3327
|
});
|
|
3335
3328
|
|
|
3336
3329
|
const _hoisted_1$1 = { key: 2 };
|
|
3337
|
-
const __default__$4 = defineComponent({
|
|
3338
|
-
name: "MFormSelect"
|
|
3339
|
-
});
|
|
3340
3330
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3341
|
-
...
|
|
3331
|
+
...{
|
|
3332
|
+
name: "MFormSelect"
|
|
3333
|
+
},
|
|
3334
|
+
__name: "Select",
|
|
3342
3335
|
props: {
|
|
3343
|
-
config:
|
|
3344
|
-
model:
|
|
3345
|
-
initValues:
|
|
3346
|
-
values:
|
|
3347
|
-
name:
|
|
3348
|
-
prop:
|
|
3336
|
+
config: {},
|
|
3337
|
+
model: {},
|
|
3338
|
+
initValues: {},
|
|
3339
|
+
values: {},
|
|
3340
|
+
name: {},
|
|
3341
|
+
prop: {},
|
|
3349
3342
|
disabled: { type: Boolean },
|
|
3350
|
-
size:
|
|
3351
|
-
lastValues:
|
|
3343
|
+
size: {},
|
|
3344
|
+
lastValues: {}
|
|
3352
3345
|
},
|
|
3353
3346
|
emits: ["change"],
|
|
3354
3347
|
setup(__props, { emit }) {
|
|
@@ -3376,12 +3369,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3376
3369
|
return value === v;
|
|
3377
3370
|
};
|
|
3378
3371
|
const mapOptions = (data) => {
|
|
3379
|
-
const {
|
|
3380
|
-
|
|
3381
|
-
|
|
3372
|
+
const {
|
|
3373
|
+
option = {
|
|
3374
|
+
text: "text",
|
|
3375
|
+
value: "value"
|
|
3376
|
+
}
|
|
3377
|
+
} = props.config;
|
|
3378
|
+
const { text = "text", value = "value" } = option;
|
|
3382
3379
|
return data.map((item) => ({
|
|
3383
|
-
text: typeof text === "function" ? text(item) : item[text
|
|
3384
|
-
value: typeof value === "function" ? value(item) : item[value
|
|
3380
|
+
text: typeof text === "function" ? text(item) : item[text],
|
|
3381
|
+
value: typeof value === "function" ? value(item) : item[value]
|
|
3385
3382
|
}));
|
|
3386
3383
|
};
|
|
3387
3384
|
const getOptions = async () => {
|
|
@@ -3392,8 +3389,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3392
3389
|
}
|
|
3393
3390
|
loading.value = true;
|
|
3394
3391
|
let items = [];
|
|
3395
|
-
const {
|
|
3396
|
-
|
|
3392
|
+
const { option } = props.config;
|
|
3393
|
+
if (!option)
|
|
3394
|
+
return [];
|
|
3397
3395
|
const { root = "", totalKey = "total" } = option;
|
|
3398
3396
|
let { body = {}, url } = option;
|
|
3399
3397
|
if (typeof url === "function") {
|
|
@@ -3440,11 +3438,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3440
3438
|
postOptions
|
|
3441
3439
|
});
|
|
3442
3440
|
}
|
|
3443
|
-
const optionsData = root
|
|
3444
|
-
const resTotal = globalThis.parseInt(
|
|
3445
|
-
totalKey.split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res),
|
|
3446
|
-
10
|
|
3447
|
-
);
|
|
3441
|
+
const optionsData = getValueByKeyPath(root, res);
|
|
3442
|
+
const resTotal = globalThis.parseInt(getValueByKeyPath(totalKey, res), 10);
|
|
3448
3443
|
if (resTotal > 0) {
|
|
3449
3444
|
total.value = resTotal;
|
|
3450
3445
|
}
|
|
@@ -3493,8 +3488,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3493
3488
|
const getInitOption = async () => {
|
|
3494
3489
|
if (!props.model)
|
|
3495
3490
|
return [];
|
|
3496
|
-
const {
|
|
3497
|
-
|
|
3491
|
+
const { option } = props.config;
|
|
3492
|
+
if (!option)
|
|
3493
|
+
return [];
|
|
3498
3494
|
const { root = "", initRoot = "" } = option;
|
|
3499
3495
|
let { initBody = {} } = option;
|
|
3500
3496
|
let options2 = [];
|
|
@@ -3544,7 +3540,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3544
3540
|
postOptions
|
|
3545
3541
|
});
|
|
3546
3542
|
}
|
|
3547
|
-
let initData = (initRoot || root
|
|
3543
|
+
let initData = getValueByKeyPath(initRoot || root, res);
|
|
3548
3544
|
if (initData) {
|
|
3549
3545
|
if (!Array.isArray(initData)) {
|
|
3550
3546
|
initData = [initData];
|
|
@@ -3649,29 +3645,29 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3649
3645
|
const groupOptions = options;
|
|
3650
3646
|
return (_ctx, _cache) => {
|
|
3651
3647
|
const _directive_loading = resolveDirective("loading");
|
|
3652
|
-
return
|
|
3648
|
+
return _ctx.model ? withDirectives((openBlock(), createBlock(unref(TMagicSelect), {
|
|
3653
3649
|
key: 0,
|
|
3654
|
-
modelValue:
|
|
3655
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3650
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3651
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3656
3652
|
class: "m-select",
|
|
3657
3653
|
ref_key: "tMagicSelect",
|
|
3658
3654
|
ref: tMagicSelect,
|
|
3659
|
-
clearable: typeof
|
|
3660
|
-
filterable: typeof
|
|
3655
|
+
clearable: typeof _ctx.config.clearable !== "undefined" ? _ctx.config.clearable : true,
|
|
3656
|
+
filterable: typeof _ctx.config.filterable !== "undefined" ? _ctx.config.filterable : true,
|
|
3661
3657
|
"popper-class": `m-select-popper ${unref(popperClass)}`,
|
|
3662
|
-
size:
|
|
3658
|
+
size: _ctx.size,
|
|
3663
3659
|
remote: remote.value,
|
|
3664
|
-
placeholder:
|
|
3665
|
-
multiple:
|
|
3666
|
-
"value-key":
|
|
3667
|
-
"allow-create":
|
|
3668
|
-
disabled:
|
|
3669
|
-
"remote-method":
|
|
3660
|
+
placeholder: _ctx.config.placeholder,
|
|
3661
|
+
multiple: _ctx.config.multiple,
|
|
3662
|
+
"value-key": _ctx.config.valueKey || "value",
|
|
3663
|
+
"allow-create": _ctx.config.allowCreate,
|
|
3664
|
+
disabled: _ctx.disabled,
|
|
3665
|
+
"remote-method": _ctx.config.remote && remoteMethod,
|
|
3670
3666
|
onChange: changeHandler,
|
|
3671
3667
|
onVisibleChange: visibleHandler
|
|
3672
3668
|
}, {
|
|
3673
3669
|
default: withCtx(() => [
|
|
3674
|
-
|
|
3670
|
+
_ctx.config.group ? (openBlock(), createBlock(_sfc_main$6, {
|
|
3675
3671
|
key: 0,
|
|
3676
3672
|
options: unref(groupOptions)
|
|
3677
3673
|
}, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$5, {
|
|
@@ -3690,21 +3686,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3690
3686
|
}
|
|
3691
3687
|
});
|
|
3692
3688
|
|
|
3693
|
-
const __default__$3 = defineComponent({
|
|
3694
|
-
name: "MFormSwitch"
|
|
3695
|
-
});
|
|
3696
3689
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3697
|
-
...
|
|
3690
|
+
...{
|
|
3691
|
+
name: "MFormSwitch"
|
|
3692
|
+
},
|
|
3693
|
+
__name: "Switch",
|
|
3698
3694
|
props: {
|
|
3699
|
-
config:
|
|
3700
|
-
model:
|
|
3701
|
-
initValues:
|
|
3702
|
-
values:
|
|
3703
|
-
name:
|
|
3704
|
-
prop:
|
|
3695
|
+
config: {},
|
|
3696
|
+
model: {},
|
|
3697
|
+
initValues: {},
|
|
3698
|
+
values: {},
|
|
3699
|
+
name: {},
|
|
3700
|
+
prop: {},
|
|
3705
3701
|
disabled: { type: Boolean },
|
|
3706
|
-
size:
|
|
3707
|
-
lastValues:
|
|
3702
|
+
size: {},
|
|
3703
|
+
lastValues: {}
|
|
3708
3704
|
},
|
|
3709
3705
|
emits: ["change"],
|
|
3710
3706
|
setup(__props, { emit }) {
|
|
@@ -3735,12 +3731,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3735
3731
|
});
|
|
3736
3732
|
return (_ctx, _cache) => {
|
|
3737
3733
|
return openBlock(), createBlock(unref(TMagicSwitch), {
|
|
3738
|
-
modelValue:
|
|
3739
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3740
|
-
size:
|
|
3741
|
-
activeValue:
|
|
3742
|
-
inactiveValue:
|
|
3743
|
-
disabled:
|
|
3734
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3735
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3736
|
+
size: _ctx.size,
|
|
3737
|
+
activeValue: activeValue.value,
|
|
3738
|
+
inactiveValue: inactiveValue.value,
|
|
3739
|
+
disabled: _ctx.disabled,
|
|
3744
3740
|
onChange: changeHandler
|
|
3745
3741
|
}, null, 8, ["modelValue", "size", "activeValue", "inactiveValue", "disabled"]);
|
|
3746
3742
|
};
|
|
@@ -3748,21 +3744,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3748
3744
|
});
|
|
3749
3745
|
|
|
3750
3746
|
const _hoisted_1 = { key: 0 };
|
|
3751
|
-
const __default__$2 = defineComponent({
|
|
3752
|
-
name: "MFormText"
|
|
3753
|
-
});
|
|
3754
3747
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3755
|
-
...
|
|
3748
|
+
...{
|
|
3749
|
+
name: "MFormText"
|
|
3750
|
+
},
|
|
3751
|
+
__name: "Text",
|
|
3756
3752
|
props: {
|
|
3757
|
-
config:
|
|
3758
|
-
model:
|
|
3759
|
-
initValues:
|
|
3760
|
-
values:
|
|
3761
|
-
name:
|
|
3762
|
-
prop:
|
|
3753
|
+
config: {},
|
|
3754
|
+
model: {},
|
|
3755
|
+
initValues: {},
|
|
3756
|
+
values: {},
|
|
3757
|
+
name: {},
|
|
3758
|
+
prop: {},
|
|
3763
3759
|
disabled: { type: Boolean },
|
|
3764
|
-
size:
|
|
3765
|
-
lastValues:
|
|
3760
|
+
size: {},
|
|
3761
|
+
lastValues: {}
|
|
3766
3762
|
},
|
|
3767
3763
|
emits: ["change", "input"],
|
|
3768
3764
|
setup(__props, { emit }) {
|
|
@@ -3839,53 +3835,54 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3839
3835
|
};
|
|
3840
3836
|
return (_ctx, _cache) => {
|
|
3841
3837
|
return openBlock(), createBlock(unref(TMagicInput), {
|
|
3842
|
-
modelValue:
|
|
3843
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3838
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3839
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3844
3840
|
clearable: "",
|
|
3845
|
-
size:
|
|
3846
|
-
placeholder:
|
|
3847
|
-
disabled:
|
|
3841
|
+
size: _ctx.size,
|
|
3842
|
+
placeholder: _ctx.config.placeholder,
|
|
3843
|
+
disabled: _ctx.disabled,
|
|
3848
3844
|
onChange: changeHandler,
|
|
3849
3845
|
onInput: inputHandler,
|
|
3850
3846
|
onKeyup: _cache[1] || (_cache[1] = ($event) => keyUpHandler($event))
|
|
3851
3847
|
}, createSlots({ _: 2 }, [
|
|
3852
|
-
|
|
3848
|
+
_ctx.config.append ? {
|
|
3853
3849
|
name: "append",
|
|
3854
3850
|
fn: withCtx(() => [
|
|
3855
|
-
typeof
|
|
3856
|
-
typeof
|
|
3851
|
+
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.config.append), 1)) : createCommentVNode("", true),
|
|
3852
|
+
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3857
3853
|
key: 1,
|
|
3858
3854
|
style: { "color": "#409eff" },
|
|
3859
|
-
size:
|
|
3855
|
+
size: _ctx.size,
|
|
3860
3856
|
onClick: withModifiers(buttonClickHandler, ["prevent"])
|
|
3861
3857
|
}, {
|
|
3862
3858
|
default: withCtx(() => [
|
|
3863
|
-
createTextVNode(toDisplayString(
|
|
3859
|
+
createTextVNode(toDisplayString(_ctx.config.append.text), 1)
|
|
3864
3860
|
]),
|
|
3865
3861
|
_: 1
|
|
3866
3862
|
}, 8, ["size", "onClick"])) : createCommentVNode("", true)
|
|
3867
|
-
])
|
|
3863
|
+
]),
|
|
3864
|
+
key: "0"
|
|
3868
3865
|
} : void 0
|
|
3869
3866
|
]), 1032, ["modelValue", "size", "placeholder", "disabled"]);
|
|
3870
3867
|
};
|
|
3871
3868
|
}
|
|
3872
3869
|
});
|
|
3873
3870
|
|
|
3874
|
-
const __default__$1 = defineComponent({
|
|
3875
|
-
name: "MFormTextarea"
|
|
3876
|
-
});
|
|
3877
3871
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3878
|
-
...
|
|
3872
|
+
...{
|
|
3873
|
+
name: "MFormTextarea"
|
|
3874
|
+
},
|
|
3875
|
+
__name: "Textarea",
|
|
3879
3876
|
props: {
|
|
3880
|
-
config:
|
|
3881
|
-
model:
|
|
3882
|
-
initValues:
|
|
3883
|
-
values:
|
|
3884
|
-
name:
|
|
3885
|
-
prop:
|
|
3877
|
+
config: {},
|
|
3878
|
+
model: {},
|
|
3879
|
+
initValues: {},
|
|
3880
|
+
values: {},
|
|
3881
|
+
name: {},
|
|
3882
|
+
prop: {},
|
|
3886
3883
|
disabled: { type: Boolean },
|
|
3887
|
-
size:
|
|
3888
|
-
lastValues:
|
|
3884
|
+
size: {},
|
|
3885
|
+
lastValues: {}
|
|
3889
3886
|
},
|
|
3890
3887
|
emits: ["change", "input"],
|
|
3891
3888
|
setup(__props, { emit }) {
|
|
@@ -3901,13 +3898,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3901
3898
|
};
|
|
3902
3899
|
return (_ctx, _cache) => {
|
|
3903
3900
|
return openBlock(), createBlock(unref(TMagicInput), {
|
|
3904
|
-
modelValue:
|
|
3905
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
3901
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3902
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3906
3903
|
type: "textarea",
|
|
3907
|
-
size:
|
|
3904
|
+
size: _ctx.size,
|
|
3908
3905
|
clearable: "",
|
|
3909
|
-
placeholder:
|
|
3910
|
-
disabled:
|
|
3906
|
+
placeholder: _ctx.config.placeholder,
|
|
3907
|
+
disabled: _ctx.disabled,
|
|
3911
3908
|
onChange: changeHandler,
|
|
3912
3909
|
onInput: inputHandler
|
|
3913
3910
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled"]);
|
|
@@ -3915,21 +3912,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3915
3912
|
}
|
|
3916
3913
|
});
|
|
3917
3914
|
|
|
3918
|
-
const __default__ = defineComponent({
|
|
3919
|
-
name: "MFormTime"
|
|
3920
|
-
});
|
|
3921
3915
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3922
|
-
...
|
|
3916
|
+
...{
|
|
3917
|
+
name: "MFormTime"
|
|
3918
|
+
},
|
|
3919
|
+
__name: "Time",
|
|
3923
3920
|
props: {
|
|
3924
|
-
config:
|
|
3925
|
-
model:
|
|
3926
|
-
initValues:
|
|
3927
|
-
values:
|
|
3928
|
-
name:
|
|
3929
|
-
prop:
|
|
3921
|
+
config: {},
|
|
3922
|
+
model: {},
|
|
3923
|
+
initValues: {},
|
|
3924
|
+
values: {},
|
|
3925
|
+
name: {},
|
|
3926
|
+
prop: {},
|
|
3930
3927
|
disabled: { type: Boolean },
|
|
3931
|
-
size:
|
|
3932
|
-
lastValues:
|
|
3928
|
+
size: {},
|
|
3929
|
+
lastValues: {}
|
|
3933
3930
|
},
|
|
3934
3931
|
emits: ["change"],
|
|
3935
3932
|
setup(__props, { emit }) {
|
|
@@ -3940,13 +3937,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3940
3937
|
};
|
|
3941
3938
|
return (_ctx, _cache) => {
|
|
3942
3939
|
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:
|
|
3940
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3941
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3942
|
+
"value-format": _ctx.config.valueFormat || "HH:mm:ss",
|
|
3943
|
+
format: _ctx.config.format || "HH:mm:ss",
|
|
3944
|
+
size: _ctx.size,
|
|
3945
|
+
placeholder: _ctx.config.placeholder,
|
|
3946
|
+
disabled: _ctx.disabled,
|
|
3950
3947
|
onChange: changeHandler
|
|
3951
3948
|
}, null, 8, ["modelValue", "value-format", "format", "size", "placeholder", "disabled"]);
|
|
3952
3949
|
};
|
|
@@ -3956,41 +3953,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3956
3953
|
const index$1 = '';
|
|
3957
3954
|
|
|
3958
3955
|
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
3956
|
const index = {
|
|
3993
|
-
install
|
|
3957
|
+
install(app, opt = {}) {
|
|
3958
|
+
const option = Object.assign(defaultInstallOpt, opt);
|
|
3959
|
+
app.config.globalProperties.$MAGIC_FORM = option;
|
|
3960
|
+
setConfig(option);
|
|
3961
|
+
app.component("m-form", _sfc_main$b);
|
|
3962
|
+
app.component("m-form-dialog", _sfc_main$a);
|
|
3963
|
+
app.component("m-form-container", _sfc_main$v);
|
|
3964
|
+
app.component("m-form-fieldset", _sfc_main$u);
|
|
3965
|
+
app.component("m-form-group-list", _sfc_main$s);
|
|
3966
|
+
app.component("m-form-panel", _sfc_main$r);
|
|
3967
|
+
app.component("m-form-row", _sfc_main$p);
|
|
3968
|
+
app.component("m-form-step", _sfc_main$o);
|
|
3969
|
+
app.component("m-form-table", _sfc_main$n);
|
|
3970
|
+
app.component("m-form-tab", _sfc_main$m);
|
|
3971
|
+
app.component("m-fields-text", _sfc_main$2);
|
|
3972
|
+
app.component("m-fields-number", _sfc_main$8);
|
|
3973
|
+
app.component("m-fields-textarea", _sfc_main$1);
|
|
3974
|
+
app.component("m-fields-hidden", _sfc_main$c);
|
|
3975
|
+
app.component("m-fields-date", _sfc_main$h);
|
|
3976
|
+
app.component("m-fields-datetime", _sfc_main$f);
|
|
3977
|
+
app.component("m-fields-daterange", _sfc_main$g);
|
|
3978
|
+
app.component("m-fields-time", _sfc_main);
|
|
3979
|
+
app.component("m-fields-checkbox", _sfc_main$k);
|
|
3980
|
+
app.component("m-fields-switch", _sfc_main$3);
|
|
3981
|
+
app.component("m-fields-color-picker", _sfc_main$i);
|
|
3982
|
+
app.component("m-fields-checkbox-group", _sfc_main$j);
|
|
3983
|
+
app.component("m-fields-radio-group", _sfc_main$7);
|
|
3984
|
+
app.component("m-fields-display", _sfc_main$e);
|
|
3985
|
+
app.component("m-fields-link", _sfc_main$9);
|
|
3986
|
+
app.component("m-fields-select", _sfc_main$4);
|
|
3987
|
+
app.component("m-fields-cascader", _sfc_main$l);
|
|
3988
|
+
app.component("m-fields-dynamic-field", _sfc_main$d);
|
|
3989
|
+
}
|
|
3994
3990
|
};
|
|
3995
3991
|
|
|
3996
3992
|
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 };
|