chore: 更新codegen

This commit is contained in:
dap
2024-09-26 11:35:16 +08:00
parent 8d4378ad7f
commit 62e7cc6e7b
3 changed files with 10 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ import { formSchema } from './basic';
/**
* 从父组件注入
*/
const genInfoData = inject('genInfoData') as Ref<GenInfo>;
const genInfoData = inject('genInfoData') as Ref<GenInfo['info']>;
const [BasicForm, formApi] = useVbenForm({
commonConfig: {
@@ -99,7 +99,7 @@ async function initMenuSelect() {
}
onMounted(async () => {
const { info } = genInfoData.value;
const info = genInfoData.value;
for (const key in info) {
formApi.setFieldValue(key, info[key as keyof typeof info]);
}
@@ -113,7 +113,7 @@ async function handleNext() {
return null;
}
const data = await formApi.getValues();
Object.assign(genInfoData.value.info, data);
Object.assign(genInfoData.value, data);
toCurrentStep(1);
} catch (error) {
console.error(error);