Image 图片
基本使用
html
<be-image class="image1" src="/static/xxx/xxx.jpg" mode="widthFix"></be-image>scss
.image1 {
width: 100%;
}WARNING
必须给 Image 组件设置宽高,否则无法正常显示。
API
Props
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| rootClass | 根节点 class | string | - |
| rootStyle | 根节点 style | string | - |
Props extend uni-app image
| 属性名 | 说明 | 默认值 |
|---|---|---|
| src | 属性说明 | - |
| mode | 属性说明 | scaleToFill |
Slots
| 插槽名 | 说明 | slot props | 默认值 |
|---|---|---|---|
| loading | 自定义加载视图 | - | 有 |