@gingkoo/pandora-explorer 0.0.1-alpha.62 → 0.0.1-alpha.63

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.62
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.63
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -4736,7 +4736,7 @@ registerMenu('cur-folder', [{
4736
4736
  }, {
4737
4737
  key: 'create',
4738
4738
  icon: 'folder',
4739
- title: '新建文件'
4739
+ title: '新建文件夹'
4740
4740
  }, {
4741
4741
  type: 'line'
4742
4742
  }, {
@@ -6118,6 +6118,10 @@ const ExplorerMenu = props => {
6118
6118
  loadMenu: loadMenu,
6119
6119
  onChange: onChange,
6120
6120
  onRename: onRename,
6121
+ isEdit: store.isEdit,
6122
+ isDelect: store.isDelect,
6123
+ isDownload: store.isDownload,
6124
+ isUpload: store.isDownload,
6121
6125
  openMenu: openMenu,
6122
6126
  closeMenu: store.closeMenu,
6123
6127
  onSelect: v => {
@@ -6684,8 +6688,6 @@ const SelectBox = props => {
6684
6688
  }
6685
6689
  if (!key) return;
6686
6690
  typeof props.onUpload === 'function' && props?.onUpload(files, key, empty);
6687
- store.curInfo && loadData(store.curInfo?.key);
6688
- store.curInfo?.key && store.reloadNode(store.curInfo.key);
6689
6691
  };
6690
6692
  function handleDragEnter(e) {
6691
6693
  e.preventDefault();
@@ -7367,6 +7369,7 @@ const Layout$1 = props => {
7367
7369
  }
7368
7370
  function _onDblclick(key, info) {
7369
7371
  if (info.type == 'folder') {
7372
+ if (!isNavtab) return;
7370
7373
  if (Array.isArray(info?.children) && !info?.children.lenght) {
7371
7374
  store.setCurInfo(info);
7372
7375
  store.setCurList(info?.children);
@@ -7384,7 +7387,7 @@ const Layout$1 = props => {
7384
7387
  store.setLogIndex(arr.length);
7385
7388
  } else {
7386
7389
  onDblclick?.(key, {
7387
- info,
7390
+ ...info,
7388
7391
  isEdit: store.isEdit
7389
7392
  });
7390
7393
  }
@@ -7776,6 +7779,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7776
7779
  isUpload = true,
7777
7780
  isEdit = true,
7778
7781
  isDownload = true,
7782
+ isNavtab = true,
7779
7783
  createFile,
7780
7784
  onCopy,
7781
7785
  onShear,
@@ -7949,6 +7953,16 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7949
7953
  let map = addLevel(curlist, {});
7950
7954
  setDataMap(map);
7951
7955
  }, [curlist]);
7956
+ useEffect(() => {
7957
+ if (isNavtab) return;
7958
+ console.log(data, '我是data');
7959
+ console.log(curlist, '我是cur');
7960
+ if (!curlist?.length) {
7961
+ if (Array.isArray(data)) {
7962
+ setCurList(data);
7963
+ }
7964
+ }
7965
+ }, [curlist, isNavtab, data]);
7952
7966
  /* ************ 加载更新数据 **************** */
7953
7967
  async function loadData(key, param, closeload = true) {
7954
7968
  closeload && setLoading(ApiStatusEnum.LOADING);