fix(LockModal): Cannot unlock (#3143)
This commit is contained in:
parent
4b46be4a79
commit
cdac147bc8
|
|
@ -48,7 +48,7 @@
|
||||||
const getRealName = computed(() => userStore.getUserInfo?.realName);
|
const getRealName = computed(() => userStore.getUserInfo?.realName);
|
||||||
const [register, { closeModal }] = useModalInner();
|
const [register, { closeModal }] = useModalInner();
|
||||||
|
|
||||||
const [registerForm, { validateFields, resetFields }] = useForm({
|
const [registerForm, { validate, resetFields }] = useForm({
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
schemas: [
|
schemas: [
|
||||||
{
|
{
|
||||||
|
|
@ -63,17 +63,20 @@
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
async function handleLock() {
|
const handleLock = async () => {
|
||||||
const values = (await validateFields()) as any;
|
const { password = '' } = await validate<{
|
||||||
const password: string | undefined = values.password;
|
password: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
||||||
lockStore.setLockInfo({
|
lockStore.setLockInfo({
|
||||||
isLock: true,
|
isLock: true,
|
||||||
pwd: password,
|
pwd: password,
|
||||||
});
|
});
|
||||||
|
|
||||||
await resetFields();
|
await resetFields();
|
||||||
}
|
};
|
||||||
|
|
||||||
const avatar = computed(() => {
|
const avatar = computed(() => {
|
||||||
const { avatar } = userStore.getUserInfo;
|
const { avatar } = userStore.getUserInfo;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue