$ui/components/my-lazy

懒加载组件

Source:

Members

(inner) props

Source:
Properties:
Name Type Attributes Default Description
name string <optional>
my-lazy

transition名称,用来定制动画

fit boolean <optional>
false

适配父容器

timeout number <optional>

等待时间,如果指定了时间,不论可见与否,在指定时间之后自动加载

viewport HTMLElement <optional>

组件所在的视口,如果组件是在页面容器内滚动,视口就是该容器

threshold number | string <optional>
0

预加载阈值

direction string <optional>
vertical

视口的滚动方向, vertical代表垂直方向,horizontal代表水平方向

属性参数

(inner) slots

Source:
Properties:
Name Type Description
default string

需要懒加载的内容

skeleton string

骨架内容

插槽

Events

init

Source:

开始加载懒加载模块,此时骨架组件开始消失