@tmagic/form 1.7.13 → 1.7.14-beta.1
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.
|
@@ -72,7 +72,7 @@ var FormDialog_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
72
72
|
};
|
|
73
73
|
const save = async () => {
|
|
74
74
|
try {
|
|
75
|
-
const changeRecords = form.value?.changeRecords;
|
|
75
|
+
const changeRecords = [...form.value?.changeRecords || []];
|
|
76
76
|
emit("submit", await form.value?.submitForm(), { changeRecords });
|
|
77
77
|
} catch (e) {
|
|
78
78
|
emit("error", e);
|
|
@@ -71,7 +71,7 @@ var Text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
71
71
|
emit("input", v);
|
|
72
72
|
mForm?.$emit("field-input", props.prop, v);
|
|
73
73
|
};
|
|
74
|
-
const buttonClickHandler = () => {
|
|
74
|
+
const buttonClickHandler = async () => {
|
|
75
75
|
if (!appendConfig.value) return;
|
|
76
76
|
if (typeof appendConfig.value.handler === "function") {
|
|
77
77
|
const newChangeRecords = [];
|
|
@@ -87,7 +87,7 @@ var Text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
87
87
|
value
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
appendConfig.value.handler(mForm, {
|
|
90
|
+
await appendConfig.value.handler(mForm, {
|
|
91
91
|
model: props.model,
|
|
92
92
|
values: mForm ? readonly(mForm.initValues) : null,
|
|
93
93
|
formValue: props.values || {},
|
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -3610,7 +3610,7 @@
|
|
|
3610
3610
|
};
|
|
3611
3611
|
const save = async () => {
|
|
3612
3612
|
try {
|
|
3613
|
-
const changeRecords = form.value?.changeRecords;
|
|
3613
|
+
const changeRecords = [...form.value?.changeRecords || []];
|
|
3614
3614
|
emit("submit", await form.value?.submitForm(), { changeRecords });
|
|
3615
3615
|
} catch (e) {
|
|
3616
3616
|
emit("error", e);
|
|
@@ -5952,7 +5952,7 @@
|
|
|
5952
5952
|
emit("input", v);
|
|
5953
5953
|
mForm?.$emit("field-input", props.prop, v);
|
|
5954
5954
|
};
|
|
5955
|
-
const buttonClickHandler = () => {
|
|
5955
|
+
const buttonClickHandler = async () => {
|
|
5956
5956
|
if (!appendConfig.value) return;
|
|
5957
5957
|
if (typeof appendConfig.value.handler === "function") {
|
|
5958
5958
|
const newChangeRecords = [];
|
|
@@ -5968,7 +5968,7 @@
|
|
|
5968
5968
|
value
|
|
5969
5969
|
});
|
|
5970
5970
|
};
|
|
5971
|
-
appendConfig.value.handler(mForm, {
|
|
5971
|
+
await appendConfig.value.handler(mForm, {
|
|
5972
5972
|
model: props.model,
|
|
5973
5973
|
values: mForm ? (0, vue.readonly)(mForm.initValues) : null,
|
|
5974
5974
|
formValue: props.values || {},
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.
|
|
2
|
+
"version": "1.7.14-beta.1",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"vue": "^3.5.33",
|
|
54
54
|
"typescript": "^6.0.3",
|
|
55
|
-
"@tmagic/design": "1.7.
|
|
56
|
-
"@tmagic/form-schema": "1.7.
|
|
57
|
-
"@tmagic/utils": "1.7.
|
|
55
|
+
"@tmagic/design": "1.7.14-beta.1",
|
|
56
|
+
"@tmagic/form-schema": "1.7.14-beta.1",
|
|
57
|
+
"@tmagic/utils": "1.7.14-beta.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"typescript": {
|
package/src/FormDialog.vue
CHANGED
|
@@ -150,7 +150,7 @@ const closeHandler = () => {
|
|
|
150
150
|
|
|
151
151
|
const save = async () => {
|
|
152
152
|
try {
|
|
153
|
-
const changeRecords = form.value?.changeRecords;
|
|
153
|
+
const changeRecords = [...(form.value?.changeRecords || [])];
|
|
154
154
|
const values = await form.value?.submitForm();
|
|
155
155
|
emit('submit', values, { changeRecords });
|
|
156
156
|
} catch (e) {
|
package/src/fields/Text.vue
CHANGED
|
@@ -130,7 +130,7 @@ const inputHandler = (v: string) => {
|
|
|
130
130
|
mForm?.$emit('field-input', props.prop, v);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
const buttonClickHandler = () => {
|
|
133
|
+
const buttonClickHandler = async () => {
|
|
134
134
|
if (!appendConfig.value) return;
|
|
135
135
|
if (typeof appendConfig.value.handler === 'function') {
|
|
136
136
|
const newChangeRecords: ChangeRecord[] = [];
|
|
@@ -142,7 +142,7 @@ const buttonClickHandler = () => {
|
|
|
142
142
|
newChangeRecords.push({ propPath: key, value });
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
appendConfig.value.handler(mForm, {
|
|
145
|
+
await appendConfig.value.handler(mForm, {
|
|
146
146
|
model: props.model,
|
|
147
147
|
values: mForm ? readonly(mForm.initValues) : null,
|
|
148
148
|
formValue: props.values || {},
|