Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { VbenFormSchema } from '@vben-core/form-ui';
|
||||
|
||||
import type { LoginCodeEmits } from './types';
|
||||
|
||||
import { computed, reactive } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
@@ -19,7 +17,7 @@ interface Props {
|
||||
*/
|
||||
loading?: boolean;
|
||||
/**
|
||||
* @zh_CN 登陆路径
|
||||
* @zh_CN 登录路径
|
||||
*/
|
||||
loginPath?: string;
|
||||
/**
|
||||
@@ -49,12 +47,12 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
submit: LoginCodeEmits['submit'];
|
||||
submit: [{ code: string; phoneNumber: string; tenantId: string }];
|
||||
}>();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const [Form, { validate, setFieldValue }] = useVbenForm(
|
||||
const [Form, { validate, setFieldValue, getValues }] = useVbenForm(
|
||||
reactive({
|
||||
commonConfig: {
|
||||
hideLabel: true,
|
||||
@@ -66,8 +64,8 @@ const [Form, { validate, setFieldValue }] = useVbenForm(
|
||||
);
|
||||
|
||||
async function handleSubmit() {
|
||||
const { valid, values } = await validate();
|
||||
|
||||
const { valid } = await validate();
|
||||
const values = await getValues();
|
||||
if (valid) {
|
||||
emit('submit', {
|
||||
tenantId: values?.tenantId,
|
||||
|
Reference in New Issue
Block a user