更新时间:2020-03-26 14:51
本文介绍结果页(Message)。
属性名 | 描述 | 类型 | 默认值 | 必选 |
---|---|---|---|---|
className | 自定义的class | String | - | false |
type | 有 success、fail、info、warn、waiting、info 五种状态类型,默认为 success | String | success | false |
title | 主标题 | String | - | true |
subTitle | 副标题 | String | - | false |
mainButton | 主按钮的文本和可用性相关 | Object<buttonText, disabled> | - | false |
subButton | 副按钮的文本和可用性相关 | Object<buttonText, disabled> | - | false |
onTapMain | 主按钮的点击函数 | () => {} | - | false |
onTapSub | 副按钮的点击函数 | () => {} | - | false |
{
"defaultTitle": "小程序AntUI组件库",
"usingComponents": {
"message": "mini-antui/es/message/index"
}
}
<view>
<message
title="{{title}}"
subTitle="{{subTitle}}"
type="success"
mainButton="{{messageButton.mainButton}}"
subButton="{{messageButton.subButton}}"
onTapMain="goBack">
</message>
</view>
Page({
data: {
title: "操作成功",
subTitle: "内容详情可折行,建议不超过两行",
messageButton: {
mainButton: {
buttonText: "主要操作"
},
subButton: {
buttonText: "辅助操作"
}
}
},
goBack() {
my.navigateBack();
}
});
在文档使用中是否遇到以下问题
更多建议
匿名提交