mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-11-30 06:22:08 +08:00
fix(form): dialog submit event获取到的changeRecords为空
This commit is contained in:
parent
fa208372ab
commit
02e1c7f479
@ -101,8 +101,9 @@ watchEffect(() => {
|
|||||||
|
|
||||||
const submitHandler = async () => {
|
const submitHandler = async () => {
|
||||||
try {
|
try {
|
||||||
|
const changeRecords = form.value?.changeRecords;
|
||||||
const values = await form.value?.submitForm();
|
const values = await form.value?.submitForm();
|
||||||
emit('submit', values, { changeRecords: form.value?.changeRecords });
|
emit('submit', values, { changeRecords });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit('error', e);
|
emit('error', e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</TMagicCol>
|
</TMagicCol>
|
||||||
<TMagicCol :span="12">
|
<TMagicCol :span="12">
|
||||||
<slot name="footer">
|
<slot name="footer">
|
||||||
<TMagicButton @click="cancel" size="small">取 消</TMagicButton>
|
<TMagicButton type="default" @click="cancel" size="small">取 消</TMagicButton>
|
||||||
<TMagicButton v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
<TMagicButton v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
||||||
>上一步</TMagicButton
|
>上一步</TMagicButton
|
||||||
>
|
>
|
||||||
@ -131,8 +131,9 @@ const closeHandler = () => {
|
|||||||
|
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
try {
|
try {
|
||||||
|
const changeRecords = form.value?.changeRecords;
|
||||||
const values = await form.value?.submitForm();
|
const values = await form.value?.submitForm();
|
||||||
emit('submit', values, { changeRecords: form.value?.changeRecords });
|
emit('submit', values, { changeRecords });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit('error', e);
|
emit('error', e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</TMagicCol>
|
</TMagicCol>
|
||||||
<TMagicCol :span="12">
|
<TMagicCol :span="12">
|
||||||
<slot name="footer">
|
<slot name="footer">
|
||||||
<TMagicButton @click="handleClose">关闭</TMagicButton>
|
<TMagicButton type="default" @click="handleClose">关闭</TMagicButton>
|
||||||
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
||||||
confirmText
|
confirmText
|
||||||
}}</TMagicButton>
|
}}</TMagicButton>
|
||||||
@ -109,8 +109,9 @@ watchEffect(() => {
|
|||||||
|
|
||||||
const submitHandler = async () => {
|
const submitHandler = async () => {
|
||||||
try {
|
try {
|
||||||
|
const changeRecords = form.value?.changeRecords;
|
||||||
const values = await form.value?.submitForm();
|
const values = await form.value?.submitForm();
|
||||||
emit('submit', values, { changeRecords: form.value?.changeRecords });
|
emit('submit', values, { changeRecords });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit('error', e);
|
emit('error', e);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user