@tmagic/form 1.5.13 → 1.5.14
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 +13 -9
- package/dist/tmagic-form.umd.cjs +16 -12
- package/package.json +3 -3
- package/src/Form.vue +2 -2
- package/src/FormDrawer.vue +1 -1
- package/src/containers/Container.vue +7 -1
- package/src/containers/Table.vue +10 -14
- package/src/containers/Tabs.vue +10 -10
- package/src/fields/Display.vue +0 -1
- package/src/fields/Select.vue +2 -2
- package/src/fields/Timerange.vue +0 -1
- package/src/index.ts +0 -1
- package/src/schema.ts +1 -0
- package/src/utils/form.ts +0 -1
- package/types/index.d.ts +27 -26
package/dist/tmagic-form.js
CHANGED
|
@@ -2,10 +2,10 @@ import { toRaw, defineComponent, inject, ref, computed, watchEffect, watch, reso
|
|
|
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, useZIndex, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getDesignConfig, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, tMagicMessageBox, TMagicDialog, TMagicRadioButton, TMagicRadio, TMagicRadioGroup, TMagicSelect, TMagicSwitch, TMagicTimePicker, TMagicDrawer, TMagicScrollbar } from '@tmagic/design';
|
|
5
|
+
import { setValueByKeyPath, asyncLoadJs, getValueByKeyPath, isNumber } from '@tmagic/utils';
|
|
5
6
|
import dayjs from 'dayjs';
|
|
6
7
|
import utc from 'dayjs/plugin/utc';
|
|
7
8
|
import Sortable from 'sortablejs';
|
|
8
|
-
import { asyncLoadJs, getValueByKeyPath, isNumber } from '@tmagic/utils';
|
|
9
9
|
import { createPopper } from '@popperjs/core';
|
|
10
10
|
|
|
11
11
|
const isTableSelect = (type) => typeof type === "string" && ["table-select", "tableSelect"].includes(type);
|
|
@@ -342,7 +342,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
342
342
|
formValue: mForm?.values,
|
|
343
343
|
prop: itemProp.value,
|
|
344
344
|
config: props.config,
|
|
345
|
-
changeRecords: newChangeRecords
|
|
345
|
+
changeRecords: newChangeRecords,
|
|
346
|
+
setModel: (key2, value2) => {
|
|
347
|
+
setValueByKeyPath(key2, value2, props.model);
|
|
348
|
+
if (props.config.name) {
|
|
349
|
+
newChangeRecords.push({ propPath: itemProp.value.replace(`${props.config.name}`, key2), value: value2 });
|
|
350
|
+
}
|
|
351
|
+
}
|
|
346
352
|
}) ?? value;
|
|
347
353
|
}
|
|
348
354
|
value = trimHandler(trim, value) ?? value;
|
|
@@ -1672,15 +1678,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1672
1678
|
const updateKey = ref(1);
|
|
1673
1679
|
const isFullscreen = ref(false);
|
|
1674
1680
|
const modelName = computed(() => props.name || props.config.name || "");
|
|
1675
|
-
const
|
|
1676
|
-
() =>
|
|
1677
|
-
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
1678
|
-
) : props.model[modelName.value]
|
|
1681
|
+
const getDataByPage = (data2 = []) => data2.filter(
|
|
1682
|
+
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
1679
1683
|
);
|
|
1684
|
+
const pageinationData = computed(() => getDataByPage(props.model[modelName.value]));
|
|
1685
|
+
const data = computed(() => props.config.pagination ? pageinationData.value : props.model[modelName.value]);
|
|
1680
1686
|
const lastData = computed(
|
|
1681
|
-
() => props.config.pagination ? (props.lastValues[modelName.value] || []
|
|
1682
|
-
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
1683
|
-
) : props.lastValues[modelName.value] || []
|
|
1687
|
+
() => props.config.pagination ? getDataByPage(props.lastValues[modelName.value]) : props.lastValues[modelName.value] || []
|
|
1684
1688
|
);
|
|
1685
1689
|
const sortChange = ({ prop, order }) => {
|
|
1686
1690
|
if (order === "ascending") {
|
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons-vue'), require('@tmagic/design'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons-vue', '@tmagic/design', 'dayjs', 'dayjs/plugin/utc', 'sortablejs', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicForm = {}, global.Vue, global.iconsVue, global.design, global.
|
|
5
|
-
})(this, (function (exports, vue, iconsVue, design, dayjs, utc, Sortable,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons-vue'), require('@tmagic/design'), require('@tmagic/utils'), require('dayjs'), require('dayjs/plugin/utc'), require('sortablejs'), require('@popperjs/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons-vue', '@tmagic/design', '@tmagic/utils', 'dayjs', 'dayjs/plugin/utc', 'sortablejs', '@popperjs/core'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicForm = {}, global.Vue, global.iconsVue, global.design, global.utils, global.dayjs, global.utc, global.Sortable, global.core));
|
|
5
|
+
})(this, (function (exports, vue, iconsVue, design, utils, dayjs, utc, Sortable, core) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/** Detect free variable `global` from Node.js. */
|
|
8
8
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
@@ -3273,7 +3273,13 @@
|
|
|
3273
3273
|
formValue: mForm?.values,
|
|
3274
3274
|
prop: itemProp.value,
|
|
3275
3275
|
config: props.config,
|
|
3276
|
-
changeRecords: newChangeRecords
|
|
3276
|
+
changeRecords: newChangeRecords,
|
|
3277
|
+
setModel: (key2, value2) => {
|
|
3278
|
+
utils.setValueByKeyPath(key2, value2, props.model);
|
|
3279
|
+
if (props.config.name) {
|
|
3280
|
+
newChangeRecords.push({ propPath: itemProp.value.replace(`${props.config.name}`, key2), value: value2 });
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3277
3283
|
}) ?? value;
|
|
3278
3284
|
}
|
|
3279
3285
|
value = trimHandler(trim, value) ?? value;
|
|
@@ -4603,15 +4609,13 @@
|
|
|
4603
4609
|
const updateKey = vue.ref(1);
|
|
4604
4610
|
const isFullscreen = vue.ref(false);
|
|
4605
4611
|
const modelName = vue.computed(() => props.name || props.config.name || "");
|
|
4606
|
-
const
|
|
4607
|
-
() =>
|
|
4608
|
-
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
4609
|
-
) : props.model[modelName.value]
|
|
4612
|
+
const getDataByPage = (data2 = []) => data2.filter(
|
|
4613
|
+
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
4610
4614
|
);
|
|
4615
|
+
const pageinationData = vue.computed(() => getDataByPage(props.model[modelName.value]));
|
|
4616
|
+
const data = vue.computed(() => props.config.pagination ? pageinationData.value : props.model[modelName.value]);
|
|
4611
4617
|
const lastData = vue.computed(
|
|
4612
|
-
() => props.config.pagination ? (props.lastValues[modelName.value] || []
|
|
4613
|
-
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
4614
|
-
) : props.lastValues[modelName.value] || []
|
|
4618
|
+
() => props.config.pagination ? getDataByPage(props.lastValues[modelName.value]) : props.lastValues[modelName.value] || []
|
|
4615
4619
|
);
|
|
4616
4620
|
const sortChange = ({ prop, order }) => {
|
|
4617
4621
|
if (order === "ascending") {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.5.
|
|
2
|
+
"version": "1.5.14",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"vue": ">=3.5.0",
|
|
53
53
|
"typescript": "*",
|
|
54
|
-
"@tmagic/design": "1.5.
|
|
55
|
-
"@tmagic/utils": "1.5.
|
|
54
|
+
"@tmagic/design": "1.5.14",
|
|
55
|
+
"@tmagic/utils": "1.5.14"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"typescript": {
|
package/src/Form.vue
CHANGED
|
@@ -63,7 +63,7 @@ const props = withDefaults(
|
|
|
63
63
|
keyProp?: string;
|
|
64
64
|
popperClass?: string;
|
|
65
65
|
preventSubmitDefault?: boolean;
|
|
66
|
-
extendState?: (
|
|
66
|
+
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
67
67
|
}>(),
|
|
68
68
|
{
|
|
69
69
|
config: () => [],
|
|
@@ -101,7 +101,7 @@ const formState: FormState = reactive<FormState>({
|
|
|
101
101
|
parentValues: props.parentValues,
|
|
102
102
|
values,
|
|
103
103
|
lastValuesProcessed,
|
|
104
|
-
$emit: emit as (
|
|
104
|
+
$emit: emit as (_event: string, ..._args: any[]) => void,
|
|
105
105
|
fields,
|
|
106
106
|
setField: (prop: string, field: any) => fields.set(prop, field),
|
|
107
107
|
getField: (prop: string) => fields.get(prop),
|
package/src/FormDrawer.vue
CHANGED
|
@@ -82,7 +82,7 @@ withDefaults(
|
|
|
82
82
|
labelPosition?: string;
|
|
83
83
|
preventSubmitDefault?: boolean;
|
|
84
84
|
/** 关闭前的回调,会暂停 Drawer 的关闭; done 是个 function type 接受一个 boolean 参数, 执行 done 使用 true 参数或不提供参数将会终止关闭 */
|
|
85
|
-
beforeClose?: (
|
|
85
|
+
beforeClose?: (_done: (_cancel?: boolean) => void) => void;
|
|
86
86
|
}>(),
|
|
87
87
|
{
|
|
88
88
|
closeOnPressEscape: true,
|
|
@@ -228,6 +228,7 @@ import { WarningFilled } from '@element-plus/icons-vue';
|
|
|
228
228
|
import { isEqual } from 'lodash-es';
|
|
229
229
|
|
|
230
230
|
import { TMagicButton, TMagicFormItem, TMagicIcon, TMagicTooltip } from '@tmagic/design';
|
|
231
|
+
import { setValueByKeyPath } from '@tmagic/utils';
|
|
231
232
|
|
|
232
233
|
import type { ChildConfig, ContainerChangeEventData, ContainerCommonConfig, FormState, FormValue } from '../schema';
|
|
233
234
|
import { display as displayFunction, filterFunction, getRules } from '../utils/form';
|
|
@@ -423,6 +424,12 @@ const onChangeHandler = async function (v: any, eventData: ContainerChangeEventD
|
|
|
423
424
|
prop: itemProp.value,
|
|
424
425
|
config: props.config,
|
|
425
426
|
changeRecords: newChangeRecords,
|
|
427
|
+
setModel: (key: string, value: any) => {
|
|
428
|
+
setValueByKeyPath(key, value, props.model);
|
|
429
|
+
if (props.config.name) {
|
|
430
|
+
newChangeRecords.push({ propPath: itemProp.value.replace(`${props.config.name}`, key), value });
|
|
431
|
+
}
|
|
432
|
+
},
|
|
426
433
|
})) ?? value;
|
|
427
434
|
}
|
|
428
435
|
value = trimHandler(trim, value) ?? value;
|
|
@@ -445,7 +452,6 @@ const onChangeHandler = async function (v: any, eventData: ContainerChangeEventD
|
|
|
445
452
|
delete eventData.modifyKey;
|
|
446
453
|
} else if (isValidName() && props.model !== value && (v !== value || props.model[name.value] !== value)) {
|
|
447
454
|
// field内容下包含field-link时,model===value, 这里避免循环引用
|
|
448
|
-
// eslint-disable-next-line vue/no-mutating-props
|
|
449
455
|
props.model[name.value] = value;
|
|
450
456
|
}
|
|
451
457
|
|
package/src/containers/Table.vue
CHANGED
|
@@ -273,22 +273,18 @@ const isFullscreen = ref(false);
|
|
|
273
273
|
|
|
274
274
|
const modelName = computed(() => props.name || props.config.name || '');
|
|
275
275
|
|
|
276
|
-
const data =
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
276
|
+
const getDataByPage = (data: any[] = []) =>
|
|
277
|
+
data.filter(
|
|
278
|
+
(item: any, index: number) =>
|
|
279
|
+
index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value,
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
const pageinationData = computed(() => getDataByPage(props.model[modelName.value]));
|
|
283
|
+
|
|
284
|
+
const data = computed(() => (props.config.pagination ? pageinationData.value : props.model[modelName.value]));
|
|
284
285
|
|
|
285
286
|
const lastData = computed(() =>
|
|
286
|
-
props.config.pagination
|
|
287
|
-
? (props.lastValues[modelName.value] || []).filter(
|
|
288
|
-
(item: any, index: number) =>
|
|
289
|
-
index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value,
|
|
290
|
-
)
|
|
291
|
-
: props.lastValues[modelName.value] || [],
|
|
287
|
+
props.config.pagination ? getDataByPage(props.lastValues[modelName.value]) : props.lastValues[modelName.value] || [],
|
|
292
288
|
);
|
|
293
289
|
|
|
294
290
|
const sortChange = ({ prop, order }: SortProp) => {
|
package/src/containers/Tabs.vue
CHANGED
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
config.dynamic
|
|
42
42
|
? (name ? model[name] : model)[tabIndex]
|
|
43
43
|
: tab.name
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
? (name ? model[name] : model)[tab.name]
|
|
45
|
+
: name
|
|
46
|
+
? model[name]
|
|
47
|
+
: model
|
|
48
48
|
"
|
|
49
49
|
:last-values="
|
|
50
50
|
isEmpty(lastValues)
|
|
51
51
|
? {}
|
|
52
52
|
: config.dynamic
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
? (name ? lastValues[name] : lastValues)[tabIndex]
|
|
54
|
+
: tab.name
|
|
55
|
+
? (name ? lastValues[name] : lastValues)[tab.name]
|
|
56
|
+
: name
|
|
57
|
+
? lastValues[name]
|
|
58
|
+
: lastValues
|
|
59
59
|
"
|
|
60
60
|
:is-compare="isCompare"
|
|
61
61
|
:prop="config.dynamic ? `${prop}${prop ? '.' : ''}${String(tabIndex)}` : prop"
|
package/src/fields/Display.vue
CHANGED
package/src/fields/Select.vue
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
<template v-if="config.group">
|
|
23
23
|
<component
|
|
24
|
-
v-for="(group, index) in
|
|
24
|
+
v-for="(group, index) in options as SelectGroupOption[]"
|
|
25
25
|
:key="index"
|
|
26
26
|
:is="optionGroupComponent?.component || 'el-option-group'"
|
|
27
27
|
v-bind="
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
<template v-else>
|
|
57
57
|
<component
|
|
58
|
-
v-for="option in
|
|
58
|
+
v-for="option in options as SelectOption[]"
|
|
59
59
|
class="tmagic-design-option"
|
|
60
60
|
:key="config.valueKey ? option.value[config.valueKey] : option.value"
|
|
61
61
|
:is="optionComponent?.component || 'el-option'"
|
package/src/fields/Timerange.vue
CHANGED
package/src/index.ts
CHANGED
|
@@ -101,7 +101,6 @@ export default {
|
|
|
101
101
|
install(app: App, opt: FormInstallOptions = {}) {
|
|
102
102
|
const option = Object.assign(defaultInstallOpt, opt);
|
|
103
103
|
|
|
104
|
-
// eslint-disable-next-line no-param-reassign
|
|
105
104
|
app.config.globalProperties.$MAGIC_FORM = option;
|
|
106
105
|
setConfig(option);
|
|
107
106
|
|
package/src/schema.ts
CHANGED
|
@@ -196,6 +196,7 @@ export interface OnChangeHandlerData {
|
|
|
196
196
|
config: any;
|
|
197
197
|
prop: string;
|
|
198
198
|
changeRecords: ChangeRecord[];
|
|
199
|
+
setModel: (prop: string, value: any) => void;
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
export type OnChangeHandler = (mForm: FormState | undefined, value: any, data: OnChangeHandlerData) => any;
|
package/src/utils/form.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ interface OnChangeHandlerData {
|
|
|
158
158
|
config: any;
|
|
159
159
|
prop: string;
|
|
160
160
|
changeRecords: ChangeRecord[];
|
|
161
|
+
setModel: (prop: string, value: any) => void;
|
|
161
162
|
}
|
|
162
163
|
type OnChangeHandler = (mForm: FormState | undefined, value: any, data: OnChangeHandlerData) => any;
|
|
163
164
|
type DefaultValueFunction = (mForm: FormState | undefined) => any;
|
|
@@ -665,7 +666,7 @@ type __VLS_Props$u = {
|
|
|
665
666
|
keyProp?: string;
|
|
666
667
|
popperClass?: string;
|
|
667
668
|
preventSubmitDefault?: boolean;
|
|
668
|
-
extendState?: (
|
|
669
|
+
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
669
670
|
};
|
|
670
671
|
declare const _default$v: vue.DefineComponent<__VLS_Props$u, {
|
|
671
672
|
values: vue.Ref<FormValue, FormValue>;
|
|
@@ -735,7 +736,7 @@ declare const form$2: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
735
736
|
keyProp?: string;
|
|
736
737
|
popperClass?: string;
|
|
737
738
|
preventSubmitDefault?: boolean;
|
|
738
|
-
extendState?: (
|
|
739
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
739
740
|
}> & Readonly<{
|
|
740
741
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
741
742
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -793,7 +794,7 @@ declare const form$2: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
793
794
|
keyProp?: string;
|
|
794
795
|
popperClass?: string;
|
|
795
796
|
preventSubmitDefault?: boolean;
|
|
796
|
-
extendState?: (
|
|
797
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
797
798
|
}> & Readonly<{
|
|
798
799
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
799
800
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -838,7 +839,7 @@ declare const form$2: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
838
839
|
keyProp?: string;
|
|
839
840
|
popperClass?: string;
|
|
840
841
|
preventSubmitDefault?: boolean;
|
|
841
|
-
extendState?: (
|
|
842
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
842
843
|
}> & Readonly<{
|
|
843
844
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
844
845
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -896,7 +897,7 @@ declare const form$2: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
896
897
|
keyProp?: string;
|
|
897
898
|
popperClass?: string;
|
|
898
899
|
preventSubmitDefault?: boolean;
|
|
899
|
-
extendState?: (
|
|
900
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
900
901
|
}> & Readonly<{
|
|
901
902
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
902
903
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1000,7 +1001,7 @@ declare const __VLS_component$4: vue.DefineComponent<__VLS_Props$t, {
|
|
|
1000
1001
|
keyProp?: string;
|
|
1001
1002
|
popperClass?: string;
|
|
1002
1003
|
preventSubmitDefault?: boolean;
|
|
1003
|
-
extendState?: (
|
|
1004
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1004
1005
|
}> & Readonly<{
|
|
1005
1006
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1006
1007
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1058,7 +1059,7 @@ declare const __VLS_component$4: vue.DefineComponent<__VLS_Props$t, {
|
|
|
1058
1059
|
keyProp?: string;
|
|
1059
1060
|
popperClass?: string;
|
|
1060
1061
|
preventSubmitDefault?: boolean;
|
|
1061
|
-
extendState?: (
|
|
1062
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1062
1063
|
}> & Readonly<{
|
|
1063
1064
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1064
1065
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1103,7 +1104,7 @@ declare const __VLS_component$4: vue.DefineComponent<__VLS_Props$t, {
|
|
|
1103
1104
|
keyProp?: string;
|
|
1104
1105
|
popperClass?: string;
|
|
1105
1106
|
preventSubmitDefault?: boolean;
|
|
1106
|
-
extendState?: (
|
|
1107
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1107
1108
|
}> & Readonly<{
|
|
1108
1109
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1109
1110
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1161,7 +1162,7 @@ declare const __VLS_component$4: vue.DefineComponent<__VLS_Props$t, {
|
|
|
1161
1162
|
keyProp?: string;
|
|
1162
1163
|
popperClass?: string;
|
|
1163
1164
|
preventSubmitDefault?: boolean;
|
|
1164
|
-
extendState?: (
|
|
1165
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1165
1166
|
}> & Readonly<{
|
|
1166
1167
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1167
1168
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1236,7 +1237,7 @@ type __VLS_Props$s = {
|
|
|
1236
1237
|
labelPosition?: string;
|
|
1237
1238
|
preventSubmitDefault?: boolean;
|
|
1238
1239
|
/** 关闭前的回调,会暂停 Drawer 的关闭; done 是个 function type 接受一个 boolean 参数, 执行 done 使用 true 参数或不提供参数将会终止关闭 */
|
|
1239
|
-
beforeClose?: (
|
|
1240
|
+
beforeClose?: (_done: (_cancel?: boolean) => void) => void;
|
|
1240
1241
|
};
|
|
1241
1242
|
declare const drawer: vue.Ref<({
|
|
1242
1243
|
$: vue.ComponentInternalInstance;
|
|
@@ -1417,7 +1418,7 @@ declare const form$1: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
1417
1418
|
keyProp?: string;
|
|
1418
1419
|
popperClass?: string;
|
|
1419
1420
|
preventSubmitDefault?: boolean;
|
|
1420
|
-
extendState?: (
|
|
1421
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1421
1422
|
}> & Readonly<{
|
|
1422
1423
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1423
1424
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1475,7 +1476,7 @@ declare const form$1: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
1475
1476
|
keyProp?: string;
|
|
1476
1477
|
popperClass?: string;
|
|
1477
1478
|
preventSubmitDefault?: boolean;
|
|
1478
|
-
extendState?: (
|
|
1479
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1479
1480
|
}> & Readonly<{
|
|
1480
1481
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1481
1482
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1520,7 +1521,7 @@ declare const form$1: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
1520
1521
|
keyProp?: string;
|
|
1521
1522
|
popperClass?: string;
|
|
1522
1523
|
preventSubmitDefault?: boolean;
|
|
1523
|
-
extendState?: (
|
|
1524
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1524
1525
|
}> & Readonly<{
|
|
1525
1526
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1526
1527
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1578,7 +1579,7 @@ declare const form$1: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readon
|
|
|
1578
1579
|
keyProp?: string;
|
|
1579
1580
|
popperClass?: string;
|
|
1580
1581
|
preventSubmitDefault?: boolean;
|
|
1581
|
-
extendState?: (
|
|
1582
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1582
1583
|
}> & Readonly<{
|
|
1583
1584
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1584
1585
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1687,7 +1688,7 @@ declare const __VLS_component$3: vue.DefineComponent<__VLS_Props$s, {
|
|
|
1687
1688
|
keyProp?: string;
|
|
1688
1689
|
popperClass?: string;
|
|
1689
1690
|
preventSubmitDefault?: boolean;
|
|
1690
|
-
extendState?: (
|
|
1691
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1691
1692
|
}> & Readonly<{
|
|
1692
1693
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1693
1694
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1745,7 +1746,7 @@ declare const __VLS_component$3: vue.DefineComponent<__VLS_Props$s, {
|
|
|
1745
1746
|
keyProp?: string;
|
|
1746
1747
|
popperClass?: string;
|
|
1747
1748
|
preventSubmitDefault?: boolean;
|
|
1748
|
-
extendState?: (
|
|
1749
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1749
1750
|
}> & Readonly<{
|
|
1750
1751
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1751
1752
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1790,7 +1791,7 @@ declare const __VLS_component$3: vue.DefineComponent<__VLS_Props$s, {
|
|
|
1790
1791
|
keyProp?: string;
|
|
1791
1792
|
popperClass?: string;
|
|
1792
1793
|
preventSubmitDefault?: boolean;
|
|
1793
|
-
extendState?: (
|
|
1794
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1794
1795
|
}> & Readonly<{
|
|
1795
1796
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1796
1797
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1848,7 +1849,7 @@ declare const __VLS_component$3: vue.DefineComponent<__VLS_Props$s, {
|
|
|
1848
1849
|
keyProp?: string;
|
|
1849
1850
|
popperClass?: string;
|
|
1850
1851
|
preventSubmitDefault?: boolean;
|
|
1851
|
-
extendState?: (
|
|
1852
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1852
1853
|
}> & Readonly<{
|
|
1853
1854
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1854
1855
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -1948,7 +1949,7 @@ declare const form: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readonly
|
|
|
1948
1949
|
keyProp?: string;
|
|
1949
1950
|
popperClass?: string;
|
|
1950
1951
|
preventSubmitDefault?: boolean;
|
|
1951
|
-
extendState?: (
|
|
1952
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1952
1953
|
}> & Readonly<{
|
|
1953
1954
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1954
1955
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2006,7 +2007,7 @@ declare const form: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readonly
|
|
|
2006
2007
|
keyProp?: string;
|
|
2007
2008
|
popperClass?: string;
|
|
2008
2009
|
preventSubmitDefault?: boolean;
|
|
2009
|
-
extendState?: (
|
|
2010
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2010
2011
|
}> & Readonly<{
|
|
2011
2012
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2012
2013
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2051,7 +2052,7 @@ declare const form: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readonly
|
|
|
2051
2052
|
keyProp?: string;
|
|
2052
2053
|
popperClass?: string;
|
|
2053
2054
|
preventSubmitDefault?: boolean;
|
|
2054
|
-
extendState?: (
|
|
2055
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2055
2056
|
}> & Readonly<{
|
|
2056
2057
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2057
2058
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2109,7 +2110,7 @@ declare const form: vue.Ref<vue.CreateComponentPublicInstanceWithMixins<Readonly
|
|
|
2109
2110
|
keyProp?: string;
|
|
2110
2111
|
popperClass?: string;
|
|
2111
2112
|
preventSubmitDefault?: boolean;
|
|
2112
|
-
extendState?: (
|
|
2113
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2113
2114
|
}> & Readonly<{
|
|
2114
2115
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2115
2116
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2195,7 +2196,7 @@ declare const __VLS_component$2: vue.DefineComponent<__VLS_Props$r, {
|
|
|
2195
2196
|
keyProp?: string;
|
|
2196
2197
|
popperClass?: string;
|
|
2197
2198
|
preventSubmitDefault?: boolean;
|
|
2198
|
-
extendState?: (
|
|
2199
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2199
2200
|
}> & Readonly<{
|
|
2200
2201
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2201
2202
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2253,7 +2254,7 @@ declare const __VLS_component$2: vue.DefineComponent<__VLS_Props$r, {
|
|
|
2253
2254
|
keyProp?: string;
|
|
2254
2255
|
popperClass?: string;
|
|
2255
2256
|
preventSubmitDefault?: boolean;
|
|
2256
|
-
extendState?: (
|
|
2257
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2257
2258
|
}> & Readonly<{
|
|
2258
2259
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2259
2260
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2298,7 +2299,7 @@ declare const __VLS_component$2: vue.DefineComponent<__VLS_Props$r, {
|
|
|
2298
2299
|
keyProp?: string;
|
|
2299
2300
|
popperClass?: string;
|
|
2300
2301
|
preventSubmitDefault?: boolean;
|
|
2301
|
-
extendState?: (
|
|
2302
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2302
2303
|
}> & Readonly<{
|
|
2303
2304
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2304
2305
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -2356,7 +2357,7 @@ declare const __VLS_component$2: vue.DefineComponent<__VLS_Props$r, {
|
|
|
2356
2357
|
keyProp?: string;
|
|
2357
2358
|
popperClass?: string;
|
|
2358
2359
|
preventSubmitDefault?: boolean;
|
|
2359
|
-
extendState?: (
|
|
2360
|
+
extendState?: (_state: _tmagic_editor.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2360
2361
|
}> & Readonly<{
|
|
2361
2362
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2362
2363
|
onError?: ((...args: any[]) => any) | undefined;
|