@gingkoo/pandora-explorer 0.0.1-alpha.94 → 0.0.1-alpha.95
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 +17 -2
- package/lib/es/index.js.map +1 -1
- package/lib/es/types.d.ts +2 -0
- 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.95
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -9248,6 +9248,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9248
9248
|
accept,
|
|
9249
9249
|
selectedSuffix,
|
|
9250
9250
|
multiple = true,
|
|
9251
|
+
expandkey: _expandkey,
|
|
9251
9252
|
createFile,
|
|
9252
9253
|
onCopy,
|
|
9253
9254
|
onShear,
|
|
@@ -9255,6 +9256,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9255
9256
|
onDelect,
|
|
9256
9257
|
onChange,
|
|
9257
9258
|
onChangeCurMap,
|
|
9259
|
+
onExpand,
|
|
9258
9260
|
loadData: _loadData,
|
|
9259
9261
|
onRename: _onRename,
|
|
9260
9262
|
onMenuClick: _onMenuClick,
|
|
@@ -9411,11 +9413,17 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9411
9413
|
let map = addLevel(curlist, param, '');
|
|
9412
9414
|
setDataMap(map);
|
|
9413
9415
|
}, [curlist, curSelectFile, curInfo]);
|
|
9416
|
+
//切换当前 文件目录时 需要清空的内容
|
|
9414
9417
|
useEffect(() => {
|
|
9415
9418
|
setExpandkey([]);
|
|
9416
9419
|
setCurSelect(null);
|
|
9417
9420
|
props?.onCheck?.([]);
|
|
9418
9421
|
}, [curInfo?.key]);
|
|
9422
|
+
useEffect(() => {
|
|
9423
|
+
if (_expandkey) {
|
|
9424
|
+
setExpandkey(_expandkey);
|
|
9425
|
+
}
|
|
9426
|
+
}, [_expandkey]);
|
|
9419
9427
|
useEffect(() => {
|
|
9420
9428
|
if (isNavtab) return;
|
|
9421
9429
|
if (!curlist?.length) {
|
|
@@ -9766,6 +9774,10 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9766
9774
|
if (key == 'rename') {
|
|
9767
9775
|
setRename(param.key);
|
|
9768
9776
|
}
|
|
9777
|
+
if (key == 'open' && param.type == 'folder') {
|
|
9778
|
+
loadData(param?.key || '');
|
|
9779
|
+
return;
|
|
9780
|
+
}
|
|
9769
9781
|
_onMenuClick?.(key, {
|
|
9770
9782
|
...param,
|
|
9771
9783
|
isEdit: isEdit
|
|
@@ -9913,7 +9925,10 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9913
9925
|
setCurSelectFile,
|
|
9914
9926
|
setLoadKey,
|
|
9915
9927
|
setNavLoadKey,
|
|
9916
|
-
setExpandkey
|
|
9928
|
+
setExpandkey: v => {
|
|
9929
|
+
onExpand?.(v);
|
|
9930
|
+
setExpandkey(v);
|
|
9931
|
+
}
|
|
9917
9932
|
},
|
|
9918
9933
|
children: jsx("div", {
|
|
9919
9934
|
className: 'explorer-container',
|