seeder-resources-view 1.3.2 → 1.3.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/dist/index.esm.js +16 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -17890,7 +17890,16 @@ const useDirectoryTree = _ref => {
|
|
|
17890
17890
|
titleHeight: 30
|
|
17891
17891
|
}
|
|
17892
17892
|
}
|
|
17893
|
-
}
|
|
17893
|
+
},
|
|
17894
|
+
treeStyle = {},
|
|
17895
|
+
// Tree 组件样式
|
|
17896
|
+
wrapperStyle = {
|
|
17897
|
+
paddingTop: 16
|
|
17898
|
+
},
|
|
17899
|
+
// 包装器样式
|
|
17900
|
+
showIcon = true,
|
|
17901
|
+
// 新增:是否显示展开/折叠图标
|
|
17902
|
+
expandable = true // 新增:是否允许展开/折叠
|
|
17894
17903
|
} = _ref;
|
|
17895
17904
|
const [treeState, setTreeState] = useState({
|
|
17896
17905
|
data: [],
|
|
@@ -18104,18 +18113,17 @@ const useDirectoryTree = _ref => {
|
|
|
18104
18113
|
});
|
|
18105
18114
|
}
|
|
18106
18115
|
return /*#__PURE__*/jsx("div", {
|
|
18107
|
-
style:
|
|
18108
|
-
paddingTop: 16
|
|
18109
|
-
},
|
|
18116
|
+
style: wrapperStyle,
|
|
18110
18117
|
children: /*#__PURE__*/jsx(ConfigProvider, {
|
|
18111
18118
|
theme: theme,
|
|
18112
18119
|
children: /*#__PURE__*/jsx(Tree, {
|
|
18113
18120
|
blockNode: true,
|
|
18114
|
-
showIcon:
|
|
18121
|
+
showIcon: showIcon,
|
|
18115
18122
|
selectedKeys: treeState.selectedKeys,
|
|
18116
18123
|
expandedKeys: treeState.expandedKeys,
|
|
18117
18124
|
onSelect: onSelect,
|
|
18118
|
-
onExpand: onExpand
|
|
18125
|
+
onExpand: expandable ? onExpand : undefined // 不允许展开时不绑定事件
|
|
18126
|
+
,
|
|
18119
18127
|
treeData: treeState.data,
|
|
18120
18128
|
titleRender: nodeData => /*#__PURE__*/jsx(TreeTitle$1, {
|
|
18121
18129
|
title: nodeData.title,
|
|
@@ -18125,7 +18133,8 @@ const useDirectoryTree = _ref => {
|
|
|
18125
18133
|
handleDel: handleRemove,
|
|
18126
18134
|
handleAdd: handleCreate
|
|
18127
18135
|
}),
|
|
18128
|
-
height: height
|
|
18136
|
+
height: height,
|
|
18137
|
+
style: treeStyle
|
|
18129
18138
|
})
|
|
18130
18139
|
})
|
|
18131
18140
|
}, "folder-directory");
|
|
@@ -18314,7 +18323,6 @@ const ResourcesView = _ref => {
|
|
|
18314
18323
|
const calculateTotalSize = files => Array.from(files).reduce((sum, file) => sum + file.size, 0);
|
|
18315
18324
|
|
|
18316
18325
|
// 上传单个文件
|
|
18317
|
-
// 待改正:需要对folder replaceRoot
|
|
18318
18326
|
const uploadSingleFile = (file, folder, previousLoadedMap, onProgress) => {
|
|
18319
18327
|
const formData = new FormData();
|
|
18320
18328
|
formData.append('file', file);
|