@gx-design-vue/pro-table 0.0.2-rc.1 → 0.0.2-rc.10

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.
Files changed (45) hide show
  1. package/dist/ProTable.d.ts +84 -113
  2. package/dist/_utils/ant-design-vue/pagination/typings.d.ts +1 -1
  3. package/dist/_utils/ant-design-vue/table/props.d.ts +2 -1
  4. package/dist/_utils/ant-design-vue/table/typings.d.ts +1 -0
  5. package/dist/_utils/index.d.ts +0 -1
  6. package/dist/components/ColumnSetting/index.d.ts +1 -0
  7. package/dist/components/ColumnSetting/style.less +1 -3
  8. package/dist/components/Form/index.d.ts +1 -0
  9. package/dist/components/Form/style.less +1 -8
  10. package/dist/components/Form/useForm.d.ts +1 -0
  11. package/dist/components/ListToolBar/index.d.ts +13 -12
  12. package/dist/components/ListToolBar/style.less +1 -0
  13. package/dist/components/ToolBar/index.d.ts +1 -0
  14. package/dist/components/ToolBar/style.less +1 -28
  15. package/dist/context/TableContext.d.ts +2 -1
  16. package/dist/design/ant-design-theme.less +4 -0
  17. package/dist/design/ant-design-vue.less +19 -0
  18. package/dist/design/config.less +0 -5
  19. package/dist/hooks/useDebounceFn.d.ts +1 -5
  20. package/dist/hooks/useFetchData.d.ts +5 -4
  21. package/dist/hooks/useLoading.d.ts +1 -1
  22. package/dist/hooks/useRowSelection.d.ts +1 -0
  23. package/dist/hooks/useTableForm.d.ts +1 -0
  24. package/dist/hooks/useTableScroll.d.ts +1 -0
  25. package/dist/hooks/useTableSize.d.ts +1 -1
  26. package/dist/index.d.ts +5 -1
  27. package/dist/pro-table.less +5 -0
  28. package/dist/pro-table.mjs +752 -748
  29. package/dist/pro-table.umd.js +1 -1
  30. package/dist/props.d.ts +27 -21
  31. package/dist/style/index.less +9 -0
  32. package/dist/style/table.less +0 -8
  33. package/dist/style.css +1 -1
  34. package/dist/style.less +3 -5
  35. package/dist/types/column.d.ts +1 -0
  36. package/dist/types/table.d.ts +18 -12
  37. package/dist/typing.d.ts +9 -0
  38. package/package.json +11 -13
  39. package/dist/_utils/gx-design-vue/extract-public-props.d.ts +0 -7
  40. package/dist/_utils/gx-design-vue/index.d.ts +0 -2
  41. package/dist/_utils/gx-design-vue/typings.d.ts +0 -1
  42. package/dist/hooks/core/index.d.ts +0 -3
  43. package/dist/hooks/core/useMemo.d.ts +0 -10
  44. package/dist/hooks/core/useTimeout.d.ts +0 -11
  45. package/dist/typings/components.d.ts +0 -6
package/dist/style.less CHANGED
@@ -1,5 +1,3 @@
1
- @import './style/index.less';
2
- @import './components/ColumnSetting/style.less';
3
- @import './components/Form/style.less';
4
- @import './components/ListToolBar/style.less';
5
- @import './components/ToolBar/style.less';
1
+ @import './design/ant-design-theme.less';
2
+ @import './design/ant-design-vue.less';
3
+ @import './pro-table.less';
@@ -1,5 +1,6 @@
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
4
  import type { ColumnFilterItem, ColumnTitle, CompareFn, FilterDropdownProps, FilterValue, Key, SortOrder, AlignType, CellEllipsisType, DataIndex, FixedType, GetComponentProps, RenderedCell } from '../_utils';
4
5
  /**
5
6
  * @param text 文本框
@@ -1,5 +1,6 @@
1
1
  import type { VNodeChild } from 'vue';
2
- import type { TableRowSelection, TablePaginationConfig } from '@proTable/_utils';
2
+ import type { RecordType, VueNode, Breakpoint, WithFalse, CustomRender } from '../typing';
3
+ import type { TableRowSelection, TablePaginationConfig, SpinProps } from '../_utils';
3
4
  export declare type ProTabelFeachParams = {
4
5
  params?: any;
5
6
  filters?: any;
@@ -21,16 +22,20 @@ export interface ProTablePaginationConfig extends Omit<TablePaginationConfig, 'p
21
22
  }
22
23
  export declare type ProTablePagination = ProTablePaginationConfig | false;
23
24
  export declare type SortOrder = 'descend' | 'ascend' | null;
24
- export declare type RequestData = {
25
- data: any[] | undefined;
26
- success?: boolean;
27
- total?: number;
25
+ export declare type RequestData<T = any> = {
26
+ data: T[] | undefined;
27
+ success: boolean;
28
+ total: number;
28
29
  } & RecordType;
29
- export declare type requsetConfig = (params: {
30
- pageSize?: number;
31
- current?: number;
32
- keyword?: string;
33
- }, sort: Record<string, SortOrder>, filter: Record<string, any[] | null>) => Promise<Partial<RequestData>>;
30
+ export declare type RequsetConfig = {
31
+ params: {
32
+ pageSize?: number;
33
+ pageNum?: number;
34
+ };
35
+ sort: Record<string, SortOrder>;
36
+ filter: Record<string, any[] | null>;
37
+ };
38
+ export declare type RequsetFunction<T = any> = (params: RequsetConfig['params'], sort: RequsetConfig['sort'], filter: RequsetConfig['filter']) => Promise<Partial<RequestData<T>>>;
34
39
  export declare type ColConfig = Partial<Record<Breakpoint, number>>;
35
40
  export declare type SearchConfig = {
36
41
  searchText?: string;
@@ -57,6 +62,7 @@ export interface OptionConfig {
57
62
  export declare type ProCoreActionTypeConfig = {
58
63
  formParams?: RecordType;
59
64
  pageParams?: RecordType | boolean;
65
+ getLoadingStatus?: boolean | SpinProps | undefined;
60
66
  /** @name 刷新 */
61
67
  reload?: (info?: ProTabelFeachParams) => void;
62
68
  /** @name 刷新并清空表单,重置为第一页 */
@@ -66,9 +72,9 @@ export declare type ProCoreActionTypeConfig = {
66
72
  /** @name 更新TableData属性值 */
67
73
  reSetDataList?: (data: RecordType[]) => void;
68
74
  /** @name 更新TableData属性值 */
69
- changeDataValue?: ({ key, value }: {
75
+ changeDataValue?: ({ key, params }: {
70
76
  key?: string;
71
- value: RecordType;
77
+ params: RecordType;
72
78
  }) => void;
73
79
  /** @name 改变loading状态 */
74
80
  loadingOperation?: (loading: boolean) => void;
@@ -0,0 +1,9 @@
1
+ import type { Slot, VNode, VNodeChild, PropType as VuePropType } from 'vue';
2
+ export declare type SizeType = 'small' | 'middle' | 'large' | undefined;
3
+ export declare type WithFalse<T> = T | false;
4
+ export declare type RecordType = Record<string, any>;
5
+ export declare type PropType<T> = VuePropType<T>;
6
+ export declare type VueNode = VNodeChild | JSX.Element;
7
+ export declare type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
8
+ export declare type ProVueNode = VueNode | VueNode[] | WithFalse<() => CustomRender>;
9
+ 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,9 +1,9 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-table",
3
- "version": "0.0.2-rc.01",
3
+ "version": "0.0.2-rc.10",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
- "build": "vue-tsc --noEmit && vite build",
6
+ "build": "vite build",
7
7
  "types": "vue-tsc --declaration --emitDeclarationOnly",
8
8
  "preview": "vite preview --port 5050",
9
9
  "test:unit": "vitest --environment jsdom",
@@ -26,14 +26,13 @@
26
26
  "./dist/style.less": "./dist/style.less"
27
27
  },
28
28
  "dependencies": {
29
- "@vueuse/core": "^9.3.1",
30
- "@gx-design-vue/pro-utils": "0.0.5-rc.3",
31
- "ant-design-vue": "3.2.13",
29
+ "@vueuse/core": "^6.8.0",
30
+ "@gx-design-vue/pro-utils": "0.0.5-rc.04",
31
+ "@gx-design-vue/pro-hooks": "0.0.1-rc.05",
32
+ "ant-design-vue": "^3.2.15",
32
33
  "dayjs": "^1.11.0",
33
34
  "lodash-es": "^4.17.21",
34
- "vite-plugin-dts": "^1.6.6",
35
- "vue": "3.2.39",
36
- "vue-router": "^4.0.14",
35
+ "vue": "^3.0.0",
37
36
  "vue-types": "^4.1.1"
38
37
  },
39
38
  "devDependencies": {
@@ -43,8 +42,8 @@
43
42
  "@types/lodash-es": "^4.17.6",
44
43
  "@types/jsdom": "^16.2.14",
45
44
  "@types/node": "^16.11.26",
46
- "@vitejs/plugin-vue": "3.1.0",
47
- "@vitejs/plugin-vue-jsx": "2.0.1",
45
+ "@vitejs/plugin-vue": "^3.1.0",
46
+ "@vitejs/plugin-vue-jsx": "^2.0.1",
48
47
  "@vue/eslint-config-prettier": "^7.0.0",
49
48
  "@vue/eslint-config-typescript": "^10.0.0",
50
49
  "@vue/test-utils": "^2.0.0-rc.18",
@@ -66,9 +65,8 @@
66
65
  "stylelint-config-standard": "^25.0.0",
67
66
  "stylelint-order": "^5.0.0",
68
67
  "typescript": "^4.6.4",
69
- "vite": "3.1.3",
70
- "vite-plugin-windicss": "1.8.7",
71
- "vue-eslint-parser": "9.0.3",
68
+ "vite": "^3.1.3",
69
+ "vue-eslint-parser": "^9.0.3",
72
70
  "vue-tsc": "0.39.4"
73
71
  },
74
72
  "description": "Gx Design"
@@ -1,7 +0,0 @@
1
- import type { ExtractPropTypes } from 'vue';
2
- declare type RemoveReadonly<T> = {
3
- -readonly [key in keyof T]: T[key];
4
- };
5
- export declare type ExtractPublicPropTypes<T> = Omit<Partial<RemoveReadonly<ExtractPropTypes<T>>>, Extract<keyof T, `internal${string}`>>;
6
- export declare type ExtractInternalPropTypes<T> = Partial<ExtractPropTypes<T>>;
7
- export {};
@@ -1,2 +0,0 @@
1
- export * from './typings';
2
- export * from './extract-public-props';
@@ -1 +0,0 @@
1
- export declare type SizeType = 'small' | 'middle' | 'large' | undefined;
@@ -1,3 +0,0 @@
1
- import useMemo from './useMemo';
2
- export * from './useTimeout';
3
- export { useMemo };
@@ -1,10 +0,0 @@
1
- import type { ComputedRef, WritableComputedRef } from 'vue';
2
- declare type MemoGetter<T> = () => T;
3
- declare type MemoSetter<T> = (v: T) => void;
4
- interface WritableMemoOptions<T> {
5
- get: MemoGetter<T>;
6
- set: MemoSetter<T>;
7
- }
8
- declare function useMemo<T>(getter: MemoGetter<T>): ComputedRef<T>;
9
- declare function useMemo<T>(options: WritableMemoOptions<T>): WritableComputedRef<T>;
10
- export default useMemo;
@@ -1,11 +0,0 @@
1
- export declare function tryOnUnmounted(fn: Fn): void;
2
- export declare function useTimeoutFn(handle: Fn<any>, wait: number, native?: boolean): {
3
- readyRef: import("vue").Ref<boolean>;
4
- stop: () => void;
5
- start: () => void;
6
- };
7
- export declare function useTimeoutRef(wait: number): {
8
- readyRef: import("vue").Ref<boolean>;
9
- stop: () => void;
10
- start: () => void;
11
- };
@@ -1,6 +0,0 @@
1
- declare module 'vue' {
2
- interface GlobalComponents {
3
- ProTable: typeof import('@gx-design-vue/pro-table')['ProTable'];
4
- }
5
- }
6
- export {};