跳转到内容

骨架屏 Skeleton

通过设置 animation 属性,让骨架屏显示动画效果。

骨架屏组件提供 <sd-skeleton-line><sd-skeleton-shape> 两种组件,用户可根据需要组合使用。

图形骨架屏分为 square - 正方形(默认)circle - 圆形两种形状,并提供 smallmediumlarge 三种尺寸。

参数名描述类型默认值
loading是否展示骨架屏(加载中状态)booleantrue
animation是否开启骨架屏动画booleanfalse
参数名描述类型默认值
rows展示的行数number1
widths线型骨架的宽度Array<number | string>[]
line-height线型骨架的行高number20
line-spacing线型骨架的行间距number15
参数名描述类型默认值
shape图形骨架的形状'square' | 'circle''square'
size图形骨架的大小'small' | 'medium' | 'large''medium'