@gingkoo/pandora-explorer 0.0.1-alpha.48 → 0.0.1-alpha.49
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 +16 -8
- package/lib/es/index.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.49
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -7768,11 +7768,16 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7768
7768
|
if (key == curInfo?.key && type == 'menu') {
|
|
7769
7769
|
if (data?.key) {
|
|
7770
7770
|
loadData(data.key);
|
|
7771
|
-
updata(key,
|
|
7771
|
+
updata(key, {
|
|
7772
|
+
key: data.key,
|
|
7773
|
+
title: value
|
|
7774
|
+
});
|
|
7772
7775
|
}
|
|
7773
7776
|
} else {
|
|
7774
7777
|
curInfo?.key && loadData(curInfo?.key);
|
|
7775
|
-
updata(key,
|
|
7778
|
+
updata(key, {
|
|
7779
|
+
title: value
|
|
7780
|
+
});
|
|
7776
7781
|
}
|
|
7777
7782
|
}
|
|
7778
7783
|
}
|
|
@@ -7852,23 +7857,26 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7852
7857
|
});
|
|
7853
7858
|
setCurList(list);
|
|
7854
7859
|
}
|
|
7855
|
-
function updata(id,
|
|
7856
|
-
const fixData = (data, id,
|
|
7860
|
+
function updata(id, param) {
|
|
7861
|
+
const fixData = (data, id, param) => {
|
|
7857
7862
|
let arr = data;
|
|
7858
7863
|
let i = 0;
|
|
7859
7864
|
while (i < arr.length) {
|
|
7860
7865
|
let item = arr[i];
|
|
7861
7866
|
if (item.key == id) {
|
|
7862
|
-
|
|
7867
|
+
let _arr = Object.keys(param);
|
|
7868
|
+
_arr.map(v => {
|
|
7869
|
+
item[v] = param[v];
|
|
7870
|
+
});
|
|
7863
7871
|
}
|
|
7864
7872
|
if (Array.isArray(item.children)) {
|
|
7865
|
-
item.children = fixData(item.children, id,
|
|
7873
|
+
item.children = fixData(item.children, id, param);
|
|
7866
7874
|
}
|
|
7867
7875
|
i++;
|
|
7868
7876
|
}
|
|
7869
7877
|
return arr || [];
|
|
7870
7878
|
};
|
|
7871
|
-
let arr = fixData(data || [], id,
|
|
7879
|
+
let arr = fixData(data || [], id, param);
|
|
7872
7880
|
onChange?.(arr);
|
|
7873
7881
|
}
|
|
7874
7882
|
const reloadNode = key => {
|