@gingkoo/pandora-explorer 0.0.1-alpha.94 → 0.0.1-alpha.96
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 +29 -5
- 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.96
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -5595,10 +5595,16 @@ function TableItem(props) {
|
|
|
5595
5595
|
} : {},
|
|
5596
5596
|
children: [jsxs("div", {
|
|
5597
5597
|
className: 'row-item-content',
|
|
5598
|
-
children: [" ", v.render?.(
|
|
5598
|
+
children: [" ", v.render?.({
|
|
5599
|
+
id,
|
|
5600
|
+
...param
|
|
5601
|
+
}, v.key)]
|
|
5599
5602
|
}), jsx("div", {
|
|
5600
5603
|
className: 'row-item-tool',
|
|
5601
|
-
children: v?.renderTool ? v?.renderTool(
|
|
5604
|
+
children: v?.renderTool ? v?.renderTool({
|
|
5605
|
+
id,
|
|
5606
|
+
...param
|
|
5607
|
+
}, v.key) : !i && jsx("div", {
|
|
5602
5608
|
className: cx$1('row-item-check', {
|
|
5603
5609
|
active: active
|
|
5604
5610
|
}),
|
|
@@ -5680,7 +5686,10 @@ function TableItem(props) {
|
|
|
5680
5686
|
children: param[v?.key] || ''
|
|
5681
5687
|
}), jsx("div", {
|
|
5682
5688
|
className: 'row-item-tool',
|
|
5683
|
-
children: v?.renderTool ? v?.renderTool(
|
|
5689
|
+
children: v?.renderTool ? v?.renderTool({
|
|
5690
|
+
id,
|
|
5691
|
+
...param
|
|
5692
|
+
}, v.key) : !i && jsx("div", {
|
|
5684
5693
|
className: cx$1('row-item-check', {
|
|
5685
5694
|
active: active
|
|
5686
5695
|
}),
|
|
@@ -9248,6 +9257,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9248
9257
|
accept,
|
|
9249
9258
|
selectedSuffix,
|
|
9250
9259
|
multiple = true,
|
|
9260
|
+
expandkey: _expandkey,
|
|
9251
9261
|
createFile,
|
|
9252
9262
|
onCopy,
|
|
9253
9263
|
onShear,
|
|
@@ -9255,6 +9265,7 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9255
9265
|
onDelect,
|
|
9256
9266
|
onChange,
|
|
9257
9267
|
onChangeCurMap,
|
|
9268
|
+
onExpand,
|
|
9258
9269
|
loadData: _loadData,
|
|
9259
9270
|
onRename: _onRename,
|
|
9260
9271
|
onMenuClick: _onMenuClick,
|
|
@@ -9411,11 +9422,17 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9411
9422
|
let map = addLevel(curlist, param, '');
|
|
9412
9423
|
setDataMap(map);
|
|
9413
9424
|
}, [curlist, curSelectFile, curInfo]);
|
|
9425
|
+
//切换当前 文件目录时 需要清空的内容
|
|
9414
9426
|
useEffect(() => {
|
|
9415
9427
|
setExpandkey([]);
|
|
9416
9428
|
setCurSelect(null);
|
|
9417
9429
|
props?.onCheck?.([]);
|
|
9418
9430
|
}, [curInfo?.key]);
|
|
9431
|
+
useEffect(() => {
|
|
9432
|
+
if (_expandkey) {
|
|
9433
|
+
setExpandkey(_expandkey);
|
|
9434
|
+
}
|
|
9435
|
+
}, [_expandkey]);
|
|
9419
9436
|
useEffect(() => {
|
|
9420
9437
|
if (isNavtab) return;
|
|
9421
9438
|
if (!curlist?.length) {
|
|
@@ -9766,6 +9783,10 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9766
9783
|
if (key == 'rename') {
|
|
9767
9784
|
setRename(param.key);
|
|
9768
9785
|
}
|
|
9786
|
+
if (key == 'open' && param.type == 'folder') {
|
|
9787
|
+
loadData(param?.key || '');
|
|
9788
|
+
return;
|
|
9789
|
+
}
|
|
9769
9790
|
_onMenuClick?.(key, {
|
|
9770
9791
|
...param,
|
|
9771
9792
|
isEdit: isEdit
|
|
@@ -9913,7 +9934,10 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9913
9934
|
setCurSelectFile,
|
|
9914
9935
|
setLoadKey,
|
|
9915
9936
|
setNavLoadKey,
|
|
9916
|
-
setExpandkey
|
|
9937
|
+
setExpandkey: v => {
|
|
9938
|
+
onExpand?.(v);
|
|
9939
|
+
setExpandkey(v);
|
|
9940
|
+
}
|
|
9917
9941
|
},
|
|
9918
9942
|
children: jsx("div", {
|
|
9919
9943
|
className: 'explorer-container',
|