May 21, 2021 WeChat Mini Program Development Document
The Msg component provides the style of an action confirmation page or a standard confirmation page for successful or failed operations.
{
"usingComponents": {
"mp-msg": "../components/msg/msg"
},
"navigationBarTitleText": "UI组件库"
}
<view class="page">
<mp-msg type="success" title="操作成功">
<view slot="desc">内容详情,可根据实际需要安排,如果换行则不超过规定长度,居中展现<navigator url="" class="weui-msg__link">文字链接</navigator></view>
<view slot="extend">
<view>1. 说明1</view>
<view>2. 说明2</view>
</view>
<view slot="handle">
<button class="weui-btn" type="primary">主要操作</button>
<button class="weui-btn" type="default">辅助操作</button>
</view>
<view slot="footer">
<view class="weui-footer__links">
<navigator url="" class="weui-footer__link">底部链接文本</navigator>
</view>
<view class="weui-footer__text">Copyright © 2008-2016 weui.io</view>
</view>
</mp-msg>
</view>
Property | Type | The default | Required | Description |
---|---|---|---|---|
ext-class | string | Whether | A class added to the internal structure of a component that can be used to modify the style inside a component | |
type | string | Whether | The style of the top icon is the same as the type property usage of the icon component | |
size | number | 64 | Whether | Type is valid when it is not empty, as is the size property usage of the icon component |
icon | string | Whether | When type is empty, the value of the icon is the path to the top icon | |
title | string | Whether | Title | |
desc | string | Whether | The description content, and desc's slot is displayed in the same place |
Name | Describe |
---|---|
desc | Description of the contents of the slot |
extend | the slot of the description area below desc |
handle | The action button area slot |
footer | The bottom slot |