# tui-banner-arc Banner底部圆弧效果 会员组件
介绍
Banner 底部大圆弧效果。
# 引入
# uni-app引入
第一种,手动引入(可全局引入)
import tuiBannerArc from "@/components/thorui/tui-banner-arc/tui-banner-arc.vue"
export default {
components:{
tuiBannerArc
}
}
第二种,开启easycom组件模式,如果不了解如何配置,可先查看 官网文档 (opens new window)。
# uni-app版本平台差异说明
App-vue | H5 | 微信小程序 | 支付宝小程序 | 百度小程序 | 字节小程序 | QQ小程序 | App-Nvue |
---|---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 升级中 |
# 微信小程序引入(可在app.json中全局引入)
{
"usingComponents": {
"tui-banner-arc":"/components/thorui/tui-banner-arc/tui-banner-arc"
}
}
# 代码演示
部分功能演示,具体可参考示例程序以及文档API。
背景色banner
通过 background
属性设置背景色。
<tui-banner-arc background="-webkit-linear-gradient(#5473FF,#6DA8FF)"></tui-banner-arc>
调整高度
通过 height
属性设置banner高度, percent
属性设置圆弧宽度占banner宽度百分比,最低值120
<tui-banner-arc height="520" percent="140" background="-webkit-linear-gradient(#F27635,#FBC42E)">
<view class="tui-banner--text">自定义内容</view>
</tui-banner-arc>
图片banner
通过 height
属性设置banner高度
<!--图片宽高应设置与组件一致-->
<tui-banner-arc height="320">
<image src="https://www.thorui.cn/extend/welfare/img_member_banner.png" style="width: 100%;height: 320rpx;" mode="widthFix"></image>
</tui-banner-arc>
# Slots
插槽名称 | 说明 |
---|---|
default | banner内显示元素 |
# Props
属性名 | 类型 | 说明 | 默认值 |
---|---|---|---|
height | Number, String | banner高度 | 400 |
percent | Number, String | 圆弧元素宽度占banner宽度的百分比,用于调整弧度,最低值120 | 120 |
background | String | banner背景色 | - |
# Events
注:uni-app端绑定事件使用@前缀,如@click;微信小程序原生使用bind前缀,如bindclick
事件名 | 说明 | 回调参数 |
---|---|---|
- | - | - |
# 预览
请以移动端效果为准,touch事件目前尚未在PC端做兼容。
# 特别说明
该组件为 会员组件
,非开源内容,需开通会员才可获取使用。
# 线上程序扫码预览
![]() | ![]() | ![]() |
---|---|---|
ThorUI组件库小程序码 | H5二维码 | ThorUI示例小程序码 |