fix: 修复第一次修改密码问题
This commit is contained in:
parent
db839887cf
commit
7b48599e57
@ -37,6 +37,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import useStore from '@/stores'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import type { ResetPasswordRequest } from '@/api/type/user'
|
||||
import userApi from '@/api/user-manage'
|
||||
@ -44,6 +45,8 @@ import { MsgSuccess } from '@/utils/message'
|
||||
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
||||
const { user } = useStore()
|
||||
|
||||
const userFormRef = ref()
|
||||
const userForm = ref<any>({
|
||||
password: '',
|
||||
@ -113,6 +116,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||
if (valid) {
|
||||
userApi.putUserManagePassword(userId.value, userForm.value, loading).then((res) => {
|
||||
emit('refresh')
|
||||
user.profile()
|
||||
MsgSuccess('修改用户密码成功')
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user