diff --git a/CHANGELOG.md b/CHANGELOG.md index 48a29224cf..11ade8d121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,10 @@ toc: false spline: explain --- -## 🌈 1.7.2 `2024-05-17` +## 🌈 1.7.3 `2024-05-18` ### 🐞 Bug Fixes +- `Menu`: 修复二级及以下 `SubMenu`没有处理classname的缺陷 @uyarn ([#2911](https://github.com/Tencent/tdesign-react/pull/2911)) +- `Upload`: 修复手动上传的bug @HaixingOoO ([#2912](https://github.com/Tencent/tdesign-react/pull/2912)) - `Avatar`: 修复配合Popup使用浮层不展示的异常 @uyarn ## 🌈 1.7.1 `2024-05-16` diff --git a/package.json b/package.json index 08403e6535..737ab21f12 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tdesign-react", "purename": "tdesign", - "version": "1.7.2", + "version": "1.7.3", "description": "TDesign Component for React", "title": "tdesign-react", "main": "lib/index.js", diff --git a/src/menu/SubMenu.tsx b/src/menu/SubMenu.tsx index 4862bc6b90..4663355c91 100644 --- a/src/menu/SubMenu.tsx +++ b/src/menu/SubMenu.tsx @@ -21,7 +21,6 @@ export interface SubMenuWithCustomizeProps extends SubMenuProps { const SubAccordion: FC = (props) => { const { content, children = content, disabled, icon, title, value, className, style, level = 1, popupProps } = props; - const { overlayClassName, overlayInnerClassName, ...restPopupProps } = popupProps || {}; const { classPrefix } = useConfig(); @@ -57,6 +56,7 @@ const SubAccordion: FC = (props) => { `${classPrefix}-menu__item--plain`, `${classPrefix}-submenu__item`, `${classPrefix}-submenu__item--icon`, + (child as ReactElement).props?.className, ), }), ); diff --git a/src/upload/hooks/useUpload.ts b/src/upload/hooks/useUpload.ts index f5e842e61d..72dc032a0a 100644 --- a/src/upload/hooks/useUpload.ts +++ b/src/upload/hooks/useUpload.ts @@ -272,12 +272,13 @@ export default function useUpload(props: TdUploadProps) { setUploading(false); if (status === 'success') { // 全部上传成功后,一次性添加(非自动上传已在上一步添加) - if (props.autoUpload) { - setUploadValue([...data.files], { - trigger: 'add', - file: data.files[0], - }); - } + /** + * 手动上传或自动上传都应触发setUploadValue + */ + setUploadValue([...data.files], { + trigger: 'add', + file: data.files[0], + }); props.onSuccess?.({ fileList: data.files, currentFiles: files,