From 53b9411435a05b54730ac7a6b45f0c4c443ed4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A5=E8=BE=B9=E9=A1=B5=E5=AD=97?= <1096032096@qq.com> Date: Sat, 5 Oct 2024 14:03:54 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20skeleton=E6=96=87=E6=A1=A3=E8=A1=A5?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vantui/types/skeleton.d.ts | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/vantui/types/skeleton.d.ts b/packages/vantui/types/skeleton.d.ts index 17d8172c..f4fc7712 100644 --- a/packages/vantui/types/skeleton.d.ts +++ b/packages/vantui/types/skeleton.d.ts @@ -2,15 +2,53 @@ import { FunctionComponent, ReactNode } from 'react' import { ViewProps } from '@tarojs/components' export interface SkeletonProps extends ViewProps { + /** + * @description 段落占位图行数 + * @default 0 + */ row?: number | string + /** + * @description 是否显示标题占位图 + */ title?: boolean + /** + * @description 是否显示头像占位图 + * @default false + */ avatar?: boolean + /** + * @description 是否显示占位图,传false时会展示子组件内容 + * @default true + */ loading?: boolean + /** + * @description 是否开启动画 + * @default true + */ animate?: boolean + /** + * @description 头像占位图大小 + * @default 32px + */ avatarSize?: string | number + /** + * @description 头像占位图形状,可选值为square + * @default round + */ avatarShape?: 'square' | 'round' + /** + * @description 标题占位图宽度 + * @default 40% + */ titleWidth?: string | number + /** + * @description 段落占位图宽度,可传数组来设置每一行的宽度 + * @default 100% + */ rowWidth?: string | string[] + /** + * @description + */ children?: ReactNode }