@beisen-platform/export-form
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -261,15 +261,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
value: function afterSave(resultData) { | ||
var _this2 = this; | ||
// 先关闭form弹层,再提示 | ||
this.props.onSave && this.props.onSave(resultData, function () { | ||
_this2.setState({ | ||
showTip: true, | ||
tipInfo: { | ||
infoType: 'success', | ||
title: resultData.message, | ||
content: resultData.moreMessage ? resultData.moreMessage : [] | ||
} | ||
}); | ||
}); | ||
this.props.onSave && this.props.onSave(); | ||
} | ||
@@ -279,3 +268,3 @@ }, { | ||
value: function onSave() { | ||
var _this3 = this; | ||
var _this2 = this; | ||
@@ -295,3 +284,3 @@ if (!this.state.text) return; | ||
if (parseInt(resp.code) !== 200) { | ||
_this3.setState({ | ||
_this2.setState({ | ||
showLoading: false, | ||
@@ -305,10 +294,16 @@ showTip: true, | ||
} else { | ||
_this3.setState({ | ||
showLoading: false | ||
_this2.setState({ | ||
showLoading: false, | ||
showTip: true, | ||
tipInfo: { | ||
infoType: 'success', | ||
title: resp.message, | ||
content: resp.moreMessage ? resp.moreMessage : [] | ||
} | ||
}); | ||
} | ||
_this3.afterSave(resp); | ||
_this2.afterSave(resp); | ||
}, function (error) { | ||
_this3.setState({ | ||
_this2.setState({ | ||
showLoading: false, | ||
@@ -315,0 +310,0 @@ showTip: true, |
{ | ||
"name": "@beisen-platform/export-form", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -207,5 +207,3 @@ import React,{ Component } from 'react'; | ||
// 先关闭form弹层,再提示 | ||
this.props.onSave && this.props.onSave(resultData,() => { | ||
this.setState({ showTip: true, tipInfo: { infoType: 'success',title: resultData.message,content: resultData.moreMessage ? resultData.moreMessage : []} }); | ||
}); | ||
this.props.onSave && this.props.onSave(); | ||
} | ||
@@ -223,5 +221,4 @@ onSave() { | ||
}else { | ||
this.setState({showLoading: false}); | ||
this.setState({showLoading: false,showTip: true, tipInfo: { infoType: 'success',title: resp.message,content: resp.moreMessage ? resp.moreMessage : []}}); | ||
} | ||
this.afterSave(resp); | ||
@@ -228,0 +225,0 @@ },error => { |
27179
646