fix(hooks): 修复登录页切换登录页参数丢失问题

This commit is contained in:
Soybean
2021-09-16 20:11:45 +08:00
parent b4adf678a4
commit 789855a378
12 changed files with 144 additions and 100 deletions

View File

@ -13,7 +13,7 @@
</n-form-item>
<n-space :vertical="true" size="large">
<n-button type="primary" size="large" :block="true" :round="true" @click="handleSubmit">确定</n-button>
<n-button size="large" :block="true" :round="true" @click="toLogin('pwd-login')">返回</n-button>
<n-button size="large" :block="true" :round="true" @click="toCurrentLogin('pwd-login')">返回</n-button>
</n-space>
</n-form>
</div>
@ -26,7 +26,7 @@ import type { FormInst } from 'naive-ui';
import { useRouterChange, useSmsCode } from '@/hooks';
const message = useMessage();
const { toLogin } = useRouterChange();
const { toCurrentLogin } = useRouterChange();
const { label, isCounting, start } = useSmsCode();
const formRef = ref<(HTMLElement & FormInst) | null>(null);