@gx-design-vue/pro-table 0.0.4-rc.1 → 0.0.5-rc.1

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.
package/README.md CHANGED
@@ -3,3 +3,14 @@
3
3
  ```shell
4
4
  pnpm add @gx-design-vue/pro-table
5
5
  ```
6
+
7
+ ```ts
8
+ // 可全局引入,也可以单独引入
9
+ import { GProTable } from '@gx-design-vue/pro-table'
10
+
11
+ // 如果引入了ant-design-vue 相关组件的样式(table、menu、tooltip、button、input、treeSelect、select、dataPicker、dropdown等相关组件),则执行下面
12
+ import '@gx-design-vue/pro-table/dist/ProTable.less'
13
+
14
+ // 如果没有引入了ant-design-vue 相关组件,则执行下面
15
+ import '@gx-design-vue/pro-table/dist/style.less'
16
+ ```
@@ -1,5 +1,5 @@
1
1
  import type { ExtractPropTypes } from 'vue';
2
- import type { RecordType } from './typing';
2
+ import type { RecordType } from '@gx-design-vue/global-type';
3
3
  import type { OptionConfig } from './types/TableTypings';
4
4
  import type { ProColumns } from './types/ColumnTypings';
5
5
  import type { HeaderTitleRender, TitleTipRender, ToolBarBtnRender, CustomizeRender, SettingExtraRender, OptionsExtraRender } from './types/SlotsTypings';
@@ -113,7 +113,12 @@ declare const GProTable: import("vue").DefineComponent<{
113
113
  neverScroll: import("vue").PropType<boolean>;
114
114
  columnEmptyText: {
115
115
  type: import("vue").PropType<import("./types/TableTypings").ProFieldEmptyText>;
116
- default: boolean;
116
+ default: boolean; /**
117
+ * @Author gx12358
118
+ * @DateTime 2022/1/21
119
+ * @lastTime 2022/1/21
120
+ * @description Tabel-datasource hooks 方法
121
+ */
117
122
  };
118
123
  onReset: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
119
124
  onReload: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
@@ -239,6 +244,12 @@ declare const GProTable: import("vue").DefineComponent<{
239
244
  type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
240
245
  default: undefined;
241
246
  };
247
+ /**
248
+ * @Author gx12358
249
+ * @DateTime 2022/1/21
250
+ * @lastTime 2022/1/21
251
+ * @description Tabel-loading hooks 方法
252
+ */
242
253
  dropdownPrefixCls: StringConstructor;
243
254
  dataSource: {
244
255
  type: import("vue").PropType<any[] | undefined>;
@@ -253,16 +264,10 @@ declare const GProTable: import("vue").DefineComponent<{
253
264
  default: undefined;
254
265
  };
255
266
  onChange: {
256
- type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
267
+ type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
257
268
  default: undefined;
258
269
  };
259
270
  onResizeColumn: {
260
- /**
261
- * @Author gx12358
262
- * @DateTime 2022/1/21
263
- * @lastTime 2022/1/21
264
- * @description Tabel-scroll hooks 方法
265
- */
266
271
  type: import("vue").PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
267
272
  default: undefined;
268
273
  };
@@ -400,7 +405,12 @@ declare const GProTable: import("vue").DefineComponent<{
400
405
  neverScroll: import("vue").PropType<boolean>;
401
406
  columnEmptyText: {
402
407
  type: import("vue").PropType<import("./types/TableTypings").ProFieldEmptyText>;
403
- default: boolean;
408
+ default: boolean; /**
409
+ * @Author gx12358
410
+ * @DateTime 2022/1/21
411
+ * @lastTime 2022/1/21
412
+ * @description Tabel-datasource hooks 方法
413
+ */
404
414
  };
405
415
  onReset: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
406
416
  onReload: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
@@ -526,6 +536,12 @@ declare const GProTable: import("vue").DefineComponent<{
526
536
  type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
527
537
  default: undefined;
528
538
  };
539
+ /**
540
+ * @Author gx12358
541
+ * @DateTime 2022/1/21
542
+ * @lastTime 2022/1/21
543
+ * @description Tabel-loading hooks 方法
544
+ */
529
545
  dropdownPrefixCls: StringConstructor;
530
546
  dataSource: {
531
547
  type: import("vue").PropType<any[] | undefined>;
@@ -540,16 +556,10 @@ declare const GProTable: import("vue").DefineComponent<{
540
556
  default: undefined;
541
557
  };
542
558
  onChange: {
543
- type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
559
+ type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
544
560
  default: undefined;
545
561
  };
546
562
  onResizeColumn: {
547
- /**
548
- * @Author gx12358
549
- * @DateTime 2022/1/21
550
- * @lastTime 2022/1/21
551
- * @description Tabel-scroll hooks 方法
552
- */
553
563
  type: import("vue").PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
554
564
  default: undefined;
555
565
  };
@@ -631,7 +641,7 @@ declare const GProTable: import("vue").DefineComponent<{
631
641
  sticky: boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined;
632
642
  size: import("./typing").SizeType;
633
643
  locale: import("ant-design-vue/es/table/interface").TableLocale;
634
- onChange: (pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void;
644
+ onChange: (pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void;
635
645
  getPopupContainer: import("ant-design-vue/es/table/interface").GetPopupContainer;
636
646
  align: import("ant-design-vue/es/vc-table/interface").AlignType;
637
647
  autoScroll: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { TableProps } from 'ant-design-vue';
2
2
  import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interface';
3
- import type { RecordType } from '../../../typing';
3
+ import type { RecordType } from '@gx-design-vue/global-type';
4
4
  export type { ContextSlots } from 'ant-design-vue/es/table/context';
5
5
  export type { Key, SortOrder, ColumnFilterItem, ColumnTitle, CompareFn, FilterDropdownProps, GetRowKey, ColumnsType, ExpandType, TablePaginationConfig, TableAction, TableLocale, TableCurrentDataSource, ColumnType, TableRowSelection, GetPopupContainer } from 'ant-design-vue/es/table/interface';
6
6
  export type { AlignType, CellEllipsisType, DataIndex, FixedType, GetComponentProps, RenderedCell } from 'ant-design-vue/es/vc-table/interface';
@@ -8,4 +8,4 @@ export type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Tabl
8
8
  export declare type TableFilters = Record<string, FilterValue | null>;
9
9
  export declare type TableSorterRecord = SorterResult<RecordType>;
10
10
  export declare type TableSorter = TableSorterRecord | TableSorterRecord[];
11
- export type { TableProps, FilterValue };
11
+ export type { TableProps, FilterValue, SorterResult };
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, Plugin } from 'vue';
1
+ import type { CSSProperties } from 'vue';
2
2
  declare type triggerTypes = 'hover' | 'focus' | 'click' | 'contextmenu';
3
3
  declare type placementTypes = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
4
4
  export declare type abstractTooltipProps = {
@@ -35,6 +35,4 @@ export declare type SpinProps = {
35
35
  delay?: number;
36
36
  indicator?: any;
37
37
  };
38
- export declare type SFCWithInstall<T> = T & Plugin;
39
- export declare const withInstall: <T>(comp: T) => SFCWithInstall<T>;
40
38
  export {};
@@ -1,12 +1,13 @@
1
- import type { PropType, RecordType } from '../../typing';
1
+ import type { PropType } from 'vue';
2
+ import type { RecordType } from '@gx-design-vue/global-type';
2
3
  import type { ProSearchMap } from '../../types/ColumnTypings';
3
4
  import './style.less';
4
5
  declare const ProTableForm: import("vue").DefineComponent<{
5
6
  search: {
6
- type: import("vue").PropType<import("../../types/TableTypings").SearchConfig>;
7
+ type: PropType<import("../../types/TableTypings").SearchConfig>;
7
8
  default: () => import("../../types/TableTypings").SearchConfig;
8
9
  };
9
- modal: import("vue").PropType<boolean>;
10
+ modal: PropType<boolean>;
10
11
  searchMap: {
11
12
  type: PropType<ProSearchMap<"text">[]>;
12
13
  default: () => never[];
@@ -16,10 +17,10 @@ declare const ProTableForm: import("vue").DefineComponent<{
16
17
  defaultParams: PropType<RecordType>;
17
18
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
19
  search: {
19
- type: import("vue").PropType<import("../../types/TableTypings").SearchConfig>;
20
+ type: PropType<import("../../types/TableTypings").SearchConfig>;
20
21
  default: () => import("../../types/TableTypings").SearchConfig;
21
22
  };
22
- modal: import("vue").PropType<boolean>;
23
+ modal: PropType<boolean>;
23
24
  searchMap: {
24
25
  type: PropType<ProSearchMap<"text">[]>;
25
26
  default: () => never[];
@@ -1,4 +1,4 @@
1
- import type { RecordType } from '../../typing';
1
+ import type { RecordType } from '@gx-design-vue/global-type';
2
2
  import type { ProSearchMap } from '../../types/ColumnTypings';
3
3
  export declare function useForm(defaultParams: RecordType, searchMap: ProSearchMap[]): {
4
4
  formState: any;
@@ -1,4 +1,5 @@
1
- import type { VueNode, PropType } from '../../typing';
1
+ import type { PropType } from 'vue';
2
+ import type { VueNode } from '@gx-design-vue/global-type';
2
3
  import './style.less';
3
4
  export declare type ListToolBarSetting = {
4
5
  icon: VueNode;
@@ -8,48 +9,48 @@ export declare type ListToolBarSetting = {
8
9
  };
9
10
  declare const ListToolBar: import("vue").DefineComponent<{
10
11
  actions: {
11
- type: import("vue").PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
12
+ type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
12
13
  default: () => undefined;
13
14
  };
14
15
  settings: PropType<VueNode[]>;
15
16
  titleTip: {
16
- type: import("vue").PropType<import("../../types/SlotsTypings").TitleTipRender>;
17
+ type: PropType<import("../../types/SlotsTypings").TitleTipRender>;
17
18
  default: () => undefined;
18
19
  };
19
20
  prefixCls: StringConstructor;
20
21
  headerTitle: {
21
- type: import("vue").PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
22
+ type: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
22
23
  default: () => undefined;
23
24
  };
24
25
  titleTipText: {
25
- type: import("vue").PropType<string>;
26
+ type: PropType<string>;
26
27
  default: string;
27
28
  };
28
29
  optionsExtra: {
29
- type: import("vue").PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
30
+ type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
30
31
  default: () => undefined;
31
32
  };
32
33
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
34
  actions: {
34
- type: import("vue").PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
35
+ type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
35
36
  default: () => undefined;
36
37
  };
37
38
  settings: PropType<VueNode[]>;
38
39
  titleTip: {
39
- type: import("vue").PropType<import("../../types/SlotsTypings").TitleTipRender>;
40
+ type: PropType<import("../../types/SlotsTypings").TitleTipRender>;
40
41
  default: () => undefined;
41
42
  };
42
43
  prefixCls: StringConstructor;
43
44
  headerTitle: {
44
- type: import("vue").PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
45
+ type: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
45
46
  default: () => undefined;
46
47
  };
47
48
  titleTipText: {
48
- type: import("vue").PropType<string>;
49
+ type: PropType<string>;
49
50
  default: string;
50
51
  };
51
52
  optionsExtra: {
52
- type: import("vue").PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
53
+ type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
53
54
  default: () => undefined;
54
55
  };
55
56
  }>>, {
@@ -1,7 +1,7 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { SpinProps, TableSorter } from '../_utils';
3
+ import type { RecordType } from '@gx-design-vue/global-type';
3
4
  import type { ProTableProps } from '../ProTable';
4
- import type { RecordType } from '../typing';
5
5
  import type { ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
6
6
  import type { ProColumns } from '../types/ColumnTypings';
7
7
  interface ActionType {
@@ -7,7 +7,7 @@ export declare function useLoading({ emit, loading }: {
7
7
  getLoading: import("vue").ComputedRef<boolean | {
8
8
  prefixCls?: string | undefined;
9
9
  spinning?: boolean | undefined;
10
- size?: "small" | "large" | "default" | undefined;
10
+ size?: "small" | "default" | "large" | undefined;
11
11
  wrapperClassName?: string | undefined;
12
12
  tip?: string | undefined;
13
13
  delay?: number | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
- import type { RecordType } from '../typing';
2
+ import type { RecordType } from '@gx-design-vue/global-type';
3
3
  import type { ProTableProps } from '../ProTable';
4
4
  export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableProps['rowSelection']>): {
5
5
  selectedKey: Ref<(string | number)[]>;
@@ -1,5 +1,5 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
- import type { RecordType } from '../typing';
2
+ import type { RecordType } from '@gx-design-vue/global-type';
3
3
  import type { ProTableProps } from '../ProTable';
4
4
  import type { SearchConfig } from '../types/TableTypings';
5
5
  import type { ProSearchMap } from '../types/ColumnTypings';
package/dist/props.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { CSSProperties, PropType } from 'vue';
2
- import type { RecordType, SizeType } from './typing';
2
+ import type { RecordType } from '@gx-design-vue/global-type';
3
+ import type { SizeType } from './typing';
3
4
  import type { OptionConfig, RequsetFunction, ProFieldEmptyText, ProTablePagination, ProTableRowSelection, SearchConfig } from './types/TableTypings';
4
5
  import type { ProColumns, ProSearchMap } from './types/ColumnTypings';
5
6
  import type { CustomizeRender, HeaderTitleRender, OptionsExtraRender, PageItemRender, SettingExtraRender, TitleTipRender, ToolBarBtnRender } from './types/SlotsTypings';
@@ -378,7 +379,7 @@ export declare const proTableProps: {
378
379
  default: undefined;
379
380
  };
380
381
  onChange: {
381
- type: PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
382
+ type: PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
382
383
  default: undefined;
383
384
  };
384
385
  onResizeColumn: {
@@ -1,6 +1,7 @@
1
1
  import type { VNodeChild } from 'vue';
2
2
  import type { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip';
3
- import type { RecordType, VueNode, Breakpoint } from '../typing';
3
+ import type { RecordType, VueNode } from '@gx-design-vue/global-type';
4
+ import type { Breakpoint } from '../typing';
4
5
  import type { ColumnFilterItem, ColumnTitle, CompareFn, FilterDropdownProps, FilterValue, Key, SortOrder, AlignType, CellEllipsisType, DataIndex, FixedType, GetComponentProps, RenderedCell } from '../_utils';
5
6
  /**
6
7
  * @param text 文本框
@@ -1,4 +1,4 @@
1
- import type { CustomRender, WithFalse } from '../typing';
1
+ import type { CustomRender, WithFalse } from '@gx-design-vue/global-type';
2
2
  export declare type HeaderTitleRender = WithFalse<CustomRender>;
3
3
  export declare type TitleTipRender = WithFalse<CustomRender>;
4
4
  export declare type ToolBarBtnRender = WithFalse<CustomRender>;
@@ -1,5 +1,6 @@
1
1
  import type { VNodeChild } from 'vue';
2
- import type { RecordType, Breakpoint, WithFalse, CustomRender } from '../typing';
2
+ import type { RecordType, WithFalse, CustomRender } from '@gx-design-vue/global-type';
3
+ import type { Breakpoint } from '../typing';
3
4
  import type { TableRowSelection, TablePaginationConfig, SpinProps, TableFilters, TableSorter } from '../_utils';
4
5
  import type { ColumnSettingProps } from '../components/ColumnSetting';
5
6
  export declare type ProTabelFeachParams = {
package/dist/typing.d.ts CHANGED
@@ -1,8 +1,2 @@
1
- import type { Slot, VNode, VNodeChild, PropType as VuePropType } from 'vue';
2
1
  export declare type SizeType = 'small' | 'middle' | 'large' | undefined;
3
2
  export declare type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
4
- export declare type WithFalse<T> = T | false;
5
- export declare type RecordType = Record<string, any>;
6
- export declare type PropType<T> = VuePropType<T>;
7
- export declare type VueNode = VNodeChild | JSX.Element;
8
- export declare type CustomRender = Slot | VNodeChild | VNode | ((...props: any[]) => Slot) | ((...props: any[]) => VNode) | ((...args: any[]) => VNode) | VNode[] | JSX.Element | string | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-table",
3
- "version": "0.0.4-rc.01",
3
+ "version": "0.0.5-rc.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",
@@ -37,6 +37,7 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@shared/vite-plugin-less-copy": "workspace:^0.0.0",
40
+ "@gx-design-vue/global-type": "workspace:^0.0.0",
40
41
  "@rollup/plugin-typescript": "^8.3.0",
41
42
  "@rushstack/eslint-patch": "^1.1.0",
42
43
  "@types/lodash-es": "^4.17.6",