@@ -51,8 +51,8 @@ const store = new Vuex.Store({
});
store.subscribe((mutation, state) => {
- console.log(mutation.type);
- console.log(mutation.payload);
+ // console.log(mutation.type);
+ // console.log(mutation.payload);
export default store;
@@ -124,6 +124,24 @@ import {
export default {
name: 'UserEdit',
props: ['id'],
+ watch: {
+ id(nid, oid) {
+ this.editForm = {
+ username: '',
+ password: '',
+ nickname: '',
+ roleId: '',
+ deptId: '',
+ face: '',
+ };
+
+ this.fileList = [];
+ if (nid) {
+ this.getUserInfor(this.id);
+ }
+ },
data() {
return {
dialogVisible: false, // 预览头像的对话框