Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modal 组件底部按钮能否支持水平模式? #6802

Open
longtoken opened this issue Dec 23, 2024 · 1 comment
Open

modal 组件底部按钮能否支持水平模式? #6802

longtoken opened this issue Dec 23, 2024 · 1 comment
Labels
feature need reproduce We cannot reproduce your problem

Comments

@longtoken
Copy link

Version of antd-mobile

No response

What is this feature about?

代码位置: src/components/modal/modal.tsx
<Space
direction='vertical'
block
className={classNames(
cls('footer'),
props.actions.length === 0 && cls('footer-empty')
)}
>
{props.actions.map((action, index) => (
<ModalActionButton
key={action.key}
action={action}
onAction={async () => {
await Promise.all([
action.onClick?.(),
props.onAction?.(action, index),
])
if (props.closeOnAction) {
props.onClose?.()
}
}}
/>
))}

这个地方的direction 是写死的vertical,能否改成支持用户自定义?
目前需要使用horizontal模式

@Layouwen Layouwen added the need reproduce We cannot reproduce your problem label Dec 23, 2024
Copy link
Contributor

Hi, longtoken.

Please provide a online reproduction so that we can help you troubleshoot the problem. You can create a demo by codesandbox or stackblitz.

我们需要你提供一个在线的重现实例,以便于我们帮你排查问题。你可以通过 codesandboxstackblitz 创建一个实例。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature need reproduce We cannot reproduce your problem
Projects
None yet
Development

No branches or pull requests

2 participants