@gingkoo/pandora-explorer 0.0.1-alpha.41 → 0.0.1-alpha.43

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.41
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.43
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -5679,7 +5679,6 @@ var Tree = (props => {
5679
5679
  };
5680
5680
  //树的懒加载
5681
5681
  const onLoadData = treeNode => {
5682
- console.log(treeNode, '加载');
5683
5682
  onChange ? null : seTmotionShow(false);
5684
5683
  if (!treeNode.api) {
5685
5684
  if (!treeNode?.children) {
@@ -5974,7 +5973,6 @@ const ExplorerMenu = props => {
5974
5973
  const store = useContext(ExampleContext);
5975
5974
  const [eventKey, setEventKey] = useState([]);
5976
5975
  const [select, setSelect] = useState('');
5977
- console.log('even:t', eventKey, 'load:', store.nav_loadKey);
5978
5976
  useEffect(() => {
5979
5977
  setEventKey(expandedKeys);
5980
5978
  }, [expandedKeys]);
@@ -7241,7 +7239,7 @@ const Layout$1 = props => {
7241
7239
  store.setCurInfo(info);
7242
7240
  store.setCurList(info?.children);
7243
7241
  } else {
7244
- loadData(key, info);
7242
+ loadData(key);
7245
7243
  }
7246
7244
  let arr = [...(store.log || [])];
7247
7245
  if (arr.length !== store.logindex) {
@@ -7627,9 +7625,15 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7627
7625
  //清空日志
7628
7626
  setLog([]);
7629
7627
  },
7630
- updateData: () => {
7631
- if (curInfo?.key) {
7632
- loadData(curInfo.key, curInfo);
7628
+ updateData: key => {
7629
+ if (key) {
7630
+ loadData(key);
7631
+ reloadNode(key);
7632
+ } else {
7633
+ if (curInfo?.key) {
7634
+ loadData(curInfo.key);
7635
+ reloadNode(curInfo.key);
7636
+ }
7633
7637
  }
7634
7638
  }
7635
7639
  }));
@@ -7750,7 +7754,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7750
7754
  if (info.create_file) {
7751
7755
  if (curInfo) {
7752
7756
  await createFile?.(value, curInfo);
7753
- // curInfo?.key && loadData(curInfo?.key);
7757
+ curInfo?.key && loadData(curInfo?.key);
7754
7758
  reloadNode(curInfo?.key);
7755
7759
  }
7756
7760
  } else {
@@ -7876,7 +7880,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7876
7880
  let arr = addData(data || [], key);
7877
7881
  onChange?.(arr);
7878
7882
  };
7879
- return jsxs(ExampleContext.Provider, {
7883
+ return jsx(ExampleContext.Provider, {
7880
7884
  value: {
7881
7885
  //data
7882
7886
  dataMap,
@@ -7920,12 +7924,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7920
7924
  setLoadKey,
7921
7925
  setNavLoadKey
7922
7926
  },
7923
- children: [jsxs("button", {
7924
- onClick: () => {
7925
- reloadNode('a12');
7926
- },
7927
- children: ["\u5237\u65B0\u7ED3\u70B9", ' ']
7928
- }), jsx("div", {
7927
+ children: jsx("div", {
7929
7928
  className: 'explorer-container',
7930
7929
  children: jsx(Layout, {
7931
7930
  ...props,
@@ -7933,7 +7932,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7933
7932
  loadNode: loadNode,
7934
7933
  onRename: onRename
7935
7934
  })
7936
- })]
7935
+ })
7937
7936
  });
7938
7937
  });
7939
7938