Section 标题栏

此组件是一个标题栏,主要用于文章、列表详情、通过"查看更多"获得更多信息等标题展示场景。
平台差异说明
| APP | H5 | 微信小程序 | 支付宝小程序 | QQ小程序 | ··· |
|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | 适配中 |
代码示例
部分功能示例,具体可参考示例程序以及文档API。
基础用法
通过 mode 属性设置标题装饰类型,可选值:
line竖线装饰circle圆形装饰square正方形装饰
html
<fu-section title="标题" mode="line"></fu-section>通过插槽自定义右侧内容
html
<fu-section title="主标题" customStyle="margin-top: 20rpx;">
<template v-slot:right>
<view>
查看更多
<fu-icon name="right"></fu-icon>
</view>
</template>
</fu-section>API
Section Props
| 属性名 | 说明 | 类型 | 默认值 | 可选值 |
|---|---|---|---|---|
| mode | 标题装饰类型,详见上方基础用法 | String | - | - |
| title | 主标题 | String | - | - |
| titleSize | 主标题字体大小 | String | 13px | - |
| titleColor | 主标题字体颜色 | String | #333333 | - |
| subTitle | 副标题 | String | - | - |
| subTitleSize | 副标题字体大小 | String | 12px | - |
| subTitleColor | 副标题字体颜色 | String | #999999 | - |
| customStyle | 定义需要用到的外部样式 | String | - | - |
Section Events
| 事件名 | 说明 | 参数 |
|---|---|---|
| click | 点击标题栏触发 | () => void |
Section Slot
| 名称 | 说明 |
|---|---|
| right | 自定义右侧内容 |
| default | 自定义标题栏下方内容 |