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,17 +1,16 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import type { VbenFormProps } from '@vben/common-ui';
import type { VxeGridProps } from '#/adapter/vxe-table';
import type { OssConfig } from '#/api/system/oss-config/model';
import { useAccess } from '@vben/access';
import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps,
} from '#/adapter/vxe-table';
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
import {
ossConfigChangeStatus,
ossConfigList,
@@ -78,19 +77,19 @@ function handleAdd() {
drawerApi.open();
}
async function handleEdit(record: Recordable<any>) {
async function handleEdit(record: OssConfig) {
drawerApi.setData({ id: record.ossConfigId });
drawerApi.open();
}
async function handleDelete(row: Recordable<any>) {
await ossConfigRemove(row.ossConfigId);
async function handleDelete(row: OssConfig) {
await ossConfigRemove([row.ossConfigId]);
await tableApi.query();
}
function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: any) => row.ossConfigId);
const ids = rows.map((row: OssConfig) => row.ossConfigId);
Modal.confirm({
title: '提示',
okType: 'danger',