nutui-uniapp
Version:
京东风格的轻量级移动端 Uniapp、Vue3 组件库(支持小程序开发)
50 lines (47 loc) • 1.07 kB
text/typescript
import type { ExtractPropTypes } from 'vue'
import { commonProps, makeStringProp, truthProp } from '../_utils'
import type { AvatarShape } from '../avatar/type'
export const skeletonProps = {
...commonProps,
/**
* @description 是否显示骨架屏
*/
loading: truthProp,
/**
* @description 每行宽度
*/
width: makeStringProp('100px'),
/**
* @description 每行高度
*/
height: makeStringProp('15px'),
/**
* @description 是否开启骨架屏动画
*/
animated: Boolean,
/**
* @description 是否显示头像
*/
avatar: Boolean,
/**
* @description 头像形状
*/
avatarShape: makeStringProp<AvatarShape>('round'),
/**
* @description 头像大小
*/
avatarSize: makeStringProp('50px'),
/**
* @description 标题/段落是否采用圆角风格
*/
round: Boolean,
/**
* @description 设置段落行数
*/
row: makeStringProp('1'),
/**
* @description 是否显示段落标题
*/
title: truthProp,
}
export type SkeletonProps = ExtractPropTypes<typeof skeletonProps>