@gx-design-vue/pro-table 0.2.0-alpha.14 → 0.2.0-alpha.15
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.js +9 -0
- package/dist/components/ScrollBar/Bar.d.ts +1 -1
- package/dist/components/ScrollBar/Thumb.d.ts +1 -1
- package/dist/components/SearchForm/CollapseToggle.d.ts +1 -1
- package/dist/components/SearchForm/FormItemContainer.d.ts +1 -1
- package/dist/components/SearchForm/FormItemWrapper.d.ts +1 -1
- package/dist/components/SearchForm/SearchForm.d.ts +4 -4
- package/dist/components/Toolbar/ListToolBar.d.ts +8 -8
- package/dist/components/Toolbar/index.d.ts +5 -5
- package/dist/hooks/useTable.js +6 -4
- package/dist/pro-table.esm.js +214 -205
- package/dist/pro-table.js +1 -1
- package/package.json +2 -2
package/dist/ProTable.js
CHANGED
|
@@ -249,6 +249,15 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
249
249
|
};
|
|
250
250
|
continue;
|
|
251
251
|
}
|
|
252
|
+
if (key === "expandable") {
|
|
253
|
+
const userExpandable = props.expandable;
|
|
254
|
+
const controlledExpandedRowKeys = props.expandedRowKeys;
|
|
255
|
+
if (userExpandable !== void 0 || controlledExpandedRowKeys !== void 0) result.expandable = {
|
|
256
|
+
...userExpandable ?? {},
|
|
257
|
+
...controlledExpandedRowKeys !== void 0 ? { expandedRowKeys: controlledExpandedRowKeys } : {}
|
|
258
|
+
};
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
252
261
|
const val = props[key];
|
|
253
262
|
if (val !== void 0) result[key] = val;
|
|
254
263
|
}
|
|
@@ -70,11 +70,11 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
70
70
|
};
|
|
71
71
|
}>> & Readonly<{}>, {
|
|
72
72
|
readonly always: boolean;
|
|
73
|
+
readonly minSize: number;
|
|
73
74
|
readonly barStyle: {
|
|
74
75
|
x: CSSProperties;
|
|
75
76
|
y: CSSProperties;
|
|
76
77
|
};
|
|
77
|
-
readonly minSize: number;
|
|
78
78
|
readonly hasScrollY: boolean;
|
|
79
79
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
80
80
|
//#endregion
|
|
@@ -44,9 +44,9 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
44
44
|
readonly default: () => {};
|
|
45
45
|
};
|
|
46
46
|
}>> & Readonly<{}>, {
|
|
47
|
-
readonly vertical: boolean;
|
|
48
47
|
readonly always: boolean;
|
|
49
48
|
readonly barStyle: CSSProperties;
|
|
49
|
+
readonly vertical: boolean;
|
|
50
50
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
51
51
|
//#endregion
|
|
52
52
|
export { _default as default, thumbProps };
|
|
@@ -47,9 +47,9 @@ declare const CollapseToggle: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
47
47
|
required: true;
|
|
48
48
|
};
|
|
49
49
|
}>> & Readonly<{}>, {
|
|
50
|
-
hashId: string;
|
|
51
50
|
collapsed: boolean;
|
|
52
51
|
collapseRender: WithFalse<(collapsed?: boolean) => CustomRender>;
|
|
52
|
+
hashId: string;
|
|
53
53
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
54
54
|
//#endregion
|
|
55
55
|
export { CollapseToggle };
|
|
@@ -67,8 +67,8 @@ declare const FormItemContainer: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
67
67
|
default: any;
|
|
68
68
|
};
|
|
69
69
|
}>> & Readonly<{}>, {
|
|
70
|
-
loading: boolean;
|
|
71
70
|
autoRequest: boolean;
|
|
71
|
+
loading: boolean;
|
|
72
72
|
onSubmit: () => void;
|
|
73
73
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
74
74
|
//#endregion
|
|
@@ -70,11 +70,11 @@ declare const FormItemWrapper: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
70
70
|
default: any;
|
|
71
71
|
};
|
|
72
72
|
}>> & Readonly<{}>, {
|
|
73
|
+
hashId: string;
|
|
73
74
|
label: any;
|
|
74
75
|
labelWidth: string | number;
|
|
75
76
|
labelAlign: "left" | "center" | "right";
|
|
76
77
|
colon: boolean;
|
|
77
|
-
hashId: string;
|
|
78
78
|
formItemStyle: CSSProperties;
|
|
79
79
|
globalLabelGap: number;
|
|
80
80
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
@@ -111,6 +111,10 @@ declare const ProTableSearchForm: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
111
111
|
default: any;
|
|
112
112
|
};
|
|
113
113
|
}>> & Readonly<{}>, {
|
|
114
|
+
loading: any;
|
|
115
|
+
onReset: (params: Record<string, any>) => void;
|
|
116
|
+
proClasses: Record<string, string>;
|
|
117
|
+
proStyles: Record<string, any>;
|
|
114
118
|
formColumns: ProSearchMap<"text", string>[];
|
|
115
119
|
formConfig: FormConfig;
|
|
116
120
|
formAutoRequest: boolean;
|
|
@@ -120,11 +124,7 @@ declare const ProTableSearchForm: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
120
124
|
searchText?: string;
|
|
121
125
|
resetText?: string;
|
|
122
126
|
};
|
|
123
|
-
loading: any;
|
|
124
127
|
cardBordered: boolean;
|
|
125
|
-
proClasses: Record<string, string>;
|
|
126
|
-
proStyles: Record<string, any>;
|
|
127
|
-
onReset: (params: Record<string, any>) => void;
|
|
128
128
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
129
129
|
//#endregion
|
|
130
130
|
export { ProTableSearchForm as default };
|
|
@@ -93,19 +93,19 @@ declare const ListToolBar: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
93
93
|
default: () => {};
|
|
94
94
|
};
|
|
95
95
|
}>> & Readonly<{}>, {
|
|
96
|
-
actions: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
97
|
-
[key: string]: any;
|
|
98
|
-
}>[];
|
|
99
|
-
proClasses: Record<string, any>;
|
|
100
|
-
proStyles: Record<string, any>;
|
|
101
|
-
titleTipText: string;
|
|
102
|
-
actionsPlacement: ToolbarPlacement;
|
|
103
96
|
headerTitle: any;
|
|
104
|
-
listToolAfter: any;
|
|
105
97
|
headerTitleTip: any;
|
|
98
|
+
titleTipText: string;
|
|
106
99
|
settings: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
107
100
|
[key: string]: any;
|
|
108
101
|
}>[];
|
|
102
|
+
actions: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}>[];
|
|
105
|
+
actionsPlacement: ToolbarPlacement;
|
|
106
|
+
listToolAfter: any;
|
|
107
|
+
proClasses: Record<string, any>;
|
|
108
|
+
proStyles: Record<string, any>;
|
|
109
109
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
110
110
|
//#endregion
|
|
111
111
|
export { ListToolBar, ListToolBarSetting };
|
|
@@ -87,17 +87,17 @@ declare const Toolbar: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
87
87
|
default: () => {};
|
|
88
88
|
};
|
|
89
89
|
}>> & Readonly<{}>, {
|
|
90
|
+
headerTitle: any;
|
|
91
|
+
headerTitleTip: any;
|
|
92
|
+
titleTipText: string;
|
|
90
93
|
actions: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
91
94
|
[key: string]: any;
|
|
92
95
|
}>[];
|
|
96
|
+
actionsPlacement: ToolbarPlacement;
|
|
97
|
+
listToolAfter: any;
|
|
93
98
|
proClasses: Record<string, any>;
|
|
94
99
|
proStyles: Record<string, any>;
|
|
95
100
|
options: any;
|
|
96
|
-
titleTipText: string;
|
|
97
|
-
actionsPlacement: ToolbarPlacement;
|
|
98
|
-
headerTitle: any;
|
|
99
|
-
listToolAfter: any;
|
|
100
|
-
headerTitleTip: any;
|
|
101
101
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { Toolbar, Toolbar as default };
|
package/dist/hooks/useTable.js
CHANGED
|
@@ -9,13 +9,15 @@ function useTable(tableRef, options) {
|
|
|
9
9
|
});
|
|
10
10
|
const syncedStateKeys = /* @__PURE__ */ new Set();
|
|
11
11
|
function syncTableState(state = {}) {
|
|
12
|
-
const
|
|
13
|
-
for (const key of syncedStateKeys) if (!(key in nextState)) {
|
|
12
|
+
for (const key of syncedStateKeys) if (!(key in state)) {
|
|
14
13
|
delete tableState[key];
|
|
15
14
|
syncedStateKeys.delete(key);
|
|
16
15
|
}
|
|
17
|
-
Object.
|
|
18
|
-
|
|
16
|
+
for (const key of Object.keys(state)) {
|
|
17
|
+
const nextValue = state[key];
|
|
18
|
+
if (nextValue !== tableState[key]) tableState[key] = nextValue;
|
|
19
|
+
syncedStateKeys.add(key);
|
|
20
|
+
}
|
|
19
21
|
if (options?.request) tableState.request = options.request;
|
|
20
22
|
}
|
|
21
23
|
watch(() => toValue(options?.state), (newState) => {
|