@gingkoo/pandora-explorer 0.0.1-alpha.2 → 0.0.1-alpha.4

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-explorer v0.0.1-alpha.2
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.4
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -5310,7 +5310,6 @@ var Tree = (props => {
5310
5310
  }, 0);
5311
5311
  return size > w ? size : Math.ceil(w);
5312
5312
  }, [width, _widht]);
5313
- console.log(width, 123);
5314
5313
  useEffect(() => {
5315
5314
  setData(treeData);
5316
5315
  }, [onChange, treeData]);
@@ -6025,7 +6024,7 @@ const SelectBox = props => {
6025
6024
  cur.current = [];
6026
6025
  }, 200);
6027
6026
  }
6028
- if (selects.length) {
6027
+ if (isDrag && selects.length) {
6029
6028
  if (target.current) {
6030
6029
  target.current.style.cssText = `
6031
6030
  position: absolute;
@@ -6262,7 +6261,7 @@ const SelectBox = props => {
6262
6261
  onMouseDown: e => {
6263
6262
  if (e.button === 2) return;
6264
6263
  let type = isSelectTarget(e);
6265
- if (checks.includes(type[0])) {
6264
+ if (type && checks.includes(type[0])) {
6266
6265
  if (!isDrag && checkMode == 'check') {
6267
6266
  let arr = selects.filter(v => v !== type?.[0]);
6268
6267
  setSelect(arr);
@@ -6272,7 +6271,7 @@ const SelectBox = props => {
6272
6271
  isDrag && createVDom(e);
6273
6272
  return;
6274
6273
  }
6275
- if (Array.isArray(type)) {
6274
+ if (type && Array.isArray(type)) {
6276
6275
  if (checkMode == 'check') {
6277
6276
  if (type[0] && selects.includes(type[0])) {
6278
6277
  let arr = selects.filter(v => v !== type?.[0]);
@@ -6290,10 +6289,11 @@ const SelectBox = props => {
6290
6289
  return;
6291
6290
  }
6292
6291
  if (selects.length) {
6293
- if (checkMode == 'check') return;
6294
- setSelect([]);
6295
- onChange([]);
6296
- empty();
6292
+ if (checkMode !== 'check') {
6293
+ setSelect([]);
6294
+ onChange([]);
6295
+ empty();
6296
+ }
6297
6297
  }
6298
6298
  clickRef.current = false;
6299
6299
  isSelectBoxes && setStageClickInfo({
@@ -6321,7 +6321,6 @@ function Item(props) {
6321
6321
  checks = false,
6322
6322
  icon
6323
6323
  } = props;
6324
- console.log(props, 123);
6325
6324
  const [value, setValue] = useState(props?.title || '');
6326
6325
  return jsxs("div", {
6327
6326
  className: cx$1('explorer-columns-list', {
@@ -6950,7 +6949,10 @@ const Layout$1 = props => {
6950
6949
  onRename: onRename,
6951
6950
  onMenuClick: onMenuClick,
6952
6951
  onDblclick: onDblclick,
6953
- loadData: loadNode
6952
+ loadData: loadNode,
6953
+ onChange: v => {
6954
+ store.setCurList(v);
6955
+ }
6954
6956
  }), store?.menutype == 'tile' && jsx(Tile, {
6955
6957
  width: width,
6956
6958
  height: height,
@@ -7219,6 +7221,9 @@ const Explorer = props => {
7219
7221
  suffix: 'folder'
7220
7222
  });
7221
7223
  };
7224
+ useEffect(() => {
7225
+ setCurList(data || []);
7226
+ }, [data]);
7222
7227
  useEffect(() => {
7223
7228
  const addLevel = (data, map) => {
7224
7229
  let i = 0;