mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-11-30 14:32:09 +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 () => {
|
||||
try {
|
||||
const changeRecords = form.value?.changeRecords;
|
||||
const values = await form.value?.submitForm();
|
||||
emit('submit', values, { changeRecords: form.value?.changeRecords });
|
||||
emit('submit', values, { changeRecords });
|
||||
} catch (e) {
|
||||
emit('error', e);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</TMagicCol>
|
||||
<TMagicCol :span="12">
|
||||
<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
|
||||
>
|
||||
@ -131,8 +131,9 @@ const closeHandler = () => {
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
const changeRecords = form.value?.changeRecords;
|
||||
const values = await form.value?.submitForm();
|
||||
emit('submit', values, { changeRecords: form.value?.changeRecords });
|
||||
emit('submit', values, { changeRecords });
|
||||
} catch (e) {
|
||||
emit('error', e);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</TMagicCol>
|
||||
<TMagicCol :span="12">
|
||||
<slot name="footer">
|
||||
<TMagicButton @click="handleClose">关闭</TMagicButton>
|
||||
<TMagicButton type="default" @click="handleClose">关闭</TMagicButton>
|
||||
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
||||
confirmText
|
||||
}}</TMagicButton>
|
||||
@ -109,8 +109,9 @@ watchEffect(() => {
|
||||
|
||||
const submitHandler = async () => {
|
||||
try {
|
||||
const changeRecords = form.value?.changeRecords;
|
||||
const values = await form.value?.submitForm();
|
||||
emit('submit', values, { changeRecords: form.value?.changeRecords });
|
||||
emit('submit', values, { changeRecords });
|
||||
} catch (e) {
|
||||
emit('error', e);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user