@gingkoo/pandora-explorer 0.1.4 → 0.1.6
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 +4 -4
- 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.1.
|
|
2
|
+
* @gingkoo/pandora-explorer v0.1.6
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -5932,7 +5932,7 @@ const motion = {
|
|
|
5932
5932
|
};
|
|
5933
5933
|
var Tree = /*#__PURE__*/forwardRef((props, _ref) => {
|
|
5934
5934
|
const {
|
|
5935
|
-
type = '
|
|
5935
|
+
type = 'table',
|
|
5936
5936
|
autoExpandParent,
|
|
5937
5937
|
defaultExpandedKeys,
|
|
5938
5938
|
activeKey,
|
|
@@ -8790,7 +8790,7 @@ const Layout$1 = props => {
|
|
|
8790
8790
|
function searchNode(node, searchText, pathKeys = []) {
|
|
8791
8791
|
// 检查当前节点是否匹配
|
|
8792
8792
|
const currentPath = [...pathKeys, node.key];
|
|
8793
|
-
const isMatched = node.
|
|
8793
|
+
const isMatched = node.title?.toLowerCase().includes(searchText) || false;
|
|
8794
8794
|
// 如果有子节点,递归检查子节点
|
|
8795
8795
|
let matchedChildren = [];
|
|
8796
8796
|
let childExpandedKeys = [];
|
|
@@ -8820,7 +8820,7 @@ const Layout$1 = props => {
|
|
|
8820
8820
|
keys: []
|
|
8821
8821
|
};
|
|
8822
8822
|
}
|
|
8823
|
-
const result = searchTree(store.curlist, store
|
|
8823
|
+
const result = searchTree(store.curlist, store?.searchFiles);
|
|
8824
8824
|
store.setExpandkey(result.expandedKeys);
|
|
8825
8825
|
return result.tree;
|
|
8826
8826
|
}, [store.curlist, store?.searchFiles]);
|