refactor: type/注释优化 去除大量any

This commit is contained in:
dap
2025-01-10 14:02:21 +08:00
parent 6e3b468303
commit 9f6bee86f0
81 changed files with 710 additions and 367 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import type { ResetPwdParam, User } from '#/api/system/user/model';
import { useVbenModal, z } from '@vben/common-ui';
@@ -68,7 +68,7 @@ async function handleOpenChange(open: boolean) {
if (!open) {
return null;
}
const { record } = modalApi.getData() as { record: Recordable<any> };
const { record } = modalApi.getData() as { record: User };
setDescProps({ data: record }, true);
await formApi.setValues({ userId: record.userId });
}
@@ -81,7 +81,7 @@ async function handleSubmit() {
return;
}
const data = await formApi.getValues();
await userResetPassword(data as any);
await userResetPassword(data as ResetPwdParam);
emit('reload');
handleCancel();
} catch (error) {