@gingkoo/pandora-explorer 0.0.1-alpha.44 → 0.0.1-alpha.46

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.44
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.46
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -5982,7 +5982,7 @@ const ExplorerMenu = props => {
5982
5982
  }
5983
5983
  }, [store.curInfo?.key]);
5984
5984
  function onRename(key, value, info) {
5985
- _onRename(key, value, info, 'main');
5985
+ _onRename(key, value, info, 'menu');
5986
5986
  }
5987
5987
  return jsx("div", {
5988
5988
  className: 'frame-left',
@@ -7756,7 +7756,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7756
7756
  return data?.fileList || [];
7757
7757
  }
7758
7758
  //创建和重名
7759
- async function onRename(key, value, info) {
7759
+ async function onRename(key, value, info, type) {
7760
7760
  if (info.create_file) {
7761
7761
  if (curInfo) {
7762
7762
  await createFile?.(value, curInfo);
@@ -7764,9 +7764,15 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7764
7764
  reloadNode(curInfo?.key);
7765
7765
  }
7766
7766
  } else {
7767
- await _onRename?.(key, value, info);
7768
- curInfo?.key && loadData(curInfo?.key);
7769
- updata(key, 'title', value);
7767
+ let data = await _onRename?.(key, value, info);
7768
+ if (key == curInfo?.key && type == 'menu') {
7769
+ if (data?.key) {
7770
+ curInfo?.key && loadData(data.key);
7771
+ }
7772
+ } else {
7773
+ curInfo?.key && loadData(curInfo?.key);
7774
+ updata(key, 'title', value);
7775
+ }
7770
7776
  }
7771
7777
  }
7772
7778
  async function uploadFile() {