@gx-design-vue/pro-table 0.0.2-rc.9 → 0.0.3
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 +34 -31
- package/dist/components/ColumnSetting/style.less +1 -3
- package/dist/components/Form/style.less +1 -8
- package/dist/components/ListToolBar/style.less +1 -0
- package/dist/components/ToolBar/style.less +5 -6
- package/dist/design/ant-design-theme.less +4 -0
- package/dist/design/ant-design-vue.less +19 -0
- package/dist/design/config.less +0 -5
- package/dist/hooks/useFetchData.d.ts +2 -1
- package/dist/hooks/useRowSelection.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/pro-table.less +5 -0
- package/dist/pro-table.mjs +1107 -1048
- package/dist/pro-table.umd.js +1 -1
- package/dist/props.d.ts +31 -19
- package/dist/style/index.less +18 -0
- package/dist/style/table.less +0 -18
- package/dist/style.css +1 -1
- package/dist/style.less +3 -5
- package/dist/types/column.d.ts +9 -2
- package/dist/types/table.d.ts +21 -11
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +2 -2
package/dist/style.less
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import './
|
|
2
|
-
@import './
|
|
3
|
-
@import './
|
|
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';
|
package/dist/types/column.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare type ProFieldValueType = 'text' | 'date' | 'select' | 'treeSelect
|
|
|
19
19
|
* @param time: 时间 HH:mm:ss
|
|
20
20
|
* @param select 下拉选择器
|
|
21
21
|
*/
|
|
22
|
-
export declare type ProFieldValueFormat = 'data' | 'dateMonth' | 'dateRange' | '
|
|
22
|
+
export declare type ProFieldValueFormat = 'data' | 'dateMonth' | 'dateRange' | 'time';
|
|
23
23
|
export declare type ProSchemaValueEnumType = {
|
|
24
24
|
/** @name 演示的文案 */
|
|
25
25
|
text: VNodeChild | JSX.Element;
|
|
@@ -34,7 +34,7 @@ export declare type ProSearchMap<ValueType = 'text', ValueFormat = 'date'> = {
|
|
|
34
34
|
name?: string;
|
|
35
35
|
/** 选择如何渲染相应的模式 */
|
|
36
36
|
valueType?: ProSchemaValueType<ValueType>;
|
|
37
|
-
|
|
37
|
+
valueFormat?: ProSchemaValueFormat<ValueFormat>;
|
|
38
38
|
placeholder?: string | string[];
|
|
39
39
|
/** valueType为select生效 */
|
|
40
40
|
allowClear?: boolean;
|
|
@@ -143,6 +143,13 @@ export declare type ProColumn = {
|
|
|
143
143
|
copyable?: boolean;
|
|
144
144
|
/** 值为空时,默认取值 */
|
|
145
145
|
columnEmptyText?: string;
|
|
146
|
+
valueType?: ProColumnsValueType;
|
|
147
|
+
};
|
|
148
|
+
export declare type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | {
|
|
149
|
+
node?: string;
|
|
150
|
+
class?: string;
|
|
151
|
+
attr?: string;
|
|
152
|
+
click?: () => void;
|
|
146
153
|
};
|
|
147
154
|
export declare type ProColumns = ProColumn[];
|
|
148
155
|
export {};
|
package/dist/types/table.d.ts
CHANGED
|
@@ -22,16 +22,20 @@ export interface ProTablePaginationConfig extends Omit<TablePaginationConfig, 'p
|
|
|
22
22
|
}
|
|
23
23
|
export declare type ProTablePagination = ProTablePaginationConfig | false;
|
|
24
24
|
export declare type SortOrder = 'descend' | 'ascend' | null;
|
|
25
|
-
export declare type RequestData = {
|
|
26
|
-
data:
|
|
27
|
-
success
|
|
28
|
-
total
|
|
25
|
+
export declare type RequestData<T = any> = {
|
|
26
|
+
data: T[] | undefined;
|
|
27
|
+
success: boolean;
|
|
28
|
+
total: number;
|
|
29
29
|
} & RecordType;
|
|
30
|
-
export declare type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
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>>>;
|
|
35
39
|
export declare type ColConfig = Partial<Record<Breakpoint, number>>;
|
|
36
40
|
export declare type SearchConfig = {
|
|
37
41
|
searchText?: string;
|
|
@@ -56,7 +60,6 @@ export interface OptionConfig {
|
|
|
56
60
|
fullScreen?: (() => VNodeChild | JSX.Element) | boolean | (() => Promise<void>);
|
|
57
61
|
}
|
|
58
62
|
export declare type ProCoreActionTypeConfig = {
|
|
59
|
-
formParams?: RecordType;
|
|
60
63
|
pageParams?: RecordType | boolean;
|
|
61
64
|
getLoadingStatus?: boolean | SpinProps | undefined;
|
|
62
65
|
/** @name 刷新 */
|
|
@@ -76,4 +79,11 @@ export declare type ProCoreActionTypeConfig = {
|
|
|
76
79
|
loadingOperation?: (loading: boolean) => void;
|
|
77
80
|
};
|
|
78
81
|
/** 操作类型 */
|
|
79
|
-
export declare type ProCoreActionType = (
|
|
82
|
+
export declare type ProCoreActionType = (config: ProCoreActionTypeConfig) => void;
|
|
83
|
+
export declare type ProCoreFormTypeConfig = {
|
|
84
|
+
formParams?: RecordType;
|
|
85
|
+
/** @name 刷新 */
|
|
86
|
+
restForm?: () => void;
|
|
87
|
+
};
|
|
88
|
+
/** 操作类型 */
|
|
89
|
+
export declare type ProCoreFormType = (config: ProCoreFormTypeConfig) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gx-design-vue/pro-table",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite",
|
|
6
6
|
"build": "vite build",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./dist/style.less": "./dist/style.less"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@vueuse/core": "
|
|
29
|
+
"@vueuse/core": "^6.8.0",
|
|
30
30
|
"@gx-design-vue/pro-utils": "0.0.5-rc.04",
|
|
31
31
|
"@gx-design-vue/pro-hooks": "0.0.1-rc.05",
|
|
32
32
|
"ant-design-vue": "^3.2.15",
|