# tui-msg 提示页 会员组件
介绍
Msg:提示页,常用布局。
# 引入
# uni-app引入
第一种,手动引入(可全局引入)
import tuiMsg from "@/components/thorui/tui-msg/tui-msg.vue"
export default {
components:{
tuiMsg
}
}
第二种,开启easycom组件模式,如果不了解如何配置,可先查看 官网文档 (opens new window)。
# uni-app版本平台差异说明
App-Nvue | App-vue | H5 | 微信小程序 | 支付宝小程序 | 百度小程序 | 字节小程序 | QQ小程序 |
---|---|---|---|---|---|---|---|
升级中 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
# 微信小程序引入(可在app.json中全局引入)
{
"usingComponents": {
"tui-msg": "/components/thorui/tui-msg/tui-msg"
}
}
# 代码演示
部分功能演示,具体可参考示例程序以及文档API。
成功提示页
通过 type
属性设置展示的图标,可传值参考 icon
(opens new window) 组件 type
属性值,也可以使用自定义图片图标。
<tui-msg type="success" title="操作成功" desc="内容详情,根据实际需要进行展示,内容为空则不展示展示" color="#07c160">
<!--自定义内容部分-->
<tui-button type="green" width="400rpx" height="84rpx" bold margin="32rpx auto 0">主要操作</tui-button>
<tui-button type="gray-green" width="400rpx" height="84rpx" bold margin="32rpx auto">辅助操作</tui-button>
</tui-msg>
# Slots
插槽名称 | 说明 |
---|---|
default | 标签显示内容,自定义内容 |
# Props
图标类型参考 icon
(opens new window) 组件 type
属性值。
属性名 | 类型 | 说明 | 默认值 |
---|---|---|---|
title | String | 标题 | - |
type | String | 图标类型:success,warn,clear,waiting等 | - |
color | String | 图标颜色 | #07c160 |
size | Number | 图标字体大小,单位px | 64 |
src | String | 图片图标,置src 之后,type失效 | - |
width | String | 图片图标宽度 | 180rpx |
height | String | 图片图标高度 | 180rpx |
desc | String | 详细描述内容 | - |
# Events
注:uni-app端绑定事件使用@前缀,如@click;微信小程序原生使用bind前缀,如bindclick
事件名 | 说明 | 回调参数 |
---|---|---|
- | - | - |
# 预览
请以移动端效果为准,touch事件目前尚未完全在PC端做兼容。
# 特别说明
该组件为 会员组件
,非开源内容,需开通会员才可获取使用。
# 线上程序扫码预览
![]() | ![]() | ![]() |
---|---|---|
ThorUI组件库小程序码 | H5二维码 | ThorUI示例小程序码 |