Skip to content

ViewLoading 视图加载中

基本使用

html
<view class="container">
  <be-view-loading></be-view-loading>
</view>
scss
.container {
  width: 100%;
  height: 100px;
  // 需要把容器设置为定位祖先元素
  position: relative;
}

WARNING

由于 ViewLoading 组件使用了position: absolute定位,所以需要把容器设置为定位祖先元素,比如给容器设置position: relative

API

Props

属性名说明类型默认值
iconSize加载图标大小css font-size50rpx
loadingIcon自定义加载图标Icon Props{ fontFamily?: 'iconfont', prefix?: 'icon-', name: '' }
iconColor自定义加载图标颜色css color#aaaaaa
bgColor背景颜色css background-colorrgba(255, 255, 255, 0)
borderRadius边框圆角css border-radius0rpx
height高度css height100%

Slots

插槽名说明slot props默认值
default自定义加载样式-