Skip to content

Commit b67e578

Browse files
committed
feat: 修订文档
1 parent f15a79f commit b67e578

File tree

5 files changed

+110
-71
lines changed

5 files changed

+110
-71
lines changed

src/packages/skeleton/doc.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ import { Skeleton } from '@nutui/nutui-react'
5858
| --- | --- | --- | --- |
5959
| visible | 是否显示骨架屏(true不显示骨架屏,false显示骨架屏) | `boolean` | `true` |
6060
| animated | 是否开启骨架屏动画 | `boolean` | `false` |
61-
| avatar | 是否显示头像 | `boolean` | `false` |
62-
| avatarShape | 头像形状:正方形/圆形 | `string` | `round` |
63-
| avatarSize | 头像大小 | `string` | `50px` |
64-
| rows | 设置段落行数 | `number` | `1` |
65-
| title | 是否显示段落标题 | `boolean` | `true` |
61+
| size | 指定使用的内置高度 | `'small' \| 'normal' \| 'large'` | `normal` |
62+
| shape | 设置形状 | `'square' \| 'round' \| 'circle'` | `round` |
63+
| duration | 动画时长 | `number` | `0.6` |
64+
| rows | 设置行数 | `number` | `1` |
65+
| width | 设置宽度,优先级高于 `size` 属性 | `string\|number` | `-` |
66+
| height | 设置高度,优先级高于 `size` 属性 | `string\|number` | `-` |
6667

6768
## 主题定制
6869

@@ -74,7 +75,9 @@ import { Skeleton } from '@nutui/nutui-react'
7475
| --- | --- | --- |
7576
| \--nutui-skeleton-background | 背景 | `rgb(239, 239, 239)` |
7677
| \--nutui-skeleton-line-width | 线条宽度 | `100%` |
77-
| \--nutui-skeleton-line-height | 线条高度 | `15px` |
78-
| \--nutui-skeleton-line-border-radius | 线条边框圆角 | `0` |
78+
| \--nutui-skeleton-line-small-height | 线条高度 | `16px` |
79+
| \--nutui-skeleton-line-normal-height | 线条高度 | `24px` |
80+
| \--nutui-skeleton-line-large-height | 线条高度 | `32px` |
81+
| \--nutui-skeleton-line-border-radius | 线条边框圆角 | `4px` |
7982

8083
<Contribution name="Skeleton" />

src/sites/sites-react/doc/docs/react/migrate-from-v2.en-US.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,28 @@ If your project uses these components, please read the documentation carefully a
268268
- Added a new color attribute for price types.
269269

270270
[//]: # '#### Progress'
271-
[//]: # '#### Skeleton'
272-
[//]: # '#### Steps'
273-
[//]: # '#### Step'
274-
[//]: # '#### Swiper'
275-
[//]: # '#### Table'
276-
[//]: # '#### Tag'
277-
[//]: # '#### TrendArrow'
278-
[//]: # '#### Video'
279-
[//]: # '#### VirtualList'
280-
[//]: # '#### WaterMark'
281-
[//]: # '### 特色组件'
282-
[//]: # '#### Address'
283-
[//]: # '#### Barrage'
284-
[//]: # '#### Card'
285-
[//]: # '#### Signature'
286-
[//]: # '#### TimeSelect'
271+
272+
#### Skeleton
273+
274+
- Removed `avatar` attribute, can be simulated using `width` and `height` attributes
275+
- Removed `avatarShape` attribute, can be set using the `shape` attribute
276+
- Removed `avatarSize` attribute
277+
- Added `width` attribute to control width
278+
- Added `height` attribute to control height
279+
- Added `duration` attribute to control animation duration
280+
- Added `size` attribute to select from built-in component heights
281+
[//]: # '#### Steps'
282+
[//]: # '#### Step'
283+
[//]: # '#### Swiper'
284+
[//]: # '#### Table'
285+
[//]: # '#### Tag'
286+
[//]: # '#### TrendArrow'
287+
[//]: # '#### Video'
288+
[//]: # '#### VirtualList'
289+
[//]: # '#### WaterMark'
290+
[//]: # '### 特色组件'
291+
[//]: # '#### Address'
292+
[//]: # '#### Barrage'
293+
[//]: # '#### Card'
294+
[//]: # '#### Signature'
295+
[//]: # '#### TimeSelect'

src/sites/sites-react/doc/docs/react/migrate-from-v2.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,28 @@ plugins: [
270270
- 新增 `color`, 价格类型
271271

272272
[//]: # '#### Progress'
273-
[//]: # '#### Skeleton'
274-
[//]: # '#### Steps'
275-
[//]: # '#### Step'
276-
[//]: # '#### Swiper'
277-
[//]: # '#### Table'
278-
[//]: # '#### Tag'
279-
[//]: # '#### TrendArrow'
280-
[//]: # '#### Video'
281-
[//]: # '#### VirtualList'
282-
[//]: # '#### WaterMark'
283-
[//]: # '### 特色组件'
284-
[//]: # '#### Address'
285-
[//]: # '#### Barrage'
286-
[//]: # '#### Card'
287-
[//]: # '#### Signature'
288-
[//]: # '#### TimeSelect'
273+
274+
#### Skeleton
275+
276+
- 移除 `avatar` 属性,可通过 `width``height` 属性模拟
277+
- 移除 `avatarShape` 属性,可通过 `shape` 属性设置
278+
- 移除 `avatarSize` 属性
279+
- 新增 `width` 属性,控制宽度
280+
- 新增 `height` 属性,控制高度
281+
- 新增 `duration` 属性,控制动画时长
282+
- 新增 `size` 属性,通过 `size` 属性可选择使用组件内置的高度
283+
[//]: # '#### Steps'
284+
[//]: # '#### Step'
285+
[//]: # '#### Swiper'
286+
[//]: # '#### Table'
287+
[//]: # '#### Tag'
288+
[//]: # '#### TrendArrow'
289+
[//]: # '#### Video'
290+
[//]: # '#### VirtualList'
291+
[//]: # '#### WaterMark'
292+
[//]: # '### 特色组件'
293+
[//]: # '#### Address'
294+
[//]: # '#### Barrage'
295+
[//]: # '#### Card'
296+
[//]: # '#### Signature'
297+
[//]: # '#### TimeSelect'

src/sites/sites-react/doc/docs/taro/migrate-from-v2.en-US.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,28 @@ If your project uses these components, please read the documentation carefully a
268268
- Added a new color attribute for price types.
269269

270270
[//]: # '#### Progress'
271-
[//]: # '#### Skeleton'
272-
[//]: # '#### Steps'
273-
[//]: # '#### Step'
274-
[//]: # '#### Swiper'
275-
[//]: # '#### Table'
276-
[//]: # '#### Tag'
277-
[//]: # '#### TrendArrow'
278-
[//]: # '#### Video'
279-
[//]: # '#### VirtualList'
280-
[//]: # '#### WaterMark'
281-
[//]: # '### 特色组件'
282-
[//]: # '#### Address'
283-
[//]: # '#### Barrage'
284-
[//]: # '#### Card'
285-
[//]: # '#### Signature'
286-
[//]: # '#### TimeSelect'
271+
272+
#### Skeleton
273+
274+
- Removed `avatar` attribute, can be simulated using `width` and `height` attributes
275+
- Removed `avatarShape` attribute, can be set using the `shape` attribute
276+
- Removed `avatarSize` attribute
277+
- Added `width` attribute to control width
278+
- Added `height` attribute to control height
279+
- Added `duration` attribute to control animation duration
280+
- Added `size` attribute to select from built-in component heights
281+
[//]: # '#### Steps'
282+
[//]: # '#### Step'
283+
[//]: # '#### Swiper'
284+
[//]: # '#### Table'
285+
[//]: # '#### Tag'
286+
[//]: # '#### TrendArrow'
287+
[//]: # '#### Video'
288+
[//]: # '#### VirtualList'
289+
[//]: # '#### WaterMark'
290+
[//]: # '### 特色组件'
291+
[//]: # '#### Address'
292+
[//]: # '#### Barrage'
293+
[//]: # '#### Card'
294+
[//]: # '#### Signature'
295+
[//]: # '#### TimeSelect'

src/sites/sites-react/doc/docs/taro/migrate-from-v2.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,28 @@ plugins: [
273273
- 新增 `color`, 价格类型
274274

275275
[//]: # '#### Progress'
276-
[//]: # '#### Skeleton'
277-
[//]: # '#### Steps'
278-
[//]: # '#### Step'
279-
[//]: # '#### Swiper'
280-
[//]: # '#### Table'
281-
[//]: # '#### Tag'
282-
[//]: # '#### TrendArrow'
283-
[//]: # '#### Video'
284-
[//]: # '#### VirtualList'
285-
[//]: # '#### WaterMark'
286-
[//]: # '### 特色组件'
287-
[//]: # '#### Address'
288-
[//]: # '#### Barrage'
289-
[//]: # '#### Card'
290-
[//]: # '#### Signature'
291-
[//]: # '#### TimeSelect'
276+
277+
# '#### Skeleton'
278+
279+
- 移除 `avatar` 属性,可通过 `width``height` 属性模拟
280+
- 移除 `avatarShape` 属性,可通过 `shape` 属性设置
281+
- 移除 `avatarSize` 属性
282+
- 新增 `width` 属性,控制宽度
283+
- 新增 `height` 属性,控制高度
284+
- 新增 `duration` 属性,控制动画时长
285+
- 新增 `size` 属性,通过 `size` 属性可选择使用组件内置的高度
286+
[//]: # '#### Steps'
287+
[//]: # '#### Step'
288+
[//]: # '#### Swiper'
289+
[//]: # '#### Table'
290+
[//]: # '#### Tag'
291+
[//]: # '#### TrendArrow'
292+
[//]: # '#### Video'
293+
[//]: # '#### VirtualList'
294+
[//]: # '#### WaterMark'
295+
[//]: # '### 特色组件'
296+
[//]: # '#### Address'
297+
[//]: # '#### Barrage'
298+
[//]: # '#### Card'
299+
[//]: # '#### Signature'
300+
[//]: # '#### TimeSelect'

0 commit comments

Comments
 (0)