@nokecy/qc-ui 0.0.14 → 0.0.16

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.
@@ -172,7 +172,7 @@ function AgGridPlus(props) {
172
172
  filter: filter
173
173
  }, gridParams), {}, {
174
174
  current: pagination.current,
175
- skipCount: pagination.current == 1 ? 0 : pagination.current * pagination.pageSize,
175
+ skipCount: pagination.current == 1 ? 0 : (pagination.current - 1) * pagination.pageSize,
176
176
  maxResultCount: pagination.pageSize,
177
177
  sorter: getSort(sortColumn)
178
178
  });
@@ -190,9 +190,7 @@ function AgGridPlus(props) {
190
190
  });
191
191
  };
192
192
 
193
- var actionDom = (0, _react.useMemo)(function () {
194
- return toolBarRender && toolBarRender(apiRef.current, (0, _utils.convertFilterModel)(queryFilter), queryFilter);
195
- }, [apiRef, columnsRef, queryFilter]);
193
+ var actionDom = toolBarRender && toolBarRender(apiRef.current, (0, _utils.convertFilterModel)(queryFilter), queryFilter);
196
194
 
197
195
  var sortChanged = function sortChanged(columnApi) {
198
196
  var sortedColumn = columnApi.getColumnState().find(function (col) {
@@ -338,8 +336,10 @@ function AgGridPlus(props) {
338
336
  current: current
339
337
  }));
340
338
  },
341
- size: "small" // showTotal={(total, range) => `${range[0]}-${range[1]} of ${total} items`}
342
- ,
339
+ size: "small",
340
+ showTotal: function showTotal(total, range) {
341
+ return "\u7B2C ".concat(range[0], "-").concat(range[1], " \u6761/\u603B\u5171 ").concat(total, " \u6761");
342
+ },
343
343
  pageSizeOptions: [10, 100, 200, 500, 1000],
344
344
  hideOnSinglePage: true,
345
345
  showQuickJumper: false
@@ -26,7 +26,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
26
26
 
27
27
  import { AgGridReact } from 'ag-grid-react';
28
28
  import { Spin, Pagination, Card, Tag } from 'antd';
29
- import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
29
+ import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
30
30
  import "ag-grid-enterprise";
31
31
  import "./global.scss";
32
32
  import "./index.less";
@@ -146,7 +146,7 @@ function AgGridPlus(props) {
146
146
  filter: filter
147
147
  }, gridParams), {}, {
148
148
  current: pagination.current,
149
- skipCount: pagination.current == 1 ? 0 : pagination.current * pagination.pageSize,
149
+ skipCount: pagination.current == 1 ? 0 : (pagination.current - 1) * pagination.pageSize,
150
150
  maxResultCount: pagination.pageSize,
151
151
  sorter: getSort(sortColumn)
152
152
  });
@@ -164,9 +164,7 @@ function AgGridPlus(props) {
164
164
  });
165
165
  };
166
166
 
167
- var actionDom = useMemo(function () {
168
- return toolBarRender && toolBarRender(apiRef.current, convertFilterModel(queryFilter), queryFilter);
169
- }, [apiRef, columnsRef, queryFilter]);
167
+ var actionDom = toolBarRender && toolBarRender(apiRef.current, convertFilterModel(queryFilter), queryFilter);
170
168
 
171
169
  var sortChanged = function sortChanged(columnApi) {
172
170
  var sortedColumn = columnApi.getColumnState().find(function (col) {
@@ -312,8 +310,10 @@ function AgGridPlus(props) {
312
310
  current: current
313
311
  }));
314
312
  },
315
- size: "small" // showTotal={(total, range) => `${range[0]}-${range[1]} of ${total} items`}
316
- ,
313
+ size: "small",
314
+ showTotal: function showTotal(total, range) {
315
+ return "\u7B2C ".concat(range[0], "-").concat(range[1], " \u6761/\u603B\u5171 ").concat(total, " \u6761");
316
+ },
317
317
  pageSizeOptions: [10, 100, 200, 500, 1000],
318
318
  hideOnSinglePage: true,
319
319
  showQuickJumper: false