Skip to content

Commit

Permalink
fix: dropdown-button 下载无效问题 (baidu#9554)
Browse files Browse the repository at this point in the history
  • Loading branch information
allenve committed Jan 30, 2024
1 parent 032ea5a commit f37c1e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/amis/src/renderers/DropDownButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,12 @@ export default class DropDownButton extends React.Component<
isOpened: false
});
}, 200);
// PopOver hide会直接调用close方法
e && e.preventDefault();

// 如果是下拉菜单,并且是下载链接,则不阻止默认事件
if (!(e?.target as any)?.getAttribute?.('download')) {
// PopOver hide会直接调用close方法
e && e.preventDefault();
}
}

keepOpen() {
Expand Down

0 comments on commit f37c1e6

Please sign in to comment.