@gingkoo/pandora-explorer 0.0.1-alpha.53 → 0.0.1-alpha.54

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.53
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.54
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -7709,17 +7709,17 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7709
7709
  if (e.altKey && e.key === '1') {
7710
7710
  setMenutype('tile');
7711
7711
  }
7712
- if (e.ctrlKey && e.key === 'c') {
7712
+ if ((e.ctrlKey || e.metaKey) && e.key === 'c') {
7713
7713
  if (curSelect && dataMap?.[curSelect]) {
7714
7714
  onCopy?.(dataMap?.[curSelect]);
7715
7715
  }
7716
7716
  }
7717
- if (e.ctrlKey && e.key === 'x') {
7717
+ if ((e.ctrlKey || e.metaKey) && e.key === 'x') {
7718
7718
  if (curSelect && dataMap?.[curSelect]) {
7719
7719
  onCopy?.(dataMap?.[curSelect]);
7720
7720
  }
7721
7721
  }
7722
- if (e.ctrlKey && e.key === 'v') {
7722
+ if ((e.ctrlKey || e.metaKey) && e.key === 'v') {
7723
7723
  if (curSelect && dataMap?.[curSelect]) {
7724
7724
  onCopy?.(dataMap?.[curSelect]);
7725
7725
  }
@@ -7818,7 +7818,6 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7818
7818
  return data?.fileList || [];
7819
7819
  }
7820
7820
  const reloadNode = key => {
7821
- setNavLoadKey(nav_loadKey.filter(v => v !== key));
7822
7821
  const addData = (data, key) => {
7823
7822
  let arr = data;
7824
7823
  let i = 0;
@@ -7838,6 +7837,9 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7838
7837
  };
7839
7838
  let arr = addData(data || [], key);
7840
7839
  onChange?.(arr);
7840
+ setTimeout(() => {
7841
+ setNavLoadKey(nav_loadKey.filter(v => v !== key));
7842
+ }, 100);
7841
7843
  };
7842
7844
  function updata(id, param) {
7843
7845
  const fixData = (data, id, param) => {
@@ -7883,7 +7885,6 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7883
7885
  };
7884
7886
  if (value === false) {
7885
7887
  let arr = delata(curlist);
7886
- console.log(arr, 123);
7887
7888
  setCurList(arr);
7888
7889
  return;
7889
7890
  }
@@ -7995,9 +7996,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
7995
7996
  async function onMenuClick(key, param, type) {
7996
7997
  if (key == 'remove') {
7997
7998
  await onDelect?.(param);
7998
- if (param.key === curInfo?.key) {
7999
- data && loadData(data[0].key);
8000
- }
7999
+ data && loadData(data[0].key);
8001
8000
  if (type == 'menu') {
8002
8001
  reloadNode(param.parentPath);
8003
8002
  }
@@ -8013,6 +8012,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
8013
8012
  }
8014
8013
  if (key == 'paste') {
8015
8014
  onPaste?.(param);
8015
+ curInfo?.key && loadData(curInfo.key);
8016
8016
  reloadNode(param.key);
8017
8017
  return;
8018
8018
  }