@gingkoo/pandora-explorer 0.0.1-alpha.47 → 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 -7
- 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,10 +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, {
|
|
7772
|
+
key: data.key,
|
|
7773
|
+
title: value
|
|
7774
|
+
});
|
|
7771
7775
|
}
|
|
7772
7776
|
} else {
|
|
7773
7777
|
curInfo?.key && loadData(curInfo?.key);
|
|
7774
|
-
updata(key,
|
|
7778
|
+
updata(key, {
|
|
7779
|
+
title: value
|
|
7780
|
+
});
|
|
7775
7781
|
}
|
|
7776
7782
|
}
|
|
7777
7783
|
}
|
|
@@ -7851,23 +7857,26 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7851
7857
|
});
|
|
7852
7858
|
setCurList(list);
|
|
7853
7859
|
}
|
|
7854
|
-
function updata(id,
|
|
7855
|
-
const fixData = (data, id,
|
|
7860
|
+
function updata(id, param) {
|
|
7861
|
+
const fixData = (data, id, param) => {
|
|
7856
7862
|
let arr = data;
|
|
7857
7863
|
let i = 0;
|
|
7858
7864
|
while (i < arr.length) {
|
|
7859
7865
|
let item = arr[i];
|
|
7860
7866
|
if (item.key == id) {
|
|
7861
|
-
|
|
7867
|
+
let _arr = Object.keys(param);
|
|
7868
|
+
_arr.map(v => {
|
|
7869
|
+
item[v] = param[v];
|
|
7870
|
+
});
|
|
7862
7871
|
}
|
|
7863
7872
|
if (Array.isArray(item.children)) {
|
|
7864
|
-
item.children = fixData(item.children, id,
|
|
7873
|
+
item.children = fixData(item.children, id, param);
|
|
7865
7874
|
}
|
|
7866
7875
|
i++;
|
|
7867
7876
|
}
|
|
7868
7877
|
return arr || [];
|
|
7869
7878
|
};
|
|
7870
|
-
let arr = fixData(data || [], id,
|
|
7879
|
+
let arr = fixData(data || [], id, param);
|
|
7871
7880
|
onChange?.(arr);
|
|
7872
7881
|
}
|
|
7873
7882
|
const reloadNode = key => {
|