seeder-resources-view 1.3.4 → 1.3.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/dist/index.esm.js +9 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -17897,9 +17897,9 @@ const useDirectoryTree = _ref => {
|
|
|
17897
17897
|
paddingTop: 16
|
|
17898
17898
|
},
|
|
17899
17899
|
// 包装器样式
|
|
17900
|
-
|
|
17901
|
-
//
|
|
17902
|
-
|
|
17900
|
+
expandable = true,
|
|
17901
|
+
// 新增:是否允许展开/折叠
|
|
17902
|
+
onSelectDir
|
|
17903
17903
|
} = _ref;
|
|
17904
17904
|
const [treeState, setTreeState] = useState({
|
|
17905
17905
|
data: [],
|
|
@@ -18059,6 +18059,11 @@ const useDirectoryTree = _ref => {
|
|
|
18059
18059
|
currentPath: info.node.path,
|
|
18060
18060
|
loading: true
|
|
18061
18061
|
});
|
|
18062
|
+
|
|
18063
|
+
// 触发 onSelectDir 回调(如果存在)
|
|
18064
|
+
if (onSelectDir) {
|
|
18065
|
+
onSelectDir(info.node.rawData);
|
|
18066
|
+
}
|
|
18062
18067
|
try {
|
|
18063
18068
|
// 模拟延迟加载
|
|
18064
18069
|
// eslint-disable-next-line no-promise-executor-return
|
|
@@ -18118,7 +18123,7 @@ const useDirectoryTree = _ref => {
|
|
|
18118
18123
|
theme: theme,
|
|
18119
18124
|
children: /*#__PURE__*/jsx(Tree, {
|
|
18120
18125
|
blockNode: true,
|
|
18121
|
-
showIcon:
|
|
18126
|
+
showIcon: true,
|
|
18122
18127
|
selectedKeys: treeState.selectedKeys,
|
|
18123
18128
|
expandedKeys: treeState.expandedKeys,
|
|
18124
18129
|
onSelect: onSelect,
|