Browse Source

修改密码未关闭弹窗问题修复

JX.LI 2 years ago
parent
commit
9fc435dbe2
2 changed files with 6 additions and 2 deletions
  1. 4 1
      src/components/v-fastmenu.vue
  2. 2 1
      src/views/system/user/profile/resetPwd.vue

+ 4 - 1
src/components/v-fastmenu.vue

@@ -30,7 +30,7 @@
 				</div>
 				</div>
 			</el-popover>
 			</el-popover>
 		</div>
 		</div>
-    <el-dialog title="修改密码" :visible.sync="isResetPwd" v-if="isResetPwd" width="30%" append-to-body>
+    <el-dialog title="修改密码" :visible.sync="isResetPwd" v-if="isResetPwd" :close="close" width="30%" append-to-body>
       <resetPwd :user="user" />
       <resetPwd :user="user" />
     </el-dialog>
     </el-dialog>
 	</div>
 	</div>
@@ -104,6 +104,9 @@ import Cookies from 'js-cookie';
             location.href = '/index';
             location.href = '/index';
           })
           })
         }).catch(() => {});
         }).catch(() => {});
+      },
+      close(){
+        this.isResetPwd=false;
       }
       }
 		},
 		},
 		computed: {},
 		computed: {},

+ 2 - 1
src/views/system/user/profile/resetPwd.vue

@@ -56,12 +56,13 @@ export default {
         if (valid) {
         if (valid) {
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
             this.$modal.msgSuccess("修改成功");
             this.$modal.msgSuccess("修改成功");
+            this.$emit("close");
           });
           });
         }
         }
       });
       });
     },
     },
     close() {
     close() {
-      this.$tab.closePage();
+      this.$emit("close");
     }
     }
   }
   }
 };
 };