@tmagic/form 1.7.0-beta.1 → 1.7.0-beta.2
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 +68 -51
- package/dist/tmagic-form.umd.cjs +67 -50
- package/package.json +4 -4
- package/src/FormBox.vue +2 -1
- package/src/FormDialog.vue +3 -2
- package/src/FormDrawer.vue +3 -2
- package/src/containers/Container.vue +1 -4
- package/src/fields/Daterange.vue +34 -20
- package/src/table/Table.vue +5 -6
- package/types/index.d.ts +26 -26
package/dist/tmagic-form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRaw, defineComponent, inject, ref, computed, watchEffect, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, createCommentVNode, mergeProps, resolveDynamicComponent, Fragment, createVNode, unref, withCtx, createElementVNode, renderList, createTextVNode, toDisplayString, readonly, withDirectives, vShow, renderSlot, getCurrentInstance, createSlots, reactive, onBeforeUnmount, vModelText, useTemplateRef, provide, shallowRef, onBeforeMount, nextTick, resolveDirective, withModifiers, Teleport, h } from 'vue';
|
|
1
|
+
import { toRaw, defineComponent, inject, ref, computed, watchEffect, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, createCommentVNode, mergeProps, resolveDynamicComponent, Fragment, createVNode, unref, withCtx, createElementVNode, renderList, createTextVNode, toDisplayString, readonly, withDirectives, vShow, renderSlot, getCurrentInstance, createSlots, onUnmounted, reactive, onBeforeUnmount, vModelText, useTemplateRef, provide, shallowRef, onBeforeMount, nextTick, resolveDirective, withModifiers, Teleport, h } from 'vue';
|
|
2
2
|
import { WarningFilled, CaretBottom, CaretRight, Delete, DocumentCopy, CaretTop, Position, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
|
|
3
3
|
import { cloneDeep, isEqual, isEmpty, debounce } from 'lodash-es';
|
|
4
4
|
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicPopover, TMagicInputNumber, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, getDesignConfig, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, tMagicMessage, tMagicMessageBox, TMagicDialog, TMagicRadioButton, TMagicRadio, TMagicRadioGroup, TMagicSelect, TMagicSwitch, TMagicTimePicker, useZIndex, TMagicTable, TMagicUpload, TMagicPagination, TMagicDrawer, TMagicScrollbar } from '@tmagic/design';
|
|
@@ -272,10 +272,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
272
272
|
const items = computed(() => props.config.items);
|
|
273
273
|
const itemProp = computed(() => {
|
|
274
274
|
let n = "";
|
|
275
|
-
|
|
276
|
-
if (names?.[0]) {
|
|
277
|
-
[n] = names;
|
|
278
|
-
} else if (name.value) {
|
|
275
|
+
if (name.value) {
|
|
279
276
|
n = name.value;
|
|
280
277
|
} else {
|
|
281
278
|
return props.prop;
|
|
@@ -2382,7 +2379,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2382
2379
|
const value = ref([]);
|
|
2383
2380
|
if (props.model !== void 0) {
|
|
2384
2381
|
if (names?.length) {
|
|
2385
|
-
watch(
|
|
2382
|
+
const unWatch = watch(
|
|
2386
2383
|
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
2387
2384
|
([start, end], [preStart, preEnd]) => {
|
|
2388
2385
|
if (!value.value) {
|
|
@@ -2397,8 +2394,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2397
2394
|
immediate: true
|
|
2398
2395
|
}
|
|
2399
2396
|
);
|
|
2397
|
+
onUnmounted(() => {
|
|
2398
|
+
unWatch();
|
|
2399
|
+
});
|
|
2400
2400
|
} else if (props.name && props.model[props.name]) {
|
|
2401
|
-
watch(
|
|
2401
|
+
const unWatch = watch(
|
|
2402
2402
|
() => props.model[props.name],
|
|
2403
2403
|
(start, preStart) => {
|
|
2404
2404
|
const format = `${props.config.dateFormat || "YYYY/MM/DD"} ${props.config.timeFormat || "HH:mm:ss"}`;
|
|
@@ -2411,29 +2411,38 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2411
2411
|
immediate: true
|
|
2412
2412
|
}
|
|
2413
2413
|
);
|
|
2414
|
+
onUnmounted(() => {
|
|
2415
|
+
unWatch();
|
|
2416
|
+
});
|
|
2414
2417
|
}
|
|
2415
2418
|
}
|
|
2416
|
-
const setValue = (v) => {
|
|
2417
|
-
names?.forEach((item, index) => {
|
|
2418
|
-
if (!props.model) {
|
|
2419
|
-
return;
|
|
2420
|
-
}
|
|
2421
|
-
if (Array.isArray(v)) {
|
|
2422
|
-
props.model[item] = v[index];
|
|
2423
|
-
} else {
|
|
2424
|
-
props.model[item] = void 0;
|
|
2425
|
-
}
|
|
2426
|
-
});
|
|
2427
|
-
};
|
|
2428
2419
|
const changeHandler = (v) => {
|
|
2429
2420
|
const value2 = v || [];
|
|
2430
2421
|
if (props.name) {
|
|
2431
2422
|
emit("change", value2);
|
|
2432
2423
|
} else {
|
|
2433
|
-
if (names?.length) {
|
|
2434
|
-
|
|
2424
|
+
if (props.config.names?.length) {
|
|
2425
|
+
const newChangeRecords = [];
|
|
2426
|
+
props.config.names.forEach((item, index) => {
|
|
2427
|
+
if (!props.model) {
|
|
2428
|
+
return;
|
|
2429
|
+
}
|
|
2430
|
+
if (Array.isArray(v)) {
|
|
2431
|
+
newChangeRecords.push({
|
|
2432
|
+
propPath: props.prop ? `${props.prop}.${item}` : item,
|
|
2433
|
+
value: v[index]
|
|
2434
|
+
});
|
|
2435
|
+
} else {
|
|
2436
|
+
newChangeRecords.push({
|
|
2437
|
+
propPath: props.prop ? `${props.prop}.${item}` : item,
|
|
2438
|
+
value: void 0
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
});
|
|
2442
|
+
emit("change", props.model, {
|
|
2443
|
+
changeRecords: newChangeRecords
|
|
2444
|
+
});
|
|
2435
2445
|
}
|
|
2436
|
-
emit("change", props.model);
|
|
2437
2446
|
}
|
|
2438
2447
|
};
|
|
2439
2448
|
return (_ctx, _cache) => {
|
|
@@ -2447,11 +2456,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2447
2456
|
"unlink-panels": true,
|
|
2448
2457
|
disabled: __props.disabled,
|
|
2449
2458
|
"default-time": __props.config.defaultTime,
|
|
2459
|
+
format: `${__props.config.dateFormat || "YYYY/MM/DD"} ${__props.config.timeFormat || "HH:mm:ss"}`,
|
|
2450
2460
|
"value-format": __props.config.valueFormat || "YYYY/MM/DD HH:mm:ss",
|
|
2451
2461
|
"date-format": __props.config.dateFormat || "YYYY/MM/DD",
|
|
2452
2462
|
"time-format": __props.config.timeFormat || "HH:mm:ss",
|
|
2453
2463
|
"onUpdate:modelValue": changeHandler
|
|
2454
|
-
}, null, 8, ["model-value", "size", "disabled", "default-time", "value-format", "date-format", "time-format"]);
|
|
2464
|
+
}, null, 8, ["model-value", "size", "disabled", "default-time", "format", "value-format", "date-format", "time-format"]);
|
|
2455
2465
|
};
|
|
2456
2466
|
}
|
|
2457
2467
|
});
|
|
@@ -2960,8 +2970,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2960
2970
|
};
|
|
2961
2971
|
const save = async () => {
|
|
2962
2972
|
try {
|
|
2973
|
+
const changeRecords = form.value?.changeRecords;
|
|
2963
2974
|
const values = await form.value?.submitForm();
|
|
2964
|
-
emit("submit", values, { changeRecords
|
|
2975
|
+
emit("submit", values, { changeRecords });
|
|
2965
2976
|
} catch (e) {
|
|
2966
2977
|
emit("error", e);
|
|
2967
2978
|
}
|
|
@@ -3026,6 +3037,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3026
3037
|
default: withCtx(() => [
|
|
3027
3038
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
3028
3039
|
createVNode(unref(TMagicButton), {
|
|
3040
|
+
type: "default",
|
|
3029
3041
|
onClick: cancel,
|
|
3030
3042
|
size: "small"
|
|
3031
3043
|
}, {
|
|
@@ -5105,33 +5117,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5105
5117
|
}, 8, ["disabled"]),
|
|
5106
5118
|
renderSlot(_ctx.$slots, "default"),
|
|
5107
5119
|
createElementVNode("div", _hoisted_3, [
|
|
5108
|
-
unref(addable) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5109
|
-
key: 0,
|
|
5110
|
-
size: "small",
|
|
5111
|
-
type: "primary",
|
|
5112
|
-
disabled: __props.disabled,
|
|
5113
|
-
plain: "",
|
|
5114
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(newHandler)())
|
|
5115
|
-
}, {
|
|
5116
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5117
|
-
createTextVNode(
|
|
5118
|
-
"新增一行",
|
|
5119
|
-
-1
|
|
5120
|
-
/* CACHED */
|
|
5121
|
-
)
|
|
5122
|
-
])]),
|
|
5123
|
-
_: 1
|
|
5124
|
-
/* STABLE */
|
|
5125
|
-
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
5126
5120
|
createElementVNode("div", _hoisted_4, [
|
|
5127
5121
|
__props.enableToggleMode && __props.config.enableToggleMode !== false && !unref(isFullscreen) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5128
5122
|
key: 0,
|
|
5129
5123
|
icon: unref(Grid),
|
|
5130
5124
|
size: "small",
|
|
5131
|
-
type: "
|
|
5125
|
+
type: "defalut",
|
|
5132
5126
|
onClick: toggleMode
|
|
5133
5127
|
}, {
|
|
5134
|
-
default: withCtx(() => [..._cache[
|
|
5128
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5135
5129
|
createTextVNode(
|
|
5136
5130
|
"展开配置",
|
|
5137
5131
|
-1
|
|
@@ -5145,7 +5139,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5145
5139
|
key: 1,
|
|
5146
5140
|
icon: unref(FullScreen),
|
|
5147
5141
|
size: "small",
|
|
5148
|
-
type: "
|
|
5142
|
+
type: "defalut",
|
|
5149
5143
|
onClick: unref(toggleFullscreen)
|
|
5150
5144
|
}, {
|
|
5151
5145
|
default: withCtx(() => [
|
|
@@ -5174,7 +5168,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5174
5168
|
disabled: __props.disabled,
|
|
5175
5169
|
plain: ""
|
|
5176
5170
|
}, {
|
|
5177
|
-
default: withCtx(() => [..._cache[
|
|
5171
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
5178
5172
|
createTextVNode(
|
|
5179
5173
|
"导入EXCEL",
|
|
5180
5174
|
-1
|
|
@@ -5196,7 +5190,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5196
5190
|
plain: "",
|
|
5197
5191
|
onClick: unref(clearHandler)
|
|
5198
5192
|
}, {
|
|
5199
|
-
default: withCtx(() => [..._cache[
|
|
5193
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
5200
5194
|
createTextVNode(
|
|
5201
5195
|
"清空",
|
|
5202
5196
|
-1
|
|
@@ -5206,7 +5200,25 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5206
5200
|
_: 1
|
|
5207
5201
|
/* STABLE */
|
|
5208
5202
|
}, 8, ["disabled", "onClick"])) : createCommentVNode("v-if", true)
|
|
5209
|
-
])
|
|
5203
|
+
]),
|
|
5204
|
+
unref(addable) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5205
|
+
key: 0,
|
|
5206
|
+
size: "small",
|
|
5207
|
+
type: "primary",
|
|
5208
|
+
disabled: __props.disabled,
|
|
5209
|
+
plain: "",
|
|
5210
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(newHandler)())
|
|
5211
|
+
}, {
|
|
5212
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
5213
|
+
createTextVNode(
|
|
5214
|
+
"新增一行",
|
|
5215
|
+
-1
|
|
5216
|
+
/* CACHED */
|
|
5217
|
+
)
|
|
5218
|
+
])]),
|
|
5219
|
+
_: 1
|
|
5220
|
+
/* STABLE */
|
|
5221
|
+
}, 8, ["disabled"])) : createCommentVNode("v-if", true)
|
|
5210
5222
|
]),
|
|
5211
5223
|
__props.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
5212
5224
|
createVNode(unref(TMagicPagination), {
|
|
@@ -5269,8 +5281,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5269
5281
|
});
|
|
5270
5282
|
const submitHandler = async () => {
|
|
5271
5283
|
try {
|
|
5284
|
+
const changeRecords = form.value?.changeRecords;
|
|
5272
5285
|
const values = await form.value?.submitForm();
|
|
5273
|
-
emit("submit", values, { changeRecords
|
|
5286
|
+
emit("submit", values, { changeRecords });
|
|
5274
5287
|
} catch (e) {
|
|
5275
5288
|
emit("error", e);
|
|
5276
5289
|
}
|
|
@@ -5345,7 +5358,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5345
5358
|
createVNode(unref(TMagicCol), { span: 12 }, {
|
|
5346
5359
|
default: withCtx(() => [
|
|
5347
5360
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
5348
|
-
createVNode(unref(TMagicButton), {
|
|
5361
|
+
createVNode(unref(TMagicButton), {
|
|
5362
|
+
type: "default",
|
|
5363
|
+
onClick: handleClose
|
|
5364
|
+
}, {
|
|
5349
5365
|
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5350
5366
|
createTextVNode(
|
|
5351
5367
|
"关闭",
|
|
@@ -5464,8 +5480,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5464
5480
|
});
|
|
5465
5481
|
const submitHandler = async () => {
|
|
5466
5482
|
try {
|
|
5483
|
+
const changeRecords = form.value?.changeRecords;
|
|
5467
5484
|
const values = await form.value?.submitForm();
|
|
5468
|
-
emit("submit", values, { changeRecords
|
|
5485
|
+
emit("submit", values, { changeRecords });
|
|
5469
5486
|
} catch (e) {
|
|
5470
5487
|
emit("error", e);
|
|
5471
5488
|
}
|
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -3202,10 +3202,7 @@
|
|
|
3202
3202
|
const items = vue.computed(() => props.config.items);
|
|
3203
3203
|
const itemProp = vue.computed(() => {
|
|
3204
3204
|
let n = "";
|
|
3205
|
-
|
|
3206
|
-
if (names?.[0]) {
|
|
3207
|
-
[n] = names;
|
|
3208
|
-
} else if (name.value) {
|
|
3205
|
+
if (name.value) {
|
|
3209
3206
|
n = name.value;
|
|
3210
3207
|
} else {
|
|
3211
3208
|
return props.prop;
|
|
@@ -5312,7 +5309,7 @@
|
|
|
5312
5309
|
const value = vue.ref([]);
|
|
5313
5310
|
if (props.model !== void 0) {
|
|
5314
5311
|
if (names?.length) {
|
|
5315
|
-
vue.watch(
|
|
5312
|
+
const unWatch = vue.watch(
|
|
5316
5313
|
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
5317
5314
|
([start, end], [preStart, preEnd]) => {
|
|
5318
5315
|
if (!value.value) {
|
|
@@ -5327,8 +5324,11 @@
|
|
|
5327
5324
|
immediate: true
|
|
5328
5325
|
}
|
|
5329
5326
|
);
|
|
5327
|
+
vue.onUnmounted(() => {
|
|
5328
|
+
unWatch();
|
|
5329
|
+
});
|
|
5330
5330
|
} else if (props.name && props.model[props.name]) {
|
|
5331
|
-
vue.watch(
|
|
5331
|
+
const unWatch = vue.watch(
|
|
5332
5332
|
() => props.model[props.name],
|
|
5333
5333
|
(start, preStart) => {
|
|
5334
5334
|
const format = `${props.config.dateFormat || "YYYY/MM/DD"} ${props.config.timeFormat || "HH:mm:ss"}`;
|
|
@@ -5341,29 +5341,38 @@
|
|
|
5341
5341
|
immediate: true
|
|
5342
5342
|
}
|
|
5343
5343
|
);
|
|
5344
|
+
vue.onUnmounted(() => {
|
|
5345
|
+
unWatch();
|
|
5346
|
+
});
|
|
5344
5347
|
}
|
|
5345
5348
|
}
|
|
5346
|
-
const setValue = (v) => {
|
|
5347
|
-
names?.forEach((item, index) => {
|
|
5348
|
-
if (!props.model) {
|
|
5349
|
-
return;
|
|
5350
|
-
}
|
|
5351
|
-
if (Array.isArray(v)) {
|
|
5352
|
-
props.model[item] = v[index];
|
|
5353
|
-
} else {
|
|
5354
|
-
props.model[item] = void 0;
|
|
5355
|
-
}
|
|
5356
|
-
});
|
|
5357
|
-
};
|
|
5358
5349
|
const changeHandler = (v) => {
|
|
5359
5350
|
const value2 = v || [];
|
|
5360
5351
|
if (props.name) {
|
|
5361
5352
|
emit("change", value2);
|
|
5362
5353
|
} else {
|
|
5363
|
-
if (names?.length) {
|
|
5364
|
-
|
|
5354
|
+
if (props.config.names?.length) {
|
|
5355
|
+
const newChangeRecords = [];
|
|
5356
|
+
props.config.names.forEach((item, index) => {
|
|
5357
|
+
if (!props.model) {
|
|
5358
|
+
return;
|
|
5359
|
+
}
|
|
5360
|
+
if (Array.isArray(v)) {
|
|
5361
|
+
newChangeRecords.push({
|
|
5362
|
+
propPath: props.prop ? `${props.prop}.${item}` : item,
|
|
5363
|
+
value: v[index]
|
|
5364
|
+
});
|
|
5365
|
+
} else {
|
|
5366
|
+
newChangeRecords.push({
|
|
5367
|
+
propPath: props.prop ? `${props.prop}.${item}` : item,
|
|
5368
|
+
value: void 0
|
|
5369
|
+
});
|
|
5370
|
+
}
|
|
5371
|
+
});
|
|
5372
|
+
emit("change", props.model, {
|
|
5373
|
+
changeRecords: newChangeRecords
|
|
5374
|
+
});
|
|
5365
5375
|
}
|
|
5366
|
-
emit("change", props.model);
|
|
5367
5376
|
}
|
|
5368
5377
|
};
|
|
5369
5378
|
return (_ctx, _cache) => {
|
|
@@ -5377,11 +5386,12 @@
|
|
|
5377
5386
|
"unlink-panels": true,
|
|
5378
5387
|
disabled: __props.disabled,
|
|
5379
5388
|
"default-time": __props.config.defaultTime,
|
|
5389
|
+
format: `${__props.config.dateFormat || "YYYY/MM/DD"} ${__props.config.timeFormat || "HH:mm:ss"}`,
|
|
5380
5390
|
"value-format": __props.config.valueFormat || "YYYY/MM/DD HH:mm:ss",
|
|
5381
5391
|
"date-format": __props.config.dateFormat || "YYYY/MM/DD",
|
|
5382
5392
|
"time-format": __props.config.timeFormat || "HH:mm:ss",
|
|
5383
5393
|
"onUpdate:modelValue": changeHandler
|
|
5384
|
-
}, null, 8, ["model-value", "size", "disabled", "default-time", "value-format", "date-format", "time-format"]);
|
|
5394
|
+
}, null, 8, ["model-value", "size", "disabled", "default-time", "format", "value-format", "date-format", "time-format"]);
|
|
5385
5395
|
};
|
|
5386
5396
|
}
|
|
5387
5397
|
});
|
|
@@ -5890,8 +5900,9 @@
|
|
|
5890
5900
|
};
|
|
5891
5901
|
const save = async () => {
|
|
5892
5902
|
try {
|
|
5903
|
+
const changeRecords = form.value?.changeRecords;
|
|
5893
5904
|
const values = await form.value?.submitForm();
|
|
5894
|
-
emit("submit", values, { changeRecords
|
|
5905
|
+
emit("submit", values, { changeRecords });
|
|
5895
5906
|
} catch (e) {
|
|
5896
5907
|
emit("error", e);
|
|
5897
5908
|
}
|
|
@@ -5956,6 +5967,7 @@
|
|
|
5956
5967
|
default: vue.withCtx(() => [
|
|
5957
5968
|
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
5958
5969
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
5970
|
+
type: "default",
|
|
5959
5971
|
onClick: cancel,
|
|
5960
5972
|
size: "small"
|
|
5961
5973
|
}, {
|
|
@@ -8035,33 +8047,15 @@
|
|
|
8035
8047
|
}, 8, ["disabled"]),
|
|
8036
8048
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
8037
8049
|
vue.createElementVNode("div", _hoisted_3, [
|
|
8038
|
-
vue.unref(addable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
8039
|
-
key: 0,
|
|
8040
|
-
size: "small",
|
|
8041
|
-
type: "primary",
|
|
8042
|
-
disabled: __props.disabled,
|
|
8043
|
-
plain: "",
|
|
8044
|
-
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(newHandler)())
|
|
8045
|
-
}, {
|
|
8046
|
-
default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
8047
|
-
vue.createTextVNode(
|
|
8048
|
-
"新增一行",
|
|
8049
|
-
-1
|
|
8050
|
-
/* CACHED */
|
|
8051
|
-
)
|
|
8052
|
-
])]),
|
|
8053
|
-
_: 1
|
|
8054
|
-
/* STABLE */
|
|
8055
|
-
}, 8, ["disabled"])) : vue.createCommentVNode("v-if", true),
|
|
8056
8050
|
vue.createElementVNode("div", _hoisted_4, [
|
|
8057
8051
|
__props.enableToggleMode && __props.config.enableToggleMode !== false && !vue.unref(isFullscreen) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
8058
8052
|
key: 0,
|
|
8059
8053
|
icon: vue.unref(iconsVue.Grid),
|
|
8060
8054
|
size: "small",
|
|
8061
|
-
type: "
|
|
8055
|
+
type: "defalut",
|
|
8062
8056
|
onClick: toggleMode
|
|
8063
8057
|
}, {
|
|
8064
|
-
default: vue.withCtx(() => [..._cache[
|
|
8058
|
+
default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
8065
8059
|
vue.createTextVNode(
|
|
8066
8060
|
"展开配置",
|
|
8067
8061
|
-1
|
|
@@ -8075,7 +8069,7 @@
|
|
|
8075
8069
|
key: 1,
|
|
8076
8070
|
icon: vue.unref(iconsVue.FullScreen),
|
|
8077
8071
|
size: "small",
|
|
8078
|
-
type: "
|
|
8072
|
+
type: "defalut",
|
|
8079
8073
|
onClick: vue.unref(toggleFullscreen)
|
|
8080
8074
|
}, {
|
|
8081
8075
|
default: vue.withCtx(() => [
|
|
@@ -8104,7 +8098,7 @@
|
|
|
8104
8098
|
disabled: __props.disabled,
|
|
8105
8099
|
plain: ""
|
|
8106
8100
|
}, {
|
|
8107
|
-
default: vue.withCtx(() => [..._cache[
|
|
8101
|
+
default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
8108
8102
|
vue.createTextVNode(
|
|
8109
8103
|
"导入EXCEL",
|
|
8110
8104
|
-1
|
|
@@ -8126,7 +8120,7 @@
|
|
|
8126
8120
|
plain: "",
|
|
8127
8121
|
onClick: vue.unref(clearHandler)
|
|
8128
8122
|
}, {
|
|
8129
|
-
default: vue.withCtx(() => [..._cache[
|
|
8123
|
+
default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
8130
8124
|
vue.createTextVNode(
|
|
8131
8125
|
"清空",
|
|
8132
8126
|
-1
|
|
@@ -8136,7 +8130,25 @@
|
|
|
8136
8130
|
_: 1
|
|
8137
8131
|
/* STABLE */
|
|
8138
8132
|
}, 8, ["disabled", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
8139
|
-
])
|
|
8133
|
+
]),
|
|
8134
|
+
vue.unref(addable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
8135
|
+
key: 0,
|
|
8136
|
+
size: "small",
|
|
8137
|
+
type: "primary",
|
|
8138
|
+
disabled: __props.disabled,
|
|
8139
|
+
plain: "",
|
|
8140
|
+
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(newHandler)())
|
|
8141
|
+
}, {
|
|
8142
|
+
default: vue.withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
8143
|
+
vue.createTextVNode(
|
|
8144
|
+
"新增一行",
|
|
8145
|
+
-1
|
|
8146
|
+
/* CACHED */
|
|
8147
|
+
)
|
|
8148
|
+
])]),
|
|
8149
|
+
_: 1
|
|
8150
|
+
/* STABLE */
|
|
8151
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("v-if", true)
|
|
8140
8152
|
]),
|
|
8141
8153
|
__props.config.pagination ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
8142
8154
|
vue.createVNode(vue.unref(design.TMagicPagination), {
|
|
@@ -8199,8 +8211,9 @@
|
|
|
8199
8211
|
});
|
|
8200
8212
|
const submitHandler = async () => {
|
|
8201
8213
|
try {
|
|
8214
|
+
const changeRecords = form.value?.changeRecords;
|
|
8202
8215
|
const values = await form.value?.submitForm();
|
|
8203
|
-
emit("submit", values, { changeRecords
|
|
8216
|
+
emit("submit", values, { changeRecords });
|
|
8204
8217
|
} catch (e) {
|
|
8205
8218
|
emit("error", e);
|
|
8206
8219
|
}
|
|
@@ -8275,7 +8288,10 @@
|
|
|
8275
8288
|
vue.createVNode(vue.unref(design.TMagicCol), { span: 12 }, {
|
|
8276
8289
|
default: vue.withCtx(() => [
|
|
8277
8290
|
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
8278
|
-
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
8291
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
8292
|
+
type: "default",
|
|
8293
|
+
onClick: handleClose
|
|
8294
|
+
}, {
|
|
8279
8295
|
default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
8280
8296
|
vue.createTextVNode(
|
|
8281
8297
|
"关闭",
|
|
@@ -8394,8 +8410,9 @@
|
|
|
8394
8410
|
});
|
|
8395
8411
|
const submitHandler = async () => {
|
|
8396
8412
|
try {
|
|
8413
|
+
const changeRecords = form.value?.changeRecords;
|
|
8397
8414
|
const values = await form.value?.submitForm();
|
|
8398
|
-
emit("submit", values, { changeRecords
|
|
8415
|
+
emit("submit", values, { changeRecords });
|
|
8399
8416
|
} catch (e) {
|
|
8400
8417
|
emit("error", e);
|
|
8401
8418
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.0-beta.
|
|
2
|
+
"version": "1.7.0-beta.2",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"vue": "^3.5.22",
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
|
-
"@tmagic/
|
|
55
|
-
"@tmagic/
|
|
56
|
-
"@tmagic/
|
|
54
|
+
"@tmagic/utils": "1.7.0-beta.2",
|
|
55
|
+
"@tmagic/design": "1.7.0-beta.2",
|
|
56
|
+
"@tmagic/form-schema": "1.7.0-beta.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"typescript": {
|
package/src/FormBox.vue
CHANGED
|
@@ -101,8 +101,9 @@ watchEffect(() => {
|
|
|
101
101
|
|
|
102
102
|
const submitHandler = async () => {
|
|
103
103
|
try {
|
|
104
|
+
const changeRecords = form.value?.changeRecords;
|
|
104
105
|
const values = await form.value?.submitForm();
|
|
105
|
-
emit('submit', values, { changeRecords
|
|
106
|
+
emit('submit', values, { changeRecords });
|
|
106
107
|
} catch (e) {
|
|
107
108
|
emit('error', e);
|
|
108
109
|
}
|
package/src/FormDialog.vue
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</TMagicCol>
|
|
43
43
|
<TMagicCol :span="12">
|
|
44
44
|
<slot name="footer">
|
|
45
|
-
<TMagicButton @click="cancel" size="small">取 消</TMagicButton>
|
|
45
|
+
<TMagicButton type="default" @click="cancel" size="small">取 消</TMagicButton>
|
|
46
46
|
<TMagicButton v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
|
47
47
|
>上一步</TMagicButton
|
|
48
48
|
>
|
|
@@ -131,8 +131,9 @@ const closeHandler = () => {
|
|
|
131
131
|
|
|
132
132
|
const save = async () => {
|
|
133
133
|
try {
|
|
134
|
+
const changeRecords = form.value?.changeRecords;
|
|
134
135
|
const values = await form.value?.submitForm();
|
|
135
|
-
emit('submit', values, { changeRecords
|
|
136
|
+
emit('submit', values, { changeRecords });
|
|
136
137
|
} catch (e) {
|
|
137
138
|
emit('error', e);
|
|
138
139
|
}
|
package/src/FormDrawer.vue
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</TMagicCol>
|
|
43
43
|
<TMagicCol :span="12">
|
|
44
44
|
<slot name="footer">
|
|
45
|
-
<TMagicButton @click="handleClose">关闭</TMagicButton>
|
|
45
|
+
<TMagicButton type="default" @click="handleClose">关闭</TMagicButton>
|
|
46
46
|
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
|
47
47
|
confirmText
|
|
48
48
|
}}</TMagicButton>
|
|
@@ -109,8 +109,9 @@ watchEffect(() => {
|
|
|
109
109
|
|
|
110
110
|
const submitHandler = async () => {
|
|
111
111
|
try {
|
|
112
|
+
const changeRecords = form.value?.changeRecords;
|
|
112
113
|
const values = await form.value?.submitForm();
|
|
113
|
-
emit('submit', values, { changeRecords
|
|
114
|
+
emit('submit', values, { changeRecords });
|
|
114
115
|
} catch (e) {
|
|
115
116
|
emit('error', e);
|
|
116
117
|
}
|
|
@@ -208,10 +208,7 @@ const items = computed(() => (props.config as ContainerCommonConfig).items);
|
|
|
208
208
|
|
|
209
209
|
const itemProp = computed(() => {
|
|
210
210
|
let n: string | number = '';
|
|
211
|
-
|
|
212
|
-
if (names?.[0]) {
|
|
213
|
-
[n] = names;
|
|
214
|
-
} else if (name.value) {
|
|
211
|
+
if (name.value) {
|
|
215
212
|
n = name.value;
|
|
216
213
|
} else {
|
|
217
214
|
return props.prop;
|
package/src/fields/Daterange.vue
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
:unlink-panels="true"
|
|
10
10
|
:disabled="disabled"
|
|
11
11
|
:default-time="config.defaultTime"
|
|
12
|
+
:format="`${config.dateFormat || 'YYYY/MM/DD'} ${config.timeFormat || 'HH:mm:ss'}`"
|
|
12
13
|
:value-format="config.valueFormat || 'YYYY/MM/DD HH:mm:ss'"
|
|
13
14
|
:date-format="config.dateFormat || 'YYYY/MM/DD'"
|
|
14
15
|
:time-format="config.timeFormat || 'HH:mm:ss'"
|
|
@@ -17,11 +18,11 @@
|
|
|
17
18
|
</template>
|
|
18
19
|
|
|
19
20
|
<script lang="ts" setup>
|
|
20
|
-
import { ref, watch } from 'vue';
|
|
21
|
+
import { onUnmounted, ref, watch } from 'vue';
|
|
21
22
|
|
|
22
23
|
import { TMagicDatePicker } from '@tmagic/design';
|
|
23
24
|
|
|
24
|
-
import type { DaterangeConfig, FieldProps } from '../schema';
|
|
25
|
+
import type { ChangeRecord, DaterangeConfig, FieldProps } from '../schema';
|
|
25
26
|
import { datetimeFormatter } from '../utils/form';
|
|
26
27
|
import { useAddField } from '../utils/useAddField';
|
|
27
28
|
|
|
@@ -40,7 +41,7 @@ const value = ref<(Date | string | undefined)[] | null>([]);
|
|
|
40
41
|
|
|
41
42
|
if (props.model !== undefined) {
|
|
42
43
|
if (names?.length) {
|
|
43
|
-
watch(
|
|
44
|
+
const unWatch = watch(
|
|
44
45
|
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
45
46
|
([start, end], [preStart, preEnd]) => {
|
|
46
47
|
if (!value.value) {
|
|
@@ -56,8 +57,12 @@ if (props.model !== undefined) {
|
|
|
56
57
|
immediate: true,
|
|
57
58
|
},
|
|
58
59
|
);
|
|
60
|
+
|
|
61
|
+
onUnmounted(() => {
|
|
62
|
+
unWatch();
|
|
63
|
+
});
|
|
59
64
|
} else if (props.name && props.model[props.name]) {
|
|
60
|
-
watch(
|
|
65
|
+
const unWatch = watch(
|
|
61
66
|
() => props.model[props.name],
|
|
62
67
|
(start, preStart) => {
|
|
63
68
|
const format = `${props.config.dateFormat || 'YYYY/MM/DD'} ${props.config.timeFormat || 'HH:mm:ss'}`;
|
|
@@ -71,32 +76,41 @@ if (props.model !== undefined) {
|
|
|
71
76
|
immediate: true,
|
|
72
77
|
},
|
|
73
78
|
);
|
|
79
|
+
onUnmounted(() => {
|
|
80
|
+
unWatch();
|
|
81
|
+
});
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
const setValue = (v: Date[] | Date) => {
|
|
78
|
-
names?.forEach((item, index) => {
|
|
79
|
-
if (!props.model) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
if (Array.isArray(v)) {
|
|
83
|
-
props.model[item] = v[index];
|
|
84
|
-
} else {
|
|
85
|
-
props.model[item] = undefined;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
|
|
90
85
|
const changeHandler = (v: Date[]) => {
|
|
91
86
|
const value = v || [];
|
|
92
87
|
|
|
93
88
|
if (props.name) {
|
|
94
89
|
emit('change', value);
|
|
95
90
|
} else {
|
|
96
|
-
if (names?.length) {
|
|
97
|
-
|
|
91
|
+
if (props.config.names?.length) {
|
|
92
|
+
const newChangeRecords: ChangeRecord[] = [];
|
|
93
|
+
props.config.names.forEach((item, index) => {
|
|
94
|
+
if (!props.model) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (Array.isArray(v)) {
|
|
98
|
+
newChangeRecords.push({
|
|
99
|
+
propPath: props.prop ? `${props.prop}.${item}` : item,
|
|
100
|
+
value: v[index],
|
|
101
|
+
});
|
|
102
|
+
} else {
|
|
103
|
+
newChangeRecords.push({
|
|
104
|
+
propPath: props.prop ? `${props.prop}.${item}` : item,
|
|
105
|
+
value: undefined,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
emit('change', props.model, {
|
|
111
|
+
changeRecords: newChangeRecords,
|
|
112
|
+
});
|
|
98
113
|
}
|
|
99
|
-
emit('change', props.model);
|
|
100
114
|
}
|
|
101
115
|
};
|
|
102
116
|
</script>
|
package/src/table/Table.vue
CHANGED
|
@@ -24,15 +24,11 @@
|
|
|
24
24
|
<slot></slot>
|
|
25
25
|
|
|
26
26
|
<div style="display: flex; justify-content: space-between; margin: 10px 0">
|
|
27
|
-
<TMagicButton v-if="addable" size="small" type="primary" :disabled="disabled" plain @click="newHandler()"
|
|
28
|
-
>新增一行</TMagicButton
|
|
29
|
-
>
|
|
30
|
-
|
|
31
27
|
<div style="display: flex">
|
|
32
28
|
<TMagicButton
|
|
33
29
|
:icon="Grid"
|
|
34
30
|
size="small"
|
|
35
|
-
type="
|
|
31
|
+
type="defalut"
|
|
36
32
|
@click="toggleMode"
|
|
37
33
|
v-if="enableToggleMode && config.enableToggleMode !== false && !isFullscreen"
|
|
38
34
|
>展开配置</TMagicButton
|
|
@@ -40,7 +36,7 @@
|
|
|
40
36
|
<TMagicButton
|
|
41
37
|
:icon="FullScreen"
|
|
42
38
|
size="small"
|
|
43
|
-
type="
|
|
39
|
+
type="defalut"
|
|
44
40
|
@click="toggleFullscreen"
|
|
45
41
|
v-if="config.enableFullscreen !== false"
|
|
46
42
|
>
|
|
@@ -61,6 +57,9 @@
|
|
|
61
57
|
>清空</TMagicButton
|
|
62
58
|
>
|
|
63
59
|
</div>
|
|
60
|
+
<TMagicButton v-if="addable" size="small" type="primary" :disabled="disabled" plain @click="newHandler()"
|
|
61
|
+
>新增一行</TMagicButton
|
|
62
|
+
>
|
|
64
63
|
</div>
|
|
65
64
|
|
|
66
65
|
<div class="bottom" style="text-align: right" v-if="config.pagination">
|
package/types/index.d.ts
CHANGED
|
@@ -67,14 +67,14 @@ declare const __VLS_export$v: _vue_runtime_core.DefineComponent<__VLS_Props$u, {
|
|
|
67
67
|
submitForm: (native?: boolean) => Promise<any>;
|
|
68
68
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
69
69
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
70
|
-
change: (...args: any[]) => void;
|
|
71
70
|
error: (...args: any[]) => void;
|
|
71
|
+
change: (...args: any[]) => void;
|
|
72
72
|
"update:stepActive": (...args: any[]) => void;
|
|
73
73
|
"field-change": (...args: any[]) => void;
|
|
74
74
|
"field-input": (...args: any[]) => void;
|
|
75
75
|
}, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$u> & Readonly<{
|
|
76
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
77
76
|
onError?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
78
78
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
80
80
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -139,8 +139,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
139
139
|
preventSubmitDefault?: boolean;
|
|
140
140
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
141
141
|
}> & Readonly<{
|
|
142
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
143
142
|
onError?: ((...args: any[]) => any) | undefined;
|
|
143
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
144
144
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
145
145
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
146
146
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -155,8 +155,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
155
155
|
submitForm: (native?: boolean) => Promise<any>;
|
|
156
156
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
157
157
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
158
|
-
change: (...args: any[]) => void;
|
|
159
158
|
error: (...args: any[]) => void;
|
|
159
|
+
change: (...args: any[]) => void;
|
|
160
160
|
"update:stepActive": (...args: any[]) => void;
|
|
161
161
|
"field-change": (...args: any[]) => void;
|
|
162
162
|
"field-input": (...args: any[]) => void;
|
|
@@ -198,8 +198,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
198
198
|
preventSubmitDefault?: boolean;
|
|
199
199
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
200
200
|
}> & Readonly<{
|
|
201
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
202
201
|
onError?: ((...args: any[]) => any) | undefined;
|
|
202
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
203
203
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
204
204
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
205
205
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -244,8 +244,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
244
244
|
preventSubmitDefault?: boolean;
|
|
245
245
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
246
246
|
}> & Readonly<{
|
|
247
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
248
247
|
onError?: ((...args: any[]) => any) | undefined;
|
|
248
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
249
249
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
250
250
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
251
251
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -260,8 +260,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
260
260
|
submitForm: (native?: boolean) => Promise<any>;
|
|
261
261
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
262
262
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
263
|
-
change: (...args: any[]) => void;
|
|
264
263
|
error: (...args: any[]) => void;
|
|
264
|
+
change: (...args: any[]) => void;
|
|
265
265
|
"update:stepActive": (...args: any[]) => void;
|
|
266
266
|
"field-change": (...args: any[]) => void;
|
|
267
267
|
"field-input": (...args: any[]) => void;
|
|
@@ -303,8 +303,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
303
303
|
preventSubmitDefault?: boolean;
|
|
304
304
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
305
305
|
}> & Readonly<{
|
|
306
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
307
306
|
onError?: ((...args: any[]) => any) | undefined;
|
|
307
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
308
308
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
309
309
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
310
310
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -339,14 +339,14 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
|
|
|
339
339
|
show: () => void;
|
|
340
340
|
hide: () => void;
|
|
341
341
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
342
|
+
error: (...args: any[]) => void;
|
|
342
343
|
change: (...args: any[]) => void;
|
|
343
344
|
close: (...args: any[]) => void;
|
|
344
|
-
error: (...args: any[]) => void;
|
|
345
345
|
submit: (...args: any[]) => void;
|
|
346
346
|
}, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$t> & Readonly<{
|
|
347
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
347
348
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
348
349
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
349
|
-
onError?: ((...args: any[]) => any) | undefined;
|
|
350
350
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
351
351
|
}>, {
|
|
352
352
|
values: Object;
|
|
@@ -409,8 +409,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
409
409
|
preventSubmitDefault?: boolean;
|
|
410
410
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
411
411
|
}> & Readonly<{
|
|
412
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
413
412
|
onError?: ((...args: any[]) => any) | undefined;
|
|
413
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
414
414
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
415
415
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
416
416
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -425,8 +425,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
425
425
|
submitForm: (native?: boolean) => Promise<any>;
|
|
426
426
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
427
427
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
428
|
-
change: (...args: any[]) => void;
|
|
429
428
|
error: (...args: any[]) => void;
|
|
429
|
+
change: (...args: any[]) => void;
|
|
430
430
|
"update:stepActive": (...args: any[]) => void;
|
|
431
431
|
"field-change": (...args: any[]) => void;
|
|
432
432
|
"field-input": (...args: any[]) => void;
|
|
@@ -468,8 +468,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
468
468
|
preventSubmitDefault?: boolean;
|
|
469
469
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
470
470
|
}> & Readonly<{
|
|
471
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
472
471
|
onError?: ((...args: any[]) => any) | undefined;
|
|
472
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
473
473
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
474
474
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
475
475
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -514,8 +514,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
514
514
|
preventSubmitDefault?: boolean;
|
|
515
515
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
516
516
|
}> & Readonly<{
|
|
517
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
518
517
|
onError?: ((...args: any[]) => any) | undefined;
|
|
518
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
519
519
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
520
520
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
521
521
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -530,8 +530,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
530
530
|
submitForm: (native?: boolean) => Promise<any>;
|
|
531
531
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
532
532
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
533
|
-
change: (...args: any[]) => void;
|
|
534
533
|
error: (...args: any[]) => void;
|
|
534
|
+
change: (...args: any[]) => void;
|
|
535
535
|
"update:stepActive": (...args: any[]) => void;
|
|
536
536
|
"field-change": (...args: any[]) => void;
|
|
537
537
|
"field-input": (...args: any[]) => void;
|
|
@@ -573,8 +573,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
573
573
|
preventSubmitDefault?: boolean;
|
|
574
574
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
575
575
|
}> & Readonly<{
|
|
576
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
577
576
|
onError?: ((...args: any[]) => any) | undefined;
|
|
577
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
578
578
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
579
579
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
580
580
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -608,17 +608,17 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
|
|
|
608
608
|
hide: () => void;
|
|
609
609
|
handleClose: () => void;
|
|
610
610
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
611
|
+
error: (...args: any[]) => void;
|
|
611
612
|
change: (...args: any[]) => void;
|
|
612
613
|
close: (...args: any[]) => void;
|
|
613
|
-
error: (...args: any[]) => void;
|
|
614
614
|
submit: (...args: any[]) => void;
|
|
615
615
|
open: (...args: any[]) => void;
|
|
616
616
|
opened: (...args: any[]) => void;
|
|
617
617
|
closed: (...args: any[]) => void;
|
|
618
618
|
}, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$s> & Readonly<{
|
|
619
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
619
620
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
620
621
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
621
|
-
onError?: ((...args: any[]) => any) | undefined;
|
|
622
622
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
623
623
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
624
624
|
onOpened?: ((...args: any[]) => any) | undefined;
|
|
@@ -681,8 +681,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
681
681
|
preventSubmitDefault?: boolean;
|
|
682
682
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
683
683
|
}> & Readonly<{
|
|
684
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
685
684
|
onError?: ((...args: any[]) => any) | undefined;
|
|
685
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
686
686
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
687
687
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
688
688
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -697,8 +697,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
697
697
|
submitForm: (native?: boolean) => Promise<any>;
|
|
698
698
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
699
699
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
700
|
-
change: (...args: any[]) => void;
|
|
701
700
|
error: (...args: any[]) => void;
|
|
701
|
+
change: (...args: any[]) => void;
|
|
702
702
|
"update:stepActive": (...args: any[]) => void;
|
|
703
703
|
"field-change": (...args: any[]) => void;
|
|
704
704
|
"field-input": (...args: any[]) => void;
|
|
@@ -740,8 +740,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
740
740
|
preventSubmitDefault?: boolean;
|
|
741
741
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
742
742
|
}> & Readonly<{
|
|
743
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
744
743
|
onError?: ((...args: any[]) => any) | undefined;
|
|
744
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
745
745
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
746
746
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
747
747
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -786,8 +786,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
786
786
|
preventSubmitDefault?: boolean;
|
|
787
787
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
788
788
|
}> & Readonly<{
|
|
789
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
790
789
|
onError?: ((...args: any[]) => any) | undefined;
|
|
790
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
791
791
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
792
792
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
793
793
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -802,8 +802,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
802
802
|
submitForm: (native?: boolean) => Promise<any>;
|
|
803
803
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
804
804
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
805
|
-
change: (...args: any[]) => void;
|
|
806
805
|
error: (...args: any[]) => void;
|
|
806
|
+
change: (...args: any[]) => void;
|
|
807
807
|
"update:stepActive": (...args: any[]) => void;
|
|
808
808
|
"field-change": (...args: any[]) => void;
|
|
809
809
|
"field-input": (...args: any[]) => void;
|
|
@@ -845,8 +845,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
845
845
|
preventSubmitDefault?: boolean;
|
|
846
846
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
847
847
|
}> & Readonly<{
|
|
848
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
849
848
|
onError?: ((...args: any[]) => any) | undefined;
|
|
849
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
850
850
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
851
851
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
852
852
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -878,12 +878,12 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
|
|
|
878
878
|
show: () => void;
|
|
879
879
|
hide: () => void;
|
|
880
880
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
881
|
-
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
882
881
|
error: (e: any) => any;
|
|
882
|
+
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
883
883
|
submit: (v: any, eventData: ContainerChangeEventData) => any;
|
|
884
884
|
}, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$r> & Readonly<{
|
|
885
|
-
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
886
885
|
onError?: ((e: any) => any) | undefined;
|
|
886
|
+
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
887
887
|
onSubmit?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
888
888
|
}>, {
|
|
889
889
|
values: Object;
|