BhtPageBackground
文档版本:1.0.0
描述
页面背景组件,用于配置页面背景颜色、背景图片和页面高度。
效果
![]()
示例
<bht-page-background></bht-page-background>
代码
<bht-page-background :ref="item.id" :item="item"></bht-page-background>
或者
<BhtPageBackground :ref="item.id" :item="item"></BhtPageBackground>
参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| item | Object | 否 | - | 组件配置信息。 |
配置项
item.config.data 支持的常用字段如下:
| key | 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
| backgroundColor | 背景颜色 | string | #f6f8fb | 请输入页面背景颜色 |
| backgroundImage | 背景图片 | string | - | 请输入背景图片地址 |
| backgroundSize | 背景尺寸 | string | cover | cover / contain / auto |
| backgroundRepeat | 重复方式 | string | no-repeat | no-repeat / repeat |
| backgroundPosition | 背景位置 | string | center center | 请输入背景位置 |
| backgroundAttachment | 滚动方式 | string | scroll | scroll / fixed |
| minHeight | 页面最小高度 | string | 100vh | 请输入页面最小高度 |
引入
import { BhtPageBackground } from '@behappyto/cms-ui-vue3'