提交 412a5adc 编写于 作者: yubinCloud's avatar yubinCloud

9-4 修改的时候用户名不允许修改

上级 7edbfae4
......@@ -73,7 +73,8 @@ public class UserService {
}
} else {
// 更新
userMapper.updateByPrimaryKey(user);
user.setLoginName(null); // 设置为空使得接下来对 user 的更新不再更新 LoginName 字段
userMapper.updateByPrimaryKeySelective(user);
}
}
......
......@@ -58,7 +58,7 @@
>
<a-form :model="user" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
<a-form-item label="登陆名">
<a-input v-model:value="user.loginName" />
<a-input v-model:value="user.loginName" :disabled="!!user.id"/>
</a-form-item>
<a-form-item label="昵称">
<a-input v-model:value="user.name" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册