Skip to content

Commit 7b48599

Browse files
fix: 修复第一次修改密码问题
1 parent db83988 commit 7b48599

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/src/views/user-manage/component/UserPwdDialog.vue

+4
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,16 @@
3737
</template>
3838
<script setup lang="ts">
3939
import { ref, reactive, watch } from 'vue'
40+
import useStore from '@/stores'
4041
import type { FormInstance, FormRules } from 'element-plus'
4142
import type { ResetPasswordRequest } from '@/api/type/user'
4243
import userApi from '@/api/user-manage'
4344
import { MsgSuccess } from '@/utils/message'
4445
4546
const emit = defineEmits(['refresh'])
4647
48+
const { user } = useStore()
49+
4750
const userFormRef = ref()
4851
const userForm = ref<any>({
4952
password: '',
@@ -113,6 +116,7 @@ const submit = async (formEl: FormInstance | undefined) => {
113116
if (valid) {
114117
userApi.putUserManagePassword(userId.value, userForm.value, loading).then((res) => {
115118
emit('refresh')
119+
user.profile()
116120
MsgSuccess('修改用户密码成功')
117121
dialogVisible.value = false
118122
})

0 commit comments

Comments
 (0)