@gingkoo/pandora-explorer 0.0.1-alpha.53 → 0.0.1-alpha.55
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 +15 -13
- package/lib/es/index.js.map +1 -1
- package/lib/es/types.d.ts +2 -2
- package/package.json +1 -1
package/lib/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @gingkoo/pandora-explorer v0.0.1-alpha.
|
|
2
|
+
* @gingkoo/pandora-explorer v0.0.1-alpha.55
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -7709,20 +7709,22 @@ 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
|
+
} else {
|
|
7716
|
+
onCopy?.(null);
|
|
7715
7717
|
}
|
|
7716
7718
|
}
|
|
7717
|
-
if (e.ctrlKey && e.key === 'x') {
|
|
7719
|
+
if ((e.ctrlKey || e.metaKey) && e.key === 'x') {
|
|
7718
7720
|
if (curSelect && dataMap?.[curSelect]) {
|
|
7719
|
-
|
|
7721
|
+
onShear?.(dataMap?.[curSelect]);
|
|
7722
|
+
} else {
|
|
7723
|
+
onShear?.(null);
|
|
7720
7724
|
}
|
|
7721
7725
|
}
|
|
7722
|
-
if (e.ctrlKey && e.key === 'v') {
|
|
7723
|
-
|
|
7724
|
-
onCopy?.(dataMap?.[curSelect]);
|
|
7725
|
-
}
|
|
7726
|
+
if ((e.ctrlKey || e.metaKey) && e.key === 'v') {
|
|
7727
|
+
curInfo && onPaste?.(curInfo);
|
|
7726
7728
|
}
|
|
7727
7729
|
};
|
|
7728
7730
|
const closeMenu = () => {
|
|
@@ -7818,7 +7820,6 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7818
7820
|
return data?.fileList || [];
|
|
7819
7821
|
}
|
|
7820
7822
|
const reloadNode = key => {
|
|
7821
|
-
setNavLoadKey(nav_loadKey.filter(v => v !== key));
|
|
7822
7823
|
const addData = (data, key) => {
|
|
7823
7824
|
let arr = data;
|
|
7824
7825
|
let i = 0;
|
|
@@ -7838,6 +7839,9 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7838
7839
|
};
|
|
7839
7840
|
let arr = addData(data || [], key);
|
|
7840
7841
|
onChange?.(arr);
|
|
7842
|
+
setTimeout(() => {
|
|
7843
|
+
setNavLoadKey(nav_loadKey.filter(v => v !== key));
|
|
7844
|
+
}, 100);
|
|
7841
7845
|
};
|
|
7842
7846
|
function updata(id, param) {
|
|
7843
7847
|
const fixData = (data, id, param) => {
|
|
@@ -7883,7 +7887,6 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7883
7887
|
};
|
|
7884
7888
|
if (value === false) {
|
|
7885
7889
|
let arr = delata(curlist);
|
|
7886
|
-
console.log(arr, 123);
|
|
7887
7890
|
setCurList(arr);
|
|
7888
7891
|
return;
|
|
7889
7892
|
}
|
|
@@ -7995,9 +7998,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7995
7998
|
async function onMenuClick(key, param, type) {
|
|
7996
7999
|
if (key == 'remove') {
|
|
7997
8000
|
await onDelect?.(param);
|
|
7998
|
-
|
|
7999
|
-
data && loadData(data[0].key);
|
|
8000
|
-
}
|
|
8001
|
+
data && loadData(data[0].key);
|
|
8001
8002
|
if (type == 'menu') {
|
|
8002
8003
|
reloadNode(param.parentPath);
|
|
8003
8004
|
}
|
|
@@ -8013,6 +8014,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8013
8014
|
}
|
|
8014
8015
|
if (key == 'paste') {
|
|
8015
8016
|
onPaste?.(param);
|
|
8017
|
+
curInfo?.key && loadData(curInfo.key);
|
|
8016
8018
|
reloadNode(param.key);
|
|
8017
8019
|
return;
|
|
8018
8020
|
}
|