|
|
@@ -27,11 +27,15 @@ class Header extends React.Component {
|
|
|
title="离开前保存修改吗?"
|
|
|
visible={this.state.visibleConfirm}
|
|
|
onVisibleChange={this.handleVisibleChange}
|
|
|
- onConfirm={() => {
|
|
|
+ onConfirm={async () => {
|
|
|
this.setState({
|
|
|
visibleConfirm: false
|
|
|
});
|
|
|
- dispatch({ type: 'dashboardDesigner/saveWithThumbnail' });
|
|
|
+ try {
|
|
|
+ await dispatch({ type: 'dashboardDesigner/saveWithThumbnail' });
|
|
|
+ }catch(e){
|
|
|
+ return e
|
|
|
+ }
|
|
|
dispatch({ type: 'main/redirect', path: '/dashboard' });
|
|
|
}}
|
|
|
onCancel={() => {
|