@nokecy/qc-ui 1.0.33 → 1.0.35
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/cjs/ag-grid-plus/ag-gridPlus.js +8 -6
- package/dist/cjs/ag-grid-plus/index.less +6 -12
- package/dist/cjs/ag-grid-plus/interface.d.ts +4 -0
- package/dist/cjs/ag-grid-plus/setting/index.js +7 -4
- package/dist/cjs/dialogSelect/index.js +3 -3
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +8 -6
- package/dist/esm/ag-grid-plus/index.less +6 -12
- package/dist/esm/ag-grid-plus/interface.d.ts +4 -0
- package/dist/esm/ag-grid-plus/setting/index.js +7 -4
- package/dist/esm/dialogSelect/index.js +3 -3
- package/dist/umd/qc-ui.min.css +1 -1
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +1 -1
|
@@ -249,6 +249,13 @@ function AgGridPlus(props) {
|
|
|
249
249
|
var onRefresh = function onRefresh() {
|
|
250
250
|
request && onRequest(queryFilter);
|
|
251
251
|
};
|
|
252
|
+
(0, _react.useEffect)(function () {
|
|
253
|
+
gridRef.current = {
|
|
254
|
+
onRefresh: function onRefresh() {
|
|
255
|
+
request && onRequest(queryFilter);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
}, [queryFilter, JSON.stringify(gridParams), JSON.stringify(sortColumn), pagination]);
|
|
252
259
|
var onRowChanged = (0, _react.useCallback)(function (e) {
|
|
253
260
|
props.onSelectionChanged && props.onSelectionChanged(e);
|
|
254
261
|
}, []);
|
|
@@ -262,11 +269,6 @@ function AgGridPlus(props) {
|
|
|
262
269
|
setColumnCellClass(handelgridPlusColumnState(columnState));
|
|
263
270
|
}
|
|
264
271
|
};
|
|
265
|
-
(0, _react.useEffect)(function () {
|
|
266
|
-
gridRef.current = {
|
|
267
|
-
onRefresh: onRefresh
|
|
268
|
-
};
|
|
269
|
-
}, [queryFilter, JSON.stringify(gridParams), JSON.stringify(sortColumn)]);
|
|
270
272
|
var isValidNumber = function isValidNumber(value) {
|
|
271
273
|
return typeof value === 'number' && !isNaN(value);
|
|
272
274
|
};
|
|
@@ -608,7 +610,7 @@ function AgGridPlus(props) {
|
|
|
608
610
|
showTotal: function showTotal(total, range) {
|
|
609
611
|
return "\u7B2C ".concat(range[0], "-").concat(range[1], " \u6761/\u603B\u5171 ").concat(total, " \u6761");
|
|
610
612
|
},
|
|
611
|
-
pageSizeOptions: [10, 100, 200, 500, 1000, 10000],
|
|
613
|
+
pageSizeOptions: props.pageSizeOptions || [10, 100, 200, 500, 1000, 10000],
|
|
612
614
|
hideOnSinglePage: false,
|
|
613
615
|
showQuickJumper: false
|
|
614
616
|
})))));
|
|
@@ -27,17 +27,11 @@
|
|
|
27
27
|
margin-right: 16rpx;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.ag-checkbox {
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
.ag-root-wrapper-body .ag-center-cols-viewport .ag-center-cols-container .ag-checkbox .ag-checkbox-input-wrapper {
|
|
31
|
+
width: 18px !important;
|
|
32
|
+
height: 18px !important;
|
|
33
33
|
}
|
|
34
|
-
.ag-checkbox .ag-checkbox-input-wrapper {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ag-checkbox-input-wrapper .ag-checkbox-input {
|
|
40
|
-
width: 18px !important;
|
|
41
|
-
height: 18px !important;
|
|
42
|
-
transform: scale(1.5); /* 放大 */
|
|
34
|
+
.ag-root-wrapper-body .ag-header-viewport .ag-checkbox .ag-checkbox-input-wrapper {
|
|
35
|
+
width: 18px !important;
|
|
36
|
+
height: 18px !important;
|
|
43
37
|
}
|
|
@@ -31,6 +31,10 @@ interface GridProps extends AgGridReactProps {
|
|
|
31
31
|
* 列表空数据文字提示
|
|
32
32
|
*/
|
|
33
33
|
overlayNoRowsTemplateText?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 列表分页选择配置
|
|
36
|
+
*/
|
|
37
|
+
pageSizeOptions?: number[];
|
|
34
38
|
gridRef?: React.Ref<GridRef | undefined>;
|
|
35
39
|
}
|
|
36
40
|
interface AgGridColumnPropsClone extends ColDef {
|
|
@@ -226,10 +226,13 @@ var Setting = function Setting(props) {
|
|
|
226
226
|
formDialog.forConfirm(function (payload, next) {
|
|
227
227
|
var values = payload.values;
|
|
228
228
|
onSaveColumnState && onSaveColumnState(values.items);
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
gridApi.setGridOption("columnDefs", values.items);
|
|
230
|
+
setTimeout(function () {
|
|
231
|
+
gridApi.applyColumnState({
|
|
232
|
+
state: values.items,
|
|
233
|
+
applyOrder: true
|
|
234
|
+
});
|
|
235
|
+
}, 10);
|
|
233
236
|
next(payload);
|
|
234
237
|
}).open(formProps);
|
|
235
238
|
case 2:
|
|
@@ -156,7 +156,7 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
156
156
|
});
|
|
157
157
|
},
|
|
158
158
|
request: ( /*#__PURE__*/function () {
|
|
159
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
159
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, _, record) {
|
|
160
160
|
var data, requestData;
|
|
161
161
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
162
162
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -167,7 +167,7 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
167
167
|
Sorting: params.sorter,
|
|
168
168
|
SkipCount: params.skipCount,
|
|
169
169
|
MaxResultCount: params.maxResultCount
|
|
170
|
-
});
|
|
170
|
+
}, record);
|
|
171
171
|
case 2:
|
|
172
172
|
data = _context.sent;
|
|
173
173
|
requestData = {
|
|
@@ -183,7 +183,7 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
183
183
|
}
|
|
184
184
|
}, _callee);
|
|
185
185
|
}));
|
|
186
|
-
return function (_x) {
|
|
186
|
+
return function (_x, _x2, _x3) {
|
|
187
187
|
return _ref2.apply(this, arguments);
|
|
188
188
|
};
|
|
189
189
|
}()),
|
|
@@ -240,6 +240,13 @@ function AgGridPlus(props) {
|
|
|
240
240
|
var onRefresh = function onRefresh() {
|
|
241
241
|
request && onRequest(queryFilter);
|
|
242
242
|
};
|
|
243
|
+
useEffect(function () {
|
|
244
|
+
gridRef.current = {
|
|
245
|
+
onRefresh: function onRefresh() {
|
|
246
|
+
request && onRequest(queryFilter);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}, [queryFilter, JSON.stringify(gridParams), JSON.stringify(sortColumn), pagination]);
|
|
243
250
|
var onRowChanged = useCallback(function (e) {
|
|
244
251
|
props.onSelectionChanged && props.onSelectionChanged(e);
|
|
245
252
|
}, []);
|
|
@@ -253,11 +260,6 @@ function AgGridPlus(props) {
|
|
|
253
260
|
setColumnCellClass(handelgridPlusColumnState(columnState));
|
|
254
261
|
}
|
|
255
262
|
};
|
|
256
|
-
useEffect(function () {
|
|
257
|
-
gridRef.current = {
|
|
258
|
-
onRefresh: onRefresh
|
|
259
|
-
};
|
|
260
|
-
}, [queryFilter, JSON.stringify(gridParams), JSON.stringify(sortColumn)]);
|
|
261
263
|
var isValidNumber = function isValidNumber(value) {
|
|
262
264
|
return typeof value === 'number' && !isNaN(value);
|
|
263
265
|
};
|
|
@@ -599,7 +601,7 @@ function AgGridPlus(props) {
|
|
|
599
601
|
showTotal: function showTotal(total, range) {
|
|
600
602
|
return "\u7B2C ".concat(range[0], "-").concat(range[1], " \u6761/\u603B\u5171 ").concat(total, " \u6761");
|
|
601
603
|
},
|
|
602
|
-
pageSizeOptions: [10, 100, 200, 500, 1000, 10000],
|
|
604
|
+
pageSizeOptions: props.pageSizeOptions || [10, 100, 200, 500, 1000, 10000],
|
|
603
605
|
hideOnSinglePage: false,
|
|
604
606
|
showQuickJumper: false
|
|
605
607
|
})))));
|
|
@@ -27,17 +27,11 @@
|
|
|
27
27
|
margin-right: 16rpx;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.ag-checkbox {
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
.ag-root-wrapper-body .ag-center-cols-viewport .ag-center-cols-container .ag-checkbox .ag-checkbox-input-wrapper {
|
|
31
|
+
width: 18px !important;
|
|
32
|
+
height: 18px !important;
|
|
33
33
|
}
|
|
34
|
-
.ag-checkbox .ag-checkbox-input-wrapper {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ag-checkbox-input-wrapper .ag-checkbox-input {
|
|
40
|
-
width: 18px !important;
|
|
41
|
-
height: 18px !important;
|
|
42
|
-
transform: scale(1.5); /* 放大 */
|
|
34
|
+
.ag-root-wrapper-body .ag-header-viewport .ag-checkbox .ag-checkbox-input-wrapper {
|
|
35
|
+
width: 18px !important;
|
|
36
|
+
height: 18px !important;
|
|
43
37
|
}
|
|
@@ -31,6 +31,10 @@ interface GridProps extends AgGridReactProps {
|
|
|
31
31
|
* 列表空数据文字提示
|
|
32
32
|
*/
|
|
33
33
|
overlayNoRowsTemplateText?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 列表分页选择配置
|
|
36
|
+
*/
|
|
37
|
+
pageSizeOptions?: number[];
|
|
34
38
|
gridRef?: React.Ref<GridRef | undefined>;
|
|
35
39
|
}
|
|
36
40
|
interface AgGridColumnPropsClone extends ColDef {
|
|
@@ -217,10 +217,13 @@ var Setting = function Setting(props) {
|
|
|
217
217
|
formDialog.forConfirm(function (payload, next) {
|
|
218
218
|
var values = payload.values;
|
|
219
219
|
onSaveColumnState && onSaveColumnState(values.items);
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
220
|
+
gridApi.setGridOption("columnDefs", values.items);
|
|
221
|
+
setTimeout(function () {
|
|
222
|
+
gridApi.applyColumnState({
|
|
223
|
+
state: values.items,
|
|
224
|
+
applyOrder: true
|
|
225
|
+
});
|
|
226
|
+
}, 10);
|
|
224
227
|
next(payload);
|
|
225
228
|
}).open(formProps);
|
|
226
229
|
case 2:
|
|
@@ -147,7 +147,7 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
147
147
|
});
|
|
148
148
|
},
|
|
149
149
|
request: ( /*#__PURE__*/function () {
|
|
150
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
150
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, _, record) {
|
|
151
151
|
var data, requestData;
|
|
152
152
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
153
153
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -158,7 +158,7 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
158
158
|
Sorting: params.sorter,
|
|
159
159
|
SkipCount: params.skipCount,
|
|
160
160
|
MaxResultCount: params.maxResultCount
|
|
161
|
-
});
|
|
161
|
+
}, record);
|
|
162
162
|
case 2:
|
|
163
163
|
data = _context.sent;
|
|
164
164
|
requestData = {
|
|
@@ -174,7 +174,7 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
174
174
|
}
|
|
175
175
|
}, _callee);
|
|
176
176
|
}));
|
|
177
|
-
return function (_x) {
|
|
177
|
+
return function (_x, _x2, _x3) {
|
|
178
178
|
return _ref2.apply(this, arguments);
|
|
179
179
|
};
|
|
180
180
|
}()),
|