@gingkoo/pandora-explorer 0.0.1-alpha.3 → 0.0.1-alpha.5
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 -15
- package/lib/es/index.js.map +1 -1
- package/lib/es/types.d.ts +1 -1
- package/lib/umd/index.js +22 -15
- package/lib/umd/index.js.map +1 -1
- package/lib/umd/index.min.js +1 -1
- package/lib/umd/index.min.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.5
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -5310,9 +5310,6 @@ var Tree = (props => {
|
|
|
5310
5310
|
}, 0);
|
|
5311
5311
|
return size > w ? size : Math.ceil(w);
|
|
5312
5312
|
}, [width, _widht]);
|
|
5313
|
-
useEffect(() => {
|
|
5314
|
-
setData(treeData);
|
|
5315
|
-
}, [onChange, treeData]);
|
|
5316
5313
|
useEffect(() => {
|
|
5317
5314
|
let arr = type == 'tree' ? treeData : [...treeData, {
|
|
5318
5315
|
key: '_ending',
|
|
@@ -6024,7 +6021,7 @@ const SelectBox = props => {
|
|
|
6024
6021
|
cur.current = [];
|
|
6025
6022
|
}, 200);
|
|
6026
6023
|
}
|
|
6027
|
-
if (selects.length) {
|
|
6024
|
+
if (isDrag && selects.length) {
|
|
6028
6025
|
if (target.current) {
|
|
6029
6026
|
target.current.style.cssText = `
|
|
6030
6027
|
position: absolute;
|
|
@@ -6261,7 +6258,7 @@ const SelectBox = props => {
|
|
|
6261
6258
|
onMouseDown: e => {
|
|
6262
6259
|
if (e.button === 2) return;
|
|
6263
6260
|
let type = isSelectTarget(e);
|
|
6264
|
-
if (checks.includes(type[0])) {
|
|
6261
|
+
if (type && checks.includes(type[0])) {
|
|
6265
6262
|
if (!isDrag && checkMode == 'check') {
|
|
6266
6263
|
let arr = selects.filter(v => v !== type?.[0]);
|
|
6267
6264
|
setSelect(arr);
|
|
@@ -6271,7 +6268,7 @@ const SelectBox = props => {
|
|
|
6271
6268
|
isDrag && createVDom(e);
|
|
6272
6269
|
return;
|
|
6273
6270
|
}
|
|
6274
|
-
if (Array.isArray(type)) {
|
|
6271
|
+
if (type && Array.isArray(type)) {
|
|
6275
6272
|
if (checkMode == 'check') {
|
|
6276
6273
|
if (type[0] && selects.includes(type[0])) {
|
|
6277
6274
|
let arr = selects.filter(v => v !== type?.[0]);
|
|
@@ -6289,10 +6286,11 @@ const SelectBox = props => {
|
|
|
6289
6286
|
return;
|
|
6290
6287
|
}
|
|
6291
6288
|
if (selects.length) {
|
|
6292
|
-
if (checkMode
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6289
|
+
if (checkMode !== 'check') {
|
|
6290
|
+
setSelect([]);
|
|
6291
|
+
onChange([]);
|
|
6292
|
+
empty();
|
|
6293
|
+
}
|
|
6296
6294
|
}
|
|
6297
6295
|
clickRef.current = false;
|
|
6298
6296
|
isSelectBoxes && setStageClickInfo({
|
|
@@ -6941,14 +6939,24 @@ const Layout$1 = props => {
|
|
|
6941
6939
|
icon: store.getIcons,
|
|
6942
6940
|
isload: true,
|
|
6943
6941
|
ischeck: truncate,
|
|
6944
|
-
onChecks:
|
|
6945
|
-
|
|
6942
|
+
onChecks: arr => {
|
|
6943
|
+
let map = store.dataMap || {};
|
|
6944
|
+
let param = [];
|
|
6945
|
+
arr.forEach(checkedKeys => {
|
|
6946
|
+
if (map[checkedKeys]) {
|
|
6947
|
+
param.push(map[checkedKeys]);
|
|
6948
|
+
}
|
|
6949
|
+
});
|
|
6950
|
+
onCheck?.(arr, param);
|
|
6946
6951
|
},
|
|
6947
6952
|
onClick: onClick,
|
|
6948
6953
|
onRename: onRename,
|
|
6949
6954
|
onMenuClick: onMenuClick,
|
|
6950
6955
|
onDblclick: onDblclick,
|
|
6951
|
-
loadData: loadNode
|
|
6956
|
+
loadData: loadNode,
|
|
6957
|
+
onChange: v => {
|
|
6958
|
+
store.setCurList(v);
|
|
6959
|
+
}
|
|
6952
6960
|
}), store?.menutype == 'tile' && jsx(Tile, {
|
|
6953
6961
|
width: width,
|
|
6954
6962
|
height: height,
|
|
@@ -7218,7 +7226,6 @@ const Explorer = props => {
|
|
|
7218
7226
|
});
|
|
7219
7227
|
};
|
|
7220
7228
|
useEffect(() => {
|
|
7221
|
-
console.log(data, '数据改变');
|
|
7222
7229
|
setCurList(data || []);
|
|
7223
7230
|
}, [data]);
|
|
7224
7231
|
useEffect(() => {
|