@gingkoo/pandora-explorer 0.0.1-alpha.20 → 0.0.1-alpha.22

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/lib/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-explorer v0.0.1-alpha.20
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.22
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -5383,7 +5383,7 @@ const addLevel = (data, levelIndex = 0, filedata) => {
5383
5383
  while (i < arr.length) {
5384
5384
  let item = arr[i];
5385
5385
  item['level'] = levelIndex;
5386
- if (item.type == 'file') {
5386
+ if (!item?.api && !item?.children) {
5387
5387
  item['isLeaf'] = true;
5388
5388
  }
5389
5389
  if (Array.isArray(item.children) && item.children.length > 0) {
@@ -5840,6 +5840,7 @@ const ExplorerMenu = props => {
5840
5840
  onChange
5841
5841
  } = props;
5842
5842
  const store = useContext(ExampleContext);
5843
+ const [eventKey, setEventKey] = useState([]);
5843
5844
  if (!store) return;
5844
5845
  return jsx("div", {
5845
5846
  className: 'frame-left',
@@ -5847,6 +5848,7 @@ const ExplorerMenu = props => {
5847
5848
  isload: true,
5848
5849
  treeData: data,
5849
5850
  height: height,
5851
+ expandedKeys: eventKey,
5850
5852
  icon: (v, className) => {
5851
5853
  if (v.icon == false) return jsx(Fragment, {});
5852
5854
  return store.getIcons(v, className);
@@ -5866,6 +5868,9 @@ const ExplorerMenu = props => {
5866
5868
  filterData: v => {
5867
5869
  if (v.type == 'file') return false;
5868
5870
  return true;
5871
+ },
5872
+ onExpand: v => {
5873
+ setEventKey(v);
5869
5874
  }
5870
5875
  })
5871
5876
  });
@@ -7057,7 +7062,6 @@ const Layout$1 = props => {
7057
7062
  onDblclick?.(key, info);
7058
7063
  }
7059
7064
  }
7060
- console.log(expandkey, '啊我key');
7061
7065
  return jsxs("div", {
7062
7066
  className: 'file-continer-main',
7063
7067
  children: [store?.loading == ApiStatusEnum.LOADING && jsx(Loading, {}), jsxs(SelectBox, {
@@ -7100,7 +7104,7 @@ const Layout$1 = props => {
7100
7104
  }), store?.menutype == 'table' && jsx(Tree, {
7101
7105
  type: 'table',
7102
7106
  checks: checks,
7103
- expandedKeys: ['我的天啊/你好啊'],
7107
+ expandedKeys: expandkey,
7104
7108
  treeData: store.curlist,
7105
7109
  columns: store.columns,
7106
7110
  checkType: store.checkType,