@gx-design-vue/pro-table 0.2.0-beta.3 → 0.2.0-beta.31
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/dist/ProTable.d.ts +285 -156
- package/dist/_utils/ant-design-vue/index.d.ts +1 -0
- package/dist/_utils/ant-design-vue/spin/typings.d.ts +1 -0
- package/dist/_utils/ant-design-vue/table/typings.d.ts +1 -0
- package/dist/_utils/index.d.ts +0 -1
- package/dist/components/ColumnSetting/index.d.ts +27 -3
- package/dist/components/ColumnSetting/style.d.ts +3 -0
- package/dist/components/Form/index.d.ts +7 -7
- package/dist/components/Form/style.d.ts +3 -0
- package/dist/components/ListToolBar/index.d.ts +1 -2
- package/dist/components/ListToolBar/style.d.ts +3 -0
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
- package/dist/components/ToolBar/index.d.ts +0 -1
- package/dist/context/TableContext.d.ts +3 -4
- package/dist/hooks/useFetchData.d.ts +4 -4
- package/dist/hooks/useLoading.d.ts +3 -11
- package/dist/hooks/useRowSelection.d.ts +2 -2
- package/dist/hooks/useTable.d.ts +2 -1
- package/dist/index.d.ts +1 -7
- package/dist/pro-table.mjs +26968 -17242
- package/dist/pro-table.umd.js +249 -19
- package/dist/props.d.ts +127 -73
- package/dist/style.d.ts +3 -0
- package/dist/types/TableTypings.d.ts +11 -10
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +7 -9
- package/dist/_utils/typings.d.ts +0 -9
- package/dist/components/ColumnSetting/style.less +0 -93
- package/dist/components/Form/style.less +0 -35
- package/dist/components/ListToolBar/style.less +0 -63
- package/dist/components/ToolBar/style.less +0 -16
- package/dist/design/ant-design-theme.less +0 -3
- package/dist/design/ant-design-vue.less +0 -19
- package/dist/design/config.less +0 -2
- package/dist/proTable.less +0 -5
- package/dist/style/index.less +0 -186
- package/dist/style/table.less +0 -34
- package/dist/style.css +0 -1
- package/dist/style.less +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SpinProps } from 'ant-design-vue';
|
|
@@ -3,6 +3,7 @@ import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interfac
|
|
|
3
3
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
4
|
export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
5
5
|
export type { Key } from 'ant-design-vue/es/vc-table/interface';
|
|
6
|
+
export type { ChangeEvent } from 'ant-design-vue/es/_util/EventInterface';
|
|
6
7
|
export type TableFilters = Record<string, FilterValue | null>;
|
|
7
8
|
export type TableSorterRecord = SorterResult<RecordType>;
|
|
8
9
|
export type TableSorter = TableSorterRecord | TableSorterRecord[];
|
package/dist/_utils/index.d.ts
CHANGED
|
@@ -1,11 +1,35 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
2
|
import type { SettingExtraRender } from '../../types/SlotsTypings';
|
|
3
|
-
import './style.less';
|
|
4
3
|
export type ColumnSettingProps = {
|
|
5
4
|
draggable?: boolean;
|
|
6
5
|
checkable?: boolean;
|
|
7
6
|
extra?: SettingExtraRender;
|
|
8
7
|
checkedReset?: boolean;
|
|
9
8
|
};
|
|
10
|
-
declare const ColumnSetting:
|
|
9
|
+
declare const ColumnSetting: import("vue").DefineComponent<{
|
|
10
|
+
draggable: {
|
|
11
|
+
type: PropType<boolean | undefined>;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
checkable: {
|
|
15
|
+
type: PropType<boolean | undefined>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
checkedReset: PropType<boolean | undefined>;
|
|
19
|
+
extra: PropType<SettingExtraRender>;
|
|
20
|
+
}, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
draggable: {
|
|
22
|
+
type: PropType<boolean | undefined>;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
checkable: {
|
|
26
|
+
type: PropType<boolean | undefined>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
checkedReset: PropType<boolean | undefined>;
|
|
30
|
+
extra: PropType<SettingExtraRender>;
|
|
31
|
+
}>>, {
|
|
32
|
+
checkable: boolean | undefined;
|
|
33
|
+
draggable: boolean | undefined;
|
|
34
|
+
}>;
|
|
11
35
|
export default ColumnSetting;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
+
import type { SearchConfig } from '../../types/TableTypings';
|
|
3
4
|
import type { ProSearchMap } from '../../types/ColumnTypings';
|
|
4
|
-
import './style.less';
|
|
5
5
|
declare const ProTableForm: import("vue").DefineComponent<{
|
|
6
6
|
search: {
|
|
7
|
-
type: PropType<
|
|
8
|
-
default: () =>
|
|
7
|
+
type: PropType<SearchConfig>;
|
|
8
|
+
default: () => SearchConfig;
|
|
9
9
|
};
|
|
10
10
|
modal: PropType<boolean | undefined>;
|
|
11
11
|
searchMap: {
|
|
@@ -15,10 +15,10 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
15
15
|
loading: PropType<boolean>;
|
|
16
16
|
prefixCls: PropType<string>;
|
|
17
17
|
defaultParams: PropType<RecordType>;
|
|
18
|
-
}, () =>
|
|
18
|
+
}, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
19
|
search: {
|
|
20
|
-
type: PropType<
|
|
21
|
-
default: () =>
|
|
20
|
+
type: PropType<SearchConfig>;
|
|
21
|
+
default: () => SearchConfig;
|
|
22
22
|
};
|
|
23
23
|
modal: PropType<boolean | undefined>;
|
|
24
24
|
searchMap: {
|
|
@@ -31,7 +31,7 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
31
31
|
}>> & {
|
|
32
32
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
33
33
|
}, {
|
|
34
|
-
search:
|
|
34
|
+
search: SearchConfig;
|
|
35
35
|
searchMap: ProSearchMap<"text">[];
|
|
36
36
|
}>;
|
|
37
37
|
export default ProTableForm;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { VueNode } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import './style.less';
|
|
4
3
|
export type ListToolBarSetting = {
|
|
5
4
|
icon: VueNode;
|
|
6
5
|
tooltip?: string;
|
|
@@ -30,7 +29,7 @@ declare const ListToolBar: import("vue").DefineComponent<{
|
|
|
30
29
|
type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
|
|
31
30
|
default: () => undefined;
|
|
32
31
|
};
|
|
33
|
-
}, () =>
|
|
32
|
+
}, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
33
|
actions: {
|
|
35
34
|
type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
|
|
36
35
|
default: () => undefined;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const FullScreenIcon: FC;
|
|
1
|
+
declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3
2
|
export default FullScreenIcon;
|
|
@@ -4,7 +4,6 @@ import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
|
4
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
5
|
import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
|
|
6
6
|
import type { PaginationProps } from '../_utils';
|
|
7
|
-
export type ContextType = any;
|
|
8
7
|
export interface TableContextProps {
|
|
9
8
|
columns?: ComputedRef<ProColumnsType>;
|
|
10
9
|
cacheColumns?: ComputedRef<ProColumnsType>;
|
|
@@ -21,6 +20,6 @@ export interface TableContextProps {
|
|
|
21
20
|
changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
|
|
22
21
|
[key: string]: any;
|
|
23
22
|
}
|
|
24
|
-
export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<
|
|
25
|
-
export declare const provideTableContext: (value: TableContextProps
|
|
26
|
-
export declare const useTableContext: () => Required<TableContextProps>;
|
|
23
|
+
export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<T>, defaultValue?: T | undefined) => T;
|
|
24
|
+
export declare const provideTableContext: (value: TableContextProps) => void;
|
|
25
|
+
export declare const useTableContext: (defaultValue?: Required<TableContextProps>) => Required<TableContextProps>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TableSorter } from '../_utils';
|
|
3
3
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
4
|
import type { ProTableProps, ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
|
|
5
5
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
6
6
|
interface ActionType {
|
|
7
|
-
|
|
7
|
+
loadingStatus: ComputedRef<boolean | undefined>;
|
|
8
8
|
getPaginationInfo: ComputedRef<ProTablePagination>;
|
|
9
9
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
|
-
setLoading: (loading: boolean
|
|
10
|
+
setLoading: (loading: boolean) => void;
|
|
11
11
|
setColumns: (columnList: ProColumnsType) => void;
|
|
12
12
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
13
13
|
syncSelectedRows: (dataList: any[]) => void;
|
|
@@ -24,7 +24,7 @@ export type ConfigFetchData = {
|
|
|
24
24
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
25
25
|
};
|
|
26
26
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
27
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns,
|
|
27
|
+
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, loadingStatus, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
|
|
28
28
|
getDataSourceRef: ComputedRef<RecordType[]>;
|
|
29
29
|
isTreeDataRef: ComputedRef<boolean>;
|
|
30
30
|
reSetDataList: (list: RecordType[]) => void;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
2
|
import type { SpinProps } from '../_utils';
|
|
3
3
|
export declare function useLoading({ emit, loading }: {
|
|
4
4
|
loading: Ref<boolean | SpinProps | undefined>;
|
|
5
5
|
emit: any;
|
|
6
6
|
}): {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
spinning?: boolean | undefined;
|
|
10
|
-
size?: "small" | "default" | "large" | undefined;
|
|
11
|
-
wrapperClassName?: string | undefined;
|
|
12
|
-
tip?: string | undefined;
|
|
13
|
-
delay?: number | undefined;
|
|
14
|
-
indicator?: any;
|
|
15
|
-
}>;
|
|
16
|
-
setLoading: (loading: boolean | SpinProps) => void;
|
|
7
|
+
loadingStatus: import("vue").ComputedRef<boolean>;
|
|
8
|
+
setLoading: (loading: boolean) => void;
|
|
17
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
-
export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<
|
|
3
|
+
import type { ProTableProps, ProTableRowSelection } from '../types/TableTypings';
|
|
4
|
+
export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableRowSelection | undefined>): {
|
|
5
5
|
selectedKey: Ref<(string | number)[]>;
|
|
6
6
|
selectRowKey: (record: RecordType, selected: any[]) => void;
|
|
7
7
|
selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Ref, ComputedRef } from 'vue';
|
|
2
2
|
import type { ProCoreActionType, ProCoreFormType, ProTableRef } from '../types/TableTypings';
|
|
3
3
|
export declare function useTable(tableRef: Ref<ProTableRef>): {
|
|
4
|
+
loading: ComputedRef<boolean>;
|
|
4
5
|
params: ComputedRef<Record<string, any>>;
|
|
5
|
-
loading: ComputedRef<ProCoreActionType['getLoadingStatus']>;
|
|
6
6
|
reload: ProCoreActionType['reload'];
|
|
7
7
|
mutate: ProCoreActionType['reSetDataList'];
|
|
8
8
|
setPage: ProCoreActionType['changePageInfo'];
|
|
9
|
+
changeDataValue: ProCoreActionType['changeDataValue'];
|
|
9
10
|
changeLoading: ProCoreActionType['loadingOperation'];
|
|
10
11
|
actionRef: ComputedRef<ProCoreActionType>;
|
|
11
12
|
formRef: ComputedRef<ProCoreFormType>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import './design/config.less';
|
|
2
|
-
import './design/ant-design-theme.less';
|
|
3
|
-
import './design/ant-design-vue.less';
|
|
4
|
-
import './style/table.less';
|
|
5
|
-
import './proTable.less';
|
|
6
|
-
import './style.less';
|
|
7
1
|
import { useTable } from './hooks/useTable';
|
|
8
2
|
export { proTableProps } from './props';
|
|
9
3
|
export { default } from './ProTable';
|
|
10
4
|
export type { ProTableProps } from './types/TableTypings';
|
|
11
|
-
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
|
|
5
|
+
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType, OptionConfig, SearchConfig } from './types/TableTypings';
|
|
12
6
|
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
13
7
|
export { useTable };
|
|
14
8
|
export { default as GProTable } from './ProTable';
|