mms-toast 提示框
简述
提示框,用于短暂显示提示信息。
注意
注意: 请以 uni_modules/mms-unix 与本文为准;各端差异以 uni-app 与各平台官方文档为准。涉及隐私能力(相册、定位、剪贴板、手机号等)需在 manifest 与后台完成配置。
平台差异说明
| App(vue) | App(nvue) | H5 | 小程序 |
|---|---|---|---|
| √ | √ | √ | √ |
基本使用
uvue
<template>
<view>
<mms-toast
:show="show"
text="操作成功"
></mms-toast>
</view>
</template>Props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
show | 是否显示 | boolean | false |
text | 提示文字 | string | '' |
icon | 图标 URL | string | '' |
position | 位置 center / top / bottom | string | center |
mask | 是否显示遮罩 | boolean | false |
示例
文字提示
uvue
<mms-toast :show="show" text="这是提示"></mms-toast>带图标
uvue
<mms-toast
:show="show"
text="成功"
icon="https://example.com/success.png"
></mms-toast>底部显示
uvue
<mms-toast
:show="show"
text="提示"
position="bottom"
></mms-toast>带遮罩
uvue
<mms-toast
:show="show"
text="加载中..."
mask
></mms-toast>