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

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
@@ -1 +1,16 @@
1
- gx-design-vue
1
+ # ProTable
2
+
3
+ ```shell
4
+ pnpm add @gx-design-vue/pro-table
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,12 +1,12 @@
1
1
  import type { ExtractPropTypes } from 'vue';
2
- import type { RecordType } from './typing';
2
+ import type { RecordType } from '@gx-design-vue/pro-utils';
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';
6
6
  import { proTableProps } from './props';
7
7
  import './style/index.less';
8
8
  export declare type ProTableProps = Partial<ExtractPropTypes<typeof proTableProps>>;
9
- declare const ProTable: import("vue").DefineComponent<{
9
+ declare const GProTable: import("vue").DefineComponent<{
10
10
  rowSelection: {
11
11
  type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection<any>>;
12
12
  default: undefined;
@@ -237,7 +237,12 @@ declare const ProTable: import("vue").DefineComponent<{
237
237
  };
238
238
  sticky: {
239
239
  type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
240
- default: undefined;
240
+ default: undefined; /**
241
+ * @Author gx12358
242
+ * @DateTime 2022/1/21
243
+ * @lastTime 2022/1/21
244
+ * @description Tabel-loading hooks 方法
245
+ */
241
246
  };
242
247
  dropdownPrefixCls: StringConstructor;
243
248
  dataSource: {
@@ -250,10 +255,20 @@ declare const ProTable: import("vue").DefineComponent<{
250
255
  };
251
256
  locale: {
252
257
  type: import("vue").PropType<import("ant-design-vue/es/table/interface").TableLocale>;
253
- default: undefined;
254
- };
258
+ default: undefined; /**
259
+ * @Author gx12358
260
+ * @DateTime 2022/1/21
261
+ * @lastTime 2022/1/21
262
+ * @description Tabel-pagetion hooks 方法
263
+ */
264
+ }; /**
265
+ * @Author gx12358
266
+ * @DateTime 2022/1/21
267
+ * @lastTime 2022/1/21
268
+ * @description Tabel-pagetion hooks 方法
269
+ */
255
270
  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>;
271
+ 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
272
  default: undefined;
258
273
  };
259
274
  onResizeColumn: {
@@ -518,7 +533,12 @@ declare const ProTable: import("vue").DefineComponent<{
518
533
  };
519
534
  sticky: {
520
535
  type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
521
- default: undefined;
536
+ default: undefined; /**
537
+ * @Author gx12358
538
+ * @DateTime 2022/1/21
539
+ * @lastTime 2022/1/21
540
+ * @description Tabel-loading hooks 方法
541
+ */
522
542
  };
523
543
  dropdownPrefixCls: StringConstructor;
524
544
  dataSource: {
@@ -531,10 +551,20 @@ declare const ProTable: import("vue").DefineComponent<{
531
551
  };
532
552
  locale: {
533
553
  type: import("vue").PropType<import("ant-design-vue/es/table/interface").TableLocale>;
534
- default: undefined;
535
- };
554
+ default: undefined; /**
555
+ * @Author gx12358
556
+ * @DateTime 2022/1/21
557
+ * @lastTime 2022/1/21
558
+ * @description Tabel-pagetion hooks 方法
559
+ */
560
+ }; /**
561
+ * @Author gx12358
562
+ * @DateTime 2022/1/21
563
+ * @lastTime 2022/1/21
564
+ * @description Tabel-pagetion hooks 方法
565
+ */
536
566
  onChange: {
537
- 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>;
567
+ 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>;
538
568
  default: undefined;
539
569
  };
540
570
  onResizeColumn: {
@@ -619,7 +649,7 @@ declare const ProTable: import("vue").DefineComponent<{
619
649
  sticky: boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined;
620
650
  size: import("./typing").SizeType;
621
651
  locale: import("ant-design-vue/es/table/interface").TableLocale;
622
- 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;
652
+ 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;
623
653
  getPopupContainer: import("ant-design-vue/es/table/interface").GetPopupContainer;
624
654
  align: import("ant-design-vue/es/vc-table/interface").AlignType;
625
655
  autoScroll: boolean;
@@ -648,4 +678,4 @@ declare const ProTable: import("vue").DefineComponent<{
648
678
  dataSource: any[] | undefined;
649
679
  onResizeColumn: (w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void;
650
680
  }>;
651
- export default ProTable;
681
+ export default GProTable;
@@ -1,5 +1,3 @@
1
- import PropTypes from 'ant-design-vue/es/_util/vue-types';
2
- export { PropTypes };
3
1
  export * from './pagination/typings';
4
2
  export * from './table/typings';
5
3
  export * from './table/props';
@@ -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/pro-utils';
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,14 +1,4 @@
1
- import type { Slots } from 'vue';
2
1
  export { initDefaultProps } from 'ant-design-vue/es/_util/props-util';
3
2
  export { noteOnce, warning } from 'ant-design-vue/es/vc-util/warning';
4
- export interface prefixCls {
5
- suffixCls?: string;
6
- customizePrefixCls?: string;
7
- isPor?: boolean;
8
- className?: string;
9
- }
10
- export declare const getPrefixCls: ({ suffixCls, customizePrefixCls, isPor, className }: prefixCls) => string;
11
- export declare function getSlot<T>(slots: Slots, props: Record<string, unknown>, prop?: string): T | false;
12
- export declare function getSlotVNode<T>(slots: Slots, props: Record<string, unknown>, prop?: string): T | false;
13
3
  export * from './typings';
14
4
  export * from './ant-design-vue';
@@ -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/pro-utils';
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/pro-utils';
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/pro-utils';
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/pro-utils';
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/pro-utils';
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/pro-utils';
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/index.d.ts CHANGED
@@ -2,11 +2,11 @@ import './design/config.less';
2
2
  import './design/ant-design-theme.less';
3
3
  import './design/ant-design-vue.less';
4
4
  import './style/table.less';
5
- import './pro-table.less';
5
+ import './proTable.less';
6
6
  import './style.less';
7
7
  export { proTableProps } from './props';
8
8
  export { default } from './ProTable';
9
9
  export type { ProTableProps } from './ProTable';
10
10
  export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
11
11
  export type { ProColumn, ProColumns, ProSearchMap } from './types/ColumnTypings';
12
- export { default as ProTable } from './ProTable';
12
+ export { default as GProTable } from './ProTable';