@gx-design-vue/pro-table 0.2.0-beta.105 → 0.2.0-beta.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,8 @@
1
1
  import type { CSSProperties, SlotsType } from 'vue';
2
2
  import type { Key, SpinProps } from './_utils';
3
- import type { ProColumnsType } from './types/ColumnTypings';
4
3
  import type { OptionConfig, ProTableProps, SearchConfig } from './types/TableTypings';
5
4
  import { type RecordType } from '@gx-design-vue/pro-utils';
6
- import { AntTabelSlotsType, DefaultRender } from './types/SlotsTypings';
5
+ import { AntTableSlotsType, DefaultRender } from './types/SlotsTypings';
7
6
  declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
7
  rowSelection: {
9
8
  type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection>;
@@ -11,7 +10,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
11
10
  };
12
11
  columns: {
13
12
  type: import("vue").PropType<ProTableProps["columns"]>;
14
- default: never[];
13
+ default: () => never[];
15
14
  };
16
15
  pagination: {
17
16
  type: import("vue").PropType<ProTableProps["pagination"]>;
@@ -163,7 +162,12 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
163
162
  default: undefined;
164
163
  };
165
164
  'onUpdate:expandedRowKeys': {
166
- type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
165
+ type: import("vue" /**
166
+ * @Author gx12358
167
+ * @DateTime 2022/1/21
168
+ * @lastTime 2022/1/21
169
+ * @description Table-loading hooks 方法
170
+ */).PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
167
171
  default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
168
172
  };
169
173
  }>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "submit" | "change" | "requestError" | "reload" | "loadingChange" | "sizeChange" | "expandedRowsChange" | "expand" | "beforeSearchSubmit" | "columnsStateChange")[], "reset" | "submit" | "change" | "requestError" | "reload" | "loadingChange" | "sizeChange" | "expandedRowsChange" | "expand" | "beforeSearchSubmit" | "columnsStateChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -173,7 +177,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
173
177
  };
174
178
  columns: {
175
179
  type: import("vue").PropType<ProTableProps["columns"]>;
176
- default: never[];
180
+ default: () => never[];
177
181
  };
178
182
  pagination: {
179
183
  type: import("vue").PropType<ProTableProps["pagination"]>;
@@ -325,7 +329,12 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
325
329
  default: undefined;
326
330
  };
327
331
  'onUpdate:expandedRowKeys': {
328
- type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
332
+ type: import("vue" /**
333
+ * @Author gx12358
334
+ * @DateTime 2022/1/21
335
+ * @lastTime 2022/1/21
336
+ * @description Table-loading hooks 方法
337
+ */).PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
329
338
  default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
330
339
  };
331
340
  }>> & Readonly<{
@@ -341,7 +350,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
341
350
  onBeforeSearchSubmit?: ((...args: any[]) => any) | undefined;
342
351
  onColumnsStateChange?: ((...args: any[]) => any) | undefined;
343
352
  }>, {
344
- columns: ProColumnsType<RecordType, RecordType> | undefined;
353
+ columns: import("./types/ColumnTypings").ProColumnsType<RecordType, RecordType> | undefined;
345
354
  scroll: {
346
355
  x?: number | true | string;
347
356
  y?: number | string;
@@ -367,8 +376,8 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
367
376
  bordered: boolean | undefined;
368
377
  rowSelection: import("./types/TableTypings").ProTableRowSelection;
369
378
  'onUpdate:expandedRowKeys': (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
379
+ align: import("ant-design-vue/es/vc-table/interface").AlignType | undefined;
370
380
  customRender: import("./types/SlotsTypings").CustomDataRender | undefined;
371
- align: "center" | "left" | "right" | undefined;
372
381
  autoScroll: boolean | undefined;
373
382
  tableProps: {
374
383
  class?: string;
@@ -389,7 +398,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
389
398
  options: boolean | OptionConfig | undefined;
390
399
  waitRequest: boolean | undefined;
391
400
  debounceTime: number | undefined;
392
- request: import("./types/TableTypings").RequsetFunction<RecordType, RecordType> | undefined;
401
+ request: import("./types/TableTypings").RequestFunction<RecordType, RecordType> | undefined;
393
402
  params: RecordType | undefined;
394
403
  search: false | SearchConfig | undefined;
395
404
  searchMap: import("./types/ColumnTypings").ProSearchMap<undefined, string>[] | undefined;
@@ -413,5 +422,5 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
413
422
  currentData: any[];
414
423
  dataSource: any[];
415
424
  }): void;
416
- } & AntTabelSlotsType>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
425
+ } & AntTableSlotsType>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
417
426
  export default ProTable;
@@ -3,7 +3,7 @@ import type { ColumnType, TableProps } from 'ant-design-vue/es/table';
3
3
  import type { ColumnsType, FilterValue, GetPopupContainer, SorterResult, SortOrder, TableCurrentDataSource, TableLocale } from 'ant-design-vue/es/table/interface';
4
4
  import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
5
5
  export type { SelectionSelectFn, TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
6
- export type { DataIndex, Key, RenderExpandIconProps } from 'ant-design-vue/es/vc-table/interface';
6
+ export type { AlignType, DataIndex, Key, RenderExpandIconProps } from 'ant-design-vue/es/vc-table/interface';
7
7
  export type TableFilters = Record<string, FilterValue | null>;
8
8
  export type TableSorterRecord = SorterResult<RecordType>;
9
9
  export type TableSorter = TableSorterRecord | TableSorterRecord[];
@@ -15,9 +15,8 @@ type UseColumnsType = {
15
15
  export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
16
16
  export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
17
17
  breakpoint: ComputedRef<boolean | undefined>;
18
- proColumns: ComputedRef<(import("@gx-design-vue/pro-utils/dist").DefaultProColumn & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("@gx-design-vue/pro-utils/dist").RecordType>, "key" | "dataIndex" | "width"> & {
18
+ proColumns: ComputedRef<(import("../types/ColumnTypings").DefaultProColumnWithKeyOrDataIndex<import("@gx-design-vue/pro-utils/dist").RecordType> & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("@gx-design-vue/pro-utils/dist").RecordType>, keyof import("../types/ColumnTypings").DefaultProColumn | "key" | "dataIndex"> & {
19
19
  children?: ProColumnsType<import("@gx-design-vue/pro-utils/dist").RecordType, import("@gx-design-vue/pro-utils/dist").RecordType> | undefined;
20
- uuid?: string | number;
21
20
  index?: number;
22
21
  copyText?: string | ((record: ProColumnType) => string);
23
22
  tooltip?: false | (Partial<import("vue").ExtractPropTypes<{
@@ -88,8 +87,6 @@ export declare function useColumns({ scroll, columns, breakpoint, draggabled, au
88
87
  class?: string;
89
88
  }) | undefined;
90
89
  show?: boolean;
91
- key?: string | undefined;
92
- dataIndex?: string | undefined;
93
90
  order?: number;
94
91
  hideInSetting?: boolean;
95
92
  searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
@@ -1,7 +1,7 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
- import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils/ant-design-vue/table/typings';
2
+ import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils';
3
3
  import type { ProColumnsType } from '../types/ColumnTypings';
4
- import type { ProTabelFeachParams, ProTablePagination, ProTablePaginationConfig, ProTableProps, SearchConfig } from '../types/TableTypings';
4
+ import type { ProTableFetchParams, ProTablePagination, ProTablePaginationConfig, ProTableProps, SearchConfig } from '../types/TableTypings';
5
5
  import { type RecordType } from '@gx-design-vue/pro-utils';
6
6
  interface ActionType {
7
7
  loading: ComputedRef<boolean | undefined>;
@@ -32,12 +32,12 @@ export declare function useFetchData({ rowKey, polling, request, postData, dataS
32
32
  isTreeDataRef: ComputedRef<boolean>;
33
33
  reSetDataList: (list: RecordType[]) => void;
34
34
  changeDataValue: ({ key, type, params, value }: {
35
- params: Partial<RecordType>;
35
+ params?: Partial<RecordType> | undefined;
36
36
  key?: string | undefined;
37
37
  value?: any;
38
38
  type?: "update" | "push" | "delete" | "unshift";
39
39
  }) => void;
40
40
  handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
41
- reload: (info?: ProTabelFeachParams) => Promise<void>;
41
+ reload: (info?: ProTableFetchParams) => Promise<void>;
42
42
  };
43
43
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { BaseTableProps } from '../props';
3
3
  import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
4
- import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequsetConfig, RequsetFunction } from '../types/TableTypings';
4
+ import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequestConfig, RequestFunction } from '../types/TableTypings';
5
5
  import { type RecordType } from '@gx-design-vue/pro-utils';
6
6
  export type ProTableState<T extends object = RecordType, R extends object = RecordType> = BaseTableProps & {
7
7
  params: R;
@@ -18,14 +18,14 @@ export type ProTableState<T extends object = RecordType, R extends object = Reco
18
18
  export type BaseTableState<T extends object = RecordType, R extends object = RecordType> = Omit<ProTableProps<T, R>, 'request'>;
19
19
  export declare function useTable<T extends object = RecordType, R extends object = RecordType>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
20
20
  state?: BaseTableState<T, R>;
21
- request?: RequsetFunction<T, R>;
21
+ request?: RequestFunction<T, R>;
22
22
  }): {
23
23
  loading: Ref<boolean>;
24
24
  dataSource: ComputedRef<T[]>;
25
25
  selectedKeys: ProCoreActionType<T, R>['selectedKeys'];
26
26
  selectedItems: ProCoreActionType<T, R>['selectedItems'];
27
27
  rowsSelection: ProCoreActionType<T, R>['rowsSelection'];
28
- requestParams: ComputedRef<RequsetConfig<R>['params']>;
28
+ requestParams: ComputedRef<RequestConfig<R>['params']>;
29
29
  reload: ProCoreActionType<T, R>['reload'];
30
30
  mutate: ProCoreActionType<T, R>['reSetDataList'];
31
31
  setPageAndReload: ProCoreActionType<T, R>['setPageAndReload'];
package/dist/index.d.ts CHANGED
@@ -6,4 +6,4 @@ export { default as GProTable } from './ProTable';
6
6
  export type { ProColumnsType, ProColumnType, ProSearchMap } from './types/ColumnTypings';
7
7
  export type { CustomRenderResult, ProTableBodyCellProps } from './types/SlotsTypings';
8
8
  export type { PageState, ProTableProps } from './types/TableTypings';
9
- export type { OptionConfig, ProCoreActionType, ProCoreFormType, ProTabelFeachParams, ProTableRef, RequsetFunction, SearchConfig } from './types/TableTypings';
9
+ export type { OptionConfig, ProCoreActionType, ProCoreFormType, ProTableFetchParams, ProTableRef, RequestFunction, SearchConfig } from './types/TableTypings';