api.md 3.7 KB

Dialog Props

名称 类型 默认值 必传 说明
visible boolean false N 是否显示。
title string 当前语言的 dialog.title N 标题。
titleAlign 'left'\|'center'\|'right' 'center' N 标题对齐方式。
content string 当前语言的 dialog.content N 内容。
popup Popup {} N 弹出层参数。
showIcon boolean false N 是否显示图标。
icon Icon {} N 图标参数。
btnStyle 'button'\|'text'\|'textLine' 'button' N 按钮样式。
primaryText string 当前语言的 dialog.primaryText N 主按钮文字。
primaryButton Button {} N 主按钮参数。
secondaryText string 当前语言的 dialog.secondaryText N 次按钮文字。
secondaryButton Button {} N 次按钮参数。
btnRatio [number,number] [1, 1] N 主次按钮大小比例。
btnReverse boolean false N 主次按钮位置是否反转。
secondaryClose boolean true N 次按钮是否关闭弹窗。
btnGap '0'\|'1'\|'2'\|'4'\|'8'\|'12'\|'16' '2' N 按钮间距。

Dialog Events

名称 类型 参数 描述
onclose () => void - 对话框关闭时触发。
onprimary () => void - 点击主按钮时触发。
onsecondary () => void - 点击次按钮时触发。

Dialog Snippets

名称 类型 参数 描述
contentChild Snippet - 传入时渲染 content 内容。
primaryChild Snippet - 传入时渲染 primaryText 内容。