@cqsjjb/jjb-react-admin-component 3.3.1-beta.3 → 3.3.1-beta.5

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.
@@ -109,6 +109,7 @@ export default props => {
109
109
 
110
110
  // 获得指定索引的节点 ID
111
111
  const getLevelIndexNodeIds = (targetIndexArr, key) => {
112
+ const children = props?.fieldNames?.children || 'children';
112
113
  const pathNodes = [];
113
114
  const pathNodesIds = [];
114
115
  let currentData = props.treeData || [];
@@ -121,10 +122,10 @@ export default props => {
121
122
  }
122
123
  nextNode = currentData[index];
123
124
  } else {
124
- if (!currentData?.children || !Array.isArray(currentData.children) || index < 0 || index >= currentData.children.length) {
125
+ if (!currentData?.[children] || !Array.isArray(currentData[children]) || index < 0 || index >= currentData[children].length) {
125
126
  return null;
126
127
  }
127
- nextNode = currentData.children[index];
128
+ nextNode = currentData?.[children][index];
128
129
  }
129
130
  pathNodes.push(nextNode);
130
131
  pathNodesIds.push(nextNode[key]);
package/Table/index.js CHANGED
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { tools } from '@cqsjjb/jjb-common-lib';
4
4
  import { ProTable } from '@ant-design/pro-components';
5
5
  import { useAntdResizableHeader } from 'use-antd-resizable-header';
6
- import { antPrefix, setTableSize, getTableSize, getPersistenceKey, isNull } from './utils';
6
+ import { antPrefix, setTableSize, getTableSize, getPersistenceKey } from './utils';
7
7
  import './index.less';
8
8
  require('use-antd-resizable-header/dist/style.css');
9
9
  export default function TablePro(props) {
@@ -94,9 +94,8 @@ export default function TablePro(props) {
94
94
  size: size,
95
95
  search: false,
96
96
  scroll: scroll,
97
- columns: resizableColumns,
98
97
  className: `${antPrefix}-gbs-pro-table`,
99
- options: !isNull(props.options) ? props.options : {
98
+ options: {
100
99
  reload: false,
101
100
  fullScreen: true,
102
101
  setting: {
@@ -113,5 +112,7 @@ export default function TablePro(props) {
113
112
  persistenceType: 'localStorage'
114
113
  },
115
114
  onSizeChange: setSize
116
- }, props)));
115
+ }, props, {
116
+ columns: resizableColumns
117
+ })));
117
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cqsjjb/jjb-react-admin-component",
3
- "version": "3.3.1-beta.3",
3
+ "version": "3.3.1-beta.5",
4
4
  "description": "jjb-react-admin-组件库@new",
5
5
  "main": "index.js",
6
6
  "author": "jjb-front-team",