@gingkoo/pandora-explorer 0.0.1-alpha.42 → 0.0.1-alpha.44
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 +20 -8
- 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.44
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -5968,7 +5968,7 @@ const ExplorerMenu = props => {
|
|
|
5968
5968
|
expandedKeys,
|
|
5969
5969
|
onMenuClick,
|
|
5970
5970
|
onChange,
|
|
5971
|
-
onRename
|
|
5971
|
+
onRename: _onRename
|
|
5972
5972
|
} = props;
|
|
5973
5973
|
const store = useContext(ExampleContext);
|
|
5974
5974
|
const [eventKey, setEventKey] = useState([]);
|
|
@@ -5981,6 +5981,9 @@ const ExplorerMenu = props => {
|
|
|
5981
5981
|
setSelect(store.curInfo?.key);
|
|
5982
5982
|
}
|
|
5983
5983
|
}, [store.curInfo?.key]);
|
|
5984
|
+
function onRename(key, value, info) {
|
|
5985
|
+
_onRename(key, value, info, 'main');
|
|
5986
|
+
}
|
|
5984
5987
|
return jsx("div", {
|
|
5985
5988
|
className: 'frame-left',
|
|
5986
5989
|
onContextMenu: e => {
|
|
@@ -7203,7 +7206,7 @@ const Layout$1 = props => {
|
|
|
7203
7206
|
onClick,
|
|
7204
7207
|
onCheck,
|
|
7205
7208
|
onDblclick,
|
|
7206
|
-
onRename,
|
|
7209
|
+
onRename: _onRename,
|
|
7207
7210
|
onMenuClick: _onMenuClick,
|
|
7208
7211
|
onUpload
|
|
7209
7212
|
} = props;
|
|
@@ -7239,7 +7242,7 @@ const Layout$1 = props => {
|
|
|
7239
7242
|
store.setCurInfo(info);
|
|
7240
7243
|
store.setCurList(info?.children);
|
|
7241
7244
|
} else {
|
|
7242
|
-
loadData(key
|
|
7245
|
+
loadData(key);
|
|
7243
7246
|
}
|
|
7244
7247
|
let arr = [...(store.log || [])];
|
|
7245
7248
|
if (arr.length !== store.logindex) {
|
|
@@ -7254,6 +7257,9 @@ const Layout$1 = props => {
|
|
|
7254
7257
|
onDblclick?.(key, info);
|
|
7255
7258
|
}
|
|
7256
7259
|
}
|
|
7260
|
+
function onRename(key, value, info) {
|
|
7261
|
+
_onRename(key, value, info, 'main');
|
|
7262
|
+
}
|
|
7257
7263
|
return jsxs("div", {
|
|
7258
7264
|
className: 'file-continer-main',
|
|
7259
7265
|
onClick: () => {
|
|
@@ -7625,10 +7631,15 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7625
7631
|
//清空日志
|
|
7626
7632
|
setLog([]);
|
|
7627
7633
|
},
|
|
7628
|
-
updateData:
|
|
7629
|
-
if (
|
|
7630
|
-
loadData(
|
|
7631
|
-
reloadNode(
|
|
7634
|
+
updateData: key => {
|
|
7635
|
+
if (key) {
|
|
7636
|
+
loadData(key);
|
|
7637
|
+
reloadNode(key);
|
|
7638
|
+
} else {
|
|
7639
|
+
if (curInfo?.key) {
|
|
7640
|
+
loadData(curInfo.key);
|
|
7641
|
+
reloadNode(curInfo.key);
|
|
7642
|
+
}
|
|
7632
7643
|
}
|
|
7633
7644
|
}
|
|
7634
7645
|
}));
|
|
@@ -7749,6 +7760,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7749
7760
|
if (info.create_file) {
|
|
7750
7761
|
if (curInfo) {
|
|
7751
7762
|
await createFile?.(value, curInfo);
|
|
7763
|
+
curInfo?.key && loadData(curInfo?.key);
|
|
7752
7764
|
reloadNode(curInfo?.key);
|
|
7753
7765
|
}
|
|
7754
7766
|
} else {
|