2424 :on-success =" handleResumeUploadSuccess"
2525 :on-change =" handleResumeUploadChange"
2626 :on-progress =" handleResumeUploadProgress"
27+ :on-error =" handleResumeUploadError"
2728 >
2829 <div class =" uploadFile__resume" >
2930 <div class =" beforeUpload" v-if =" !uploadData.id" >
695696 class =" resumeEditor-footerAction"
696697 >
697698 <el-button round @click =" $router.push('/resume')" >取消</el-button >
698- <el-button round size =" medium" @click =" submit" type =" primary" >保存</el-button >
699+ <el-button round :loading = " submitLoading " size =" medium" @click =" submit" type =" primary" >保存</el-button >
699700 </div >
700701 </div >
701702</template >
@@ -715,6 +716,7 @@ let footerActionPosition = null;
715716export default {
716717 data () {
717718 return {
719+ submitLoading: false ,
718720 uploadData: {},
719721 resumeUploadUpdateHintVisible: false ,
720722 shouldEvaluate: true ,
@@ -1024,6 +1026,14 @@ export default {
10241026 return true ;
10251027 });
10261028 },
1029+ handleResumeUploadError (err ) {
1030+ this .$message ({
1031+ message: err .message ,
1032+ dangerouslyUseHTMLString: true ,
1033+ type: " error"
1034+ // duration: 0
1035+ });
1036+ },
10271037 handleResumeUploadProgress (progressEvent ) {
10281038 this .$refs .resumeUploadProgress .percentage = progressEvent .percent ;
10291039 },
@@ -1103,7 +1113,7 @@ export default {
11031113 }
11041114
11051115 const payload = this .transformResumePayload (this .resume );
1106-
1116+ this . submitLoading = true ;
11071117 fetchSaveResume (payload .id , {
11081118 resume: payload,
11091119
@@ -1112,8 +1122,11 @@ export default {
11121122 .then (res => {
11131123 this .$message .success (" 简历保存成功" );
11141124 this .$router .push (" /resume" );
1125+ this .submitLoading = false ;
11151126 })
1116- .catch (err => {});
1127+ .catch (err => {
1128+ this .submitLoading = false ;
1129+ });
11171130 },
11181131
11191132 transformResumePayload (data ) {
0 commit comments