@nokecy/qc-ui 0.1.51 → 0.1.53

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.
@@ -156,7 +156,6 @@ function AgGridPlus(props) {
156
156
  }, [ready, JSON.stringify(gridParams), JSON.stringify(sortColumn), pagination.pageSize, pagination.current]); // 加载列方案
157
157
 
158
158
  (0, _react.useEffect)(function () {
159
- // let columnStates = columnsRef.current!.getColumnState();
160
159
  if (gridColumnState && columnsRef.current) {
161
160
  columnsRef.current.applyColumnState({
162
161
  state: gridColumnState,
@@ -289,7 +288,8 @@ function AgGridPlus(props) {
289
288
  }), /*#__PURE__*/_react.default.createElement(_agGridReact.AgGridReact, _extends({
290
289
  className: "ag-theme-alpine"
291
290
  }, rest, {
292
- //指定客户端模式
291
+ onFirstDataRendered: function onFirstDataRendered() {} //指定客户端模式
292
+ ,
293
293
  rowModelType: "clientSide",
294
294
  rowData: props.treeData ? (0, _utils.flatten)((0, _utils.toTree)(rowData), treeParentName) : rowData,
295
295
  onGridReady: onGridReady,
@@ -303,25 +303,15 @@ function AgGridPlus(props) {
303
303
  setSelectRows(e.api.getSelectedRows());
304
304
  },
305
305
  onDragStopped: function onDragStopped(e) {
306
- if (columnsRef.current) {
307
- var _columnsRef$current2;
308
-
309
- setColumnState((_columnsRef$current2 = columnsRef.current) === null || _columnsRef$current2 === void 0 ? void 0 : _columnsRef$current2.getColumnState());
306
+ if (columnsRef.current) {// setColumnState(columnsRef.current?.getColumnState());
310
307
  }
311
308
  },
312
309
  onColumnResized: function onColumnResized(e) {
313
- if (columnsRef.current) {
314
- var _columnsRef$current3, _columnsRef$current4;
315
-
316
- console.log((_columnsRef$current3 = columnsRef.current) === null || _columnsRef$current3 === void 0 ? void 0 : _columnsRef$current3.getColumnState());
317
- setColumnState((_columnsRef$current4 = columnsRef.current) === null || _columnsRef$current4 === void 0 ? void 0 : _columnsRef$current4.getColumnState());
310
+ if (columnsRef.current) {// setColumnState(columnsRef.current?.getColumnState());
318
311
  }
319
312
  },
320
313
  onColumnMoved: function onColumnMoved() {
321
- if (columnsRef.current) {
322
- var _columnsRef$current5;
323
-
324
- setColumnState((_columnsRef$current5 = columnsRef.current) === null || _columnsRef$current5 === void 0 ? void 0 : _columnsRef$current5.getColumnState());
314
+ if (columnsRef.current) {// setColumnState(columnsRef.current?.getColumnState());
325
315
  }
326
316
  },
327
317
  columnTypes: {
@@ -43,7 +43,7 @@ export declare type ArrayBaseMixins = {
43
43
  }>>;
44
44
  Index?: React.FC;
45
45
  useArray?: () => IArrayBaseContext;
46
- useIndex?: (index?: number) => number;
46
+ useIndex: (index?: number) => number;
47
47
  useRecord?: (record?: number) => any;
48
48
  };
49
49
  export interface IArrayBaseProps {
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _antdV = require("@formily/antd-v5");
12
+ var _arrayBase = require("../array-table/arrayBase");
13
13
 
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
 
@@ -18,7 +18,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
18
18
  var _default = function _default(props) {
19
19
  var onChange = props.onChange;
20
20
 
21
- var index = _antdV.ArrayBase.useIndex();
21
+ var index = _arrayBase.ArrayBase.useIndex();
22
22
 
23
23
  (0, _react.useEffect)(function () {
24
24
  onChange(index + 1);
@@ -130,7 +130,6 @@ function AgGridPlus(props) {
130
130
  }, [ready, JSON.stringify(gridParams), JSON.stringify(sortColumn), pagination.pageSize, pagination.current]); // 加载列方案
131
131
 
132
132
  useEffect(function () {
133
- // let columnStates = columnsRef.current!.getColumnState();
134
133
  if (gridColumnState && columnsRef.current) {
135
134
  columnsRef.current.applyColumnState({
136
135
  state: gridColumnState,
@@ -263,7 +262,8 @@ function AgGridPlus(props) {
263
262
  }), /*#__PURE__*/React.createElement(AgGridReact, _extends({
264
263
  className: "ag-theme-alpine"
265
264
  }, rest, {
266
- //指定客户端模式
265
+ onFirstDataRendered: function onFirstDataRendered() {} //指定客户端模式
266
+ ,
267
267
  rowModelType: "clientSide",
268
268
  rowData: props.treeData ? flatten(toTree(rowData), treeParentName) : rowData,
269
269
  onGridReady: onGridReady,
@@ -277,25 +277,15 @@ function AgGridPlus(props) {
277
277
  setSelectRows(e.api.getSelectedRows());
278
278
  },
279
279
  onDragStopped: function onDragStopped(e) {
280
- if (columnsRef.current) {
281
- var _columnsRef$current2;
282
-
283
- setColumnState((_columnsRef$current2 = columnsRef.current) === null || _columnsRef$current2 === void 0 ? void 0 : _columnsRef$current2.getColumnState());
280
+ if (columnsRef.current) {// setColumnState(columnsRef.current?.getColumnState());
284
281
  }
285
282
  },
286
283
  onColumnResized: function onColumnResized(e) {
287
- if (columnsRef.current) {
288
- var _columnsRef$current3, _columnsRef$current4;
289
-
290
- console.log((_columnsRef$current3 = columnsRef.current) === null || _columnsRef$current3 === void 0 ? void 0 : _columnsRef$current3.getColumnState());
291
- setColumnState((_columnsRef$current4 = columnsRef.current) === null || _columnsRef$current4 === void 0 ? void 0 : _columnsRef$current4.getColumnState());
284
+ if (columnsRef.current) {// setColumnState(columnsRef.current?.getColumnState());
292
285
  }
293
286
  },
294
287
  onColumnMoved: function onColumnMoved() {
295
- if (columnsRef.current) {
296
- var _columnsRef$current5;
297
-
298
- setColumnState((_columnsRef$current5 = columnsRef.current) === null || _columnsRef$current5 === void 0 ? void 0 : _columnsRef$current5.getColumnState());
288
+ if (columnsRef.current) {// setColumnState(columnsRef.current?.getColumnState());
299
289
  }
300
290
  },
301
291
  columnTypes: {
@@ -43,7 +43,7 @@ export declare type ArrayBaseMixins = {
43
43
  }>>;
44
44
  Index?: React.FC;
45
45
  useArray?: () => IArrayBaseContext;
46
- useIndex?: (index?: number) => number;
46
+ useIndex: (index?: number) => number;
47
47
  useRecord?: (record?: number) => any;
48
48
  };
49
49
  export interface IArrayBaseProps {
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from 'react';
2
- import { ArrayBase } from '@formily/antd-v5';
2
+ import { ArrayBase } from "../array-table/arrayBase";
3
3
  export default (function (props) {
4
4
  var onChange = props.onChange;
5
5
  var index = ArrayBase.useIndex();