@gingkoo/pandora-explorer 0.0.1-alpha.56 → 0.0.1-alpha.58
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 +22 -17
- package/lib/es/index.js.map +1 -1
- 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.58
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -4663,11 +4663,13 @@ registerMenu('folder', [{
|
|
|
4663
4663
|
}, {
|
|
4664
4664
|
key: 'copy',
|
|
4665
4665
|
icon: 'copy',
|
|
4666
|
-
title: '复制'
|
|
4666
|
+
title: '复制',
|
|
4667
|
+
desc: 'ctrl + c'
|
|
4667
4668
|
}, {
|
|
4668
4669
|
key: 'shear',
|
|
4669
4670
|
icon: 'shear',
|
|
4670
|
-
title: '剪切'
|
|
4671
|
+
title: '剪切',
|
|
4672
|
+
desc: 'ctrl + x'
|
|
4671
4673
|
}, {
|
|
4672
4674
|
key: 'rename',
|
|
4673
4675
|
icon: 'rename',
|
|
@@ -4693,7 +4695,8 @@ registerMenu('cur-folder', [{
|
|
|
4693
4695
|
}, {
|
|
4694
4696
|
key: 'copy',
|
|
4695
4697
|
icon: 'copy',
|
|
4696
|
-
title: '复制'
|
|
4698
|
+
title: '复制',
|
|
4699
|
+
desc: 'ctrl + c'
|
|
4697
4700
|
}, {
|
|
4698
4701
|
key: 'file-upload',
|
|
4699
4702
|
icon: 'upload',
|
|
@@ -6400,7 +6403,7 @@ const SelectBox = props => {
|
|
|
6400
6403
|
document.removeEventListener('dragleave', handleDragLeave);
|
|
6401
6404
|
document?.removeEventListener('drop', handleDrop);
|
|
6402
6405
|
};
|
|
6403
|
-
}, [store.curInfo, store.dataMap]);
|
|
6406
|
+
}, [store.curInfo, store.dataMap, store.curInfo]);
|
|
6404
6407
|
useEffect(() => {
|
|
6405
6408
|
document.addEventListener('mousemove', handleBodyMousemove);
|
|
6406
6409
|
document.addEventListener('mouseup', handleBodyMouseup);
|
|
@@ -6588,6 +6591,7 @@ const SelectBox = props => {
|
|
|
6588
6591
|
}
|
|
6589
6592
|
if (!key) return;
|
|
6590
6593
|
typeof props.onUpload === 'function' && props?.onUpload(files, key, empty);
|
|
6594
|
+
store.curInfo && loadData(store.curInfo?.key);
|
|
6591
6595
|
}, 500);
|
|
6592
6596
|
};
|
|
6593
6597
|
function handleDragEnter(e) {
|
|
@@ -7674,22 +7678,18 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7674
7678
|
//清空日志
|
|
7675
7679
|
setLog([]);
|
|
7676
7680
|
},
|
|
7677
|
-
|
|
7681
|
+
updateNav: key => {
|
|
7678
7682
|
if (key) {
|
|
7679
|
-
|
|
7683
|
+
reloadNode(key);
|
|
7680
7684
|
} else {
|
|
7681
|
-
|
|
7682
|
-
reloadNode(curInfo.key);
|
|
7683
|
-
}
|
|
7685
|
+
curInfo?.key && reloadNode(curInfo.key);
|
|
7684
7686
|
}
|
|
7685
7687
|
},
|
|
7686
7688
|
updateData: key => {
|
|
7687
7689
|
if (key) {
|
|
7688
|
-
|
|
7690
|
+
loadData(key);
|
|
7689
7691
|
} else {
|
|
7690
|
-
|
|
7691
|
-
reloadNode(curInfo.key);
|
|
7692
|
-
}
|
|
7692
|
+
curInfo?.key && loadData(curInfo.key);
|
|
7693
7693
|
}
|
|
7694
7694
|
}
|
|
7695
7695
|
}));
|
|
@@ -7734,6 +7734,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7734
7734
|
}
|
|
7735
7735
|
if ((e.ctrlKey || e.metaKey) && e.key === 'v') {
|
|
7736
7736
|
curInfo && onPaste?.(curInfo);
|
|
7737
|
+
curInfo && reloadNode(curInfo.key);
|
|
7737
7738
|
}
|
|
7738
7739
|
};
|
|
7739
7740
|
const closeMenu = () => {
|
|
@@ -7906,9 +7907,13 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7906
7907
|
}
|
|
7907
7908
|
} else {
|
|
7908
7909
|
let data = await _onRename?.(key, value, info);
|
|
7909
|
-
if (
|
|
7910
|
+
if (info.type == 'folder' || type == 'menu') {
|
|
7910
7911
|
if (data?.key) {
|
|
7911
|
-
|
|
7912
|
+
if (key === curInfo?.key) {
|
|
7913
|
+
loadData(data.key);
|
|
7914
|
+
} else {
|
|
7915
|
+
curInfo?.key && loadData(curInfo?.key);
|
|
7916
|
+
}
|
|
7912
7917
|
updata(key, {
|
|
7913
7918
|
key: data.key,
|
|
7914
7919
|
title: value
|
|
@@ -8012,7 +8017,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8012
8017
|
} else {
|
|
8013
8018
|
curInfo?.key && loadData(curInfo?.key);
|
|
8014
8019
|
}
|
|
8015
|
-
if (type == '
|
|
8020
|
+
if (param.type == 'folder') {
|
|
8016
8021
|
reloadNode(param.parentPath);
|
|
8017
8022
|
}
|
|
8018
8023
|
return;
|