feat: jump to page after successful form submission
This commit is contained in:
parent
3268267ccd
commit
6c75950b6a
@ -76,41 +76,50 @@ export function Page(props: any) {
|
|||||||
message.success('草稿保存成功');
|
message.success('草稿保存成功');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (!view.draft.message) {
|
||||||
view.draft.returnType === 'message' &&
|
return;
|
||||||
view.draft.message
|
|
||||||
) {
|
|
||||||
Modal.success({
|
|
||||||
title: '草稿保存成功',
|
|
||||||
content: (
|
|
||||||
<div
|
|
||||||
dangerouslySetInnerHTML={{
|
|
||||||
__html: markdown(view.draft.message),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
});
|
|
||||||
} else if (view.draft.returnType === 'redirect') {
|
|
||||||
const path = get(view, 'draft.redirect.name');
|
|
||||||
path && history.push(`${path}`);
|
|
||||||
}
|
}
|
||||||
|
Modal.success({
|
||||||
|
title: '草稿保存成功',
|
||||||
|
content: (
|
||||||
|
<div
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: markdown(view.draft.message),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
onCancel: () => {
|
||||||
|
const path = get(view, 'redirect.name');
|
||||||
|
path && history.push(`${path}`);
|
||||||
|
},
|
||||||
|
onOk: () => {
|
||||||
|
const path = get(view, 'redirect.name');
|
||||||
|
path && history.push(`${path}`);
|
||||||
|
},
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
onFinish={() => {
|
onFinish={() => {
|
||||||
if (view.returnType === 'message' && view.message) {
|
if (!view.message) {
|
||||||
Modal.success({
|
return;
|
||||||
title: '提交成功',
|
|
||||||
content: (
|
|
||||||
<div
|
|
||||||
dangerouslySetInnerHTML={{
|
|
||||||
__html: markdown(view.message),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
});
|
|
||||||
} else if (view.returnType === 'redirect') {
|
|
||||||
const path = get(view, 'redirect.name');
|
|
||||||
path && history.push(`${path}`);
|
|
||||||
}
|
}
|
||||||
|
Modal.success({
|
||||||
|
title: '提交成功',
|
||||||
|
content: (
|
||||||
|
<div
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: markdown(view.message),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
onOk: () => {
|
||||||
|
const path = get(view, 'redirect.name');
|
||||||
|
path && history.push(`${path}`);
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
const path = get(view, 'redirect.name');
|
||||||
|
path && history.push(`${path}`);
|
||||||
|
},
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
viewName={viewName}
|
viewName={viewName}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user