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