chore: fix lint && typecheck

This commit is contained in:
Jin Mao
2026-03-25 16:33:24 +08:00
parent 9d69d7f46c
commit 417e6c2ade
7 changed files with 77 additions and 59 deletions

View File

@@ -4,20 +4,24 @@
## 导出
| 导出 | 类型 | 说明 |
|------|------|------|
| `setupVbenVxeTable` | 函数 | 初始化配置函数 |
| `useVbenVxeGrid` | 函数 | 表格组合式函数 |
| `VbenVxeGrid` | 组件 | 表格组件 |
| `VxeTableGridColumns` | 类型 | 表格列类型 |
| `VxeTableGridOptions` | 类型 | 表格配置类型 |
| `VxeGridProps` | 类型 | 表格 Props |
| `VxeGridListeners` | 类型 | 表格事件类型 |
| 导出 | 类型 | 说明 |
| --------------------- | ---- | -------------- |
| `setupVbenVxeTable` | 函数 | 初始化配置函数 |
| `useVbenVxeGrid` | 函数 | 表格组合式函数 |
| `VbenVxeGrid` | 组件 | 表格组件 |
| `VxeTableGridColumns` | 类型 | 表格列类型 |
| `VxeTableGridOptions` | 类型 | 表格配置类型 |
| `VxeGridProps` | 类型 | 表格 Props |
| `VxeGridListeners` | 类型 | 表格事件类型 |
## 使用
```ts
import { setupVbenVxeTable, useVbenVxeGrid, VbenVxeGrid } from '@vben/plugins/vxe-table';
import {
setupVbenVxeTable,
useVbenVxeGrid,
VbenVxeGrid,
} from '@vben/plugins/vxe-table';
```
## 初始化
@@ -39,5 +43,8 @@ setupVbenVxeTable({
## 类型
```ts
import type { VxeTableGridOptions, VxeGridProps } from '@vben/plugins/vxe-table';
```
import type {
VxeTableGridOptions,
VxeGridProps,
} from '@vben/plugins/vxe-table';
```

View File

@@ -1,10 +1,8 @@
import type { SetupVxeTable } from "./types";
import type { SetupVxeTable } from './types';
import { defineComponent, watch } from "vue";
import { defineComponent, watch } from 'vue';
import { usePreferences } from "@vben/preferences";
import { injectPluginsOptions } from "../plugins-context";
import { usePreferences } from '@vben/preferences';
import {
VxeButton,
@@ -19,13 +17,20 @@ import {
VxeSelect,
VxeTooltip,
VxeUI,
VxeUpload
} from "vxe-pc-ui";
import enUS from "vxe-pc-ui/lib/language/en-US"; // 导入默认的语言
import zhCN from "vxe-pc-ui/lib/language/zh-CN";
import { VxeColgroup, VxeColumn, VxeGrid, VxeTable, VxeToolbar } from "vxe-table";
VxeUpload,
} from 'vxe-pc-ui';
import enUS from 'vxe-pc-ui/lib/language/en-US'; // 导入默认的语言
import zhCN from 'vxe-pc-ui/lib/language/zh-CN';
import {
VxeColgroup,
VxeColumn,
VxeGrid,
VxeTable,
VxeToolbar,
} from 'vxe-table';
import { extendsDefaultFormatter } from "./extends"; // 是否加载过
import { injectPluginsOptions } from '../plugins-context';
import { extendsDefaultFormatter } from './extends'; // 是否加载过
// 是否加载过
let isInit = false;

View File

@@ -1,18 +1,19 @@
import type {
VxeGridListeners,
VxeGridProps as VxeTableGridProps,
VxeGridPropTypes,
VxeUIExport
} from "vxe-table";
VxeGridProps as VxeTableGridProps,
VxeUIExport,
} from 'vxe-table';
import type { Ref } from "vue";
import type { Ref } from 'vue';
import type { ClassType, DeepPartial } from "@vben/types";
import type { ClassType, DeepPartial } from '@vben/types';
import type { BaseFormComponentType, VbenFormProps } from "@vben-core/form-ui";
import { useVbenForm } from "@vben-core/form-ui";
import type { BaseFormComponentType, VbenFormProps } from '@vben-core/form-ui';
import type { VxeGridApi } from "./api";
import type { VxeGridApi } from './api';
import { useVbenForm } from '@vben-core/form-ui';
export interface VxePaginationInfo {
currentPage: number;

View File

@@ -331,7 +331,7 @@ async function init() {
watch(
formOptions,
() => {
formApi.setState((prev) => {
formApi.setState((prev: Record<string, any>) => {
const finalFormOptions: VbenFormProps = mergeWithArrayOverride(
{},
formOptions.value,