Skip to content

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

Open
@longtoken

Description

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模式

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions