- {animated &&
}
-
- {avatar && (
-
- )}
- {rows === 1 ? (
-
- ) : (
-
- {title &&
}
- {repeatLines(rows).map((item, index) => {
- return (
-
- )
- })}
+ {repeatCount(rows).map((item, index) => {
+ const contentClass = `${classPrefix}-content ${classPrefix}-content-${size} ${classPrefix}-content-${size}-${index}`
+ return (
+
- )}
-
+ )
+ })}
)}
>
diff --git a/src/sites/sites-react/doc/docs/react/migrate-from-v2.en-US.md b/src/sites/sites-react/doc/docs/react/migrate-from-v2.en-US.md
index 570aa4230b..5b524d3cb6 100644
--- a/src/sites/sites-react/doc/docs/react/migrate-from-v2.en-US.md
+++ b/src/sites/sites-react/doc/docs/react/migrate-from-v2.en-US.md
@@ -268,19 +268,28 @@ If your project uses these components, please read the documentation carefully a
- Added a new color attribute for price types.
[//]: # '#### Progress'
-[//]: # '#### Skeleton'
-[//]: # '#### Steps'
-[//]: # '#### Step'
-[//]: # '#### Swiper'
-[//]: # '#### Table'
-[//]: # '#### Tag'
-[//]: # '#### TrendArrow'
-[//]: # '#### Video'
-[//]: # '#### VirtualList'
-[//]: # '#### WaterMark'
-[//]: # '### 特色组件'
-[//]: # '#### Address'
-[//]: # '#### Barrage'
-[//]: # '#### Card'
-[//]: # '#### Signature'
-[//]: # '#### TimeSelect'
+
+#### Skeleton
+
+- Removed `avatar` attribute, can be simulated using `width` and `height` attributes
+- Removed `avatarShape` attribute, can be set using the `shape` attribute
+- Removed `avatarSize` attribute
+- Added `width` attribute to control width
+- Added `height` attribute to control height
+- Added `duration` attribute to control animation duration
+- Added `size` attribute to select from built-in component heights
+ [//]: # '#### Steps'
+ [//]: # '#### Step'
+ [//]: # '#### Swiper'
+ [//]: # '#### Table'
+ [//]: # '#### Tag'
+ [//]: # '#### TrendArrow'
+ [//]: # '#### Video'
+ [//]: # '#### VirtualList'
+ [//]: # '#### WaterMark'
+ [//]: # '### 特色组件'
+ [//]: # '#### Address'
+ [//]: # '#### Barrage'
+ [//]: # '#### Card'
+ [//]: # '#### Signature'
+ [//]: # '#### TimeSelect'
diff --git a/src/sites/sites-react/doc/docs/react/migrate-from-v2.md b/src/sites/sites-react/doc/docs/react/migrate-from-v2.md
index a9cdf02f2f..49db0e6bef 100644
--- a/src/sites/sites-react/doc/docs/react/migrate-from-v2.md
+++ b/src/sites/sites-react/doc/docs/react/migrate-from-v2.md
@@ -270,19 +270,28 @@ plugins: [
- 新增 `color`, 价格类型
[//]: # '#### Progress'
-[//]: # '#### Skeleton'
-[//]: # '#### Steps'
-[//]: # '#### Step'
-[//]: # '#### Swiper'
-[//]: # '#### Table'
-[//]: # '#### Tag'
-[//]: # '#### TrendArrow'
-[//]: # '#### Video'
-[//]: # '#### VirtualList'
-[//]: # '#### WaterMark'
-[//]: # '### 特色组件'
-[//]: # '#### Address'
-[//]: # '#### Barrage'
-[//]: # '#### Card'
-[//]: # '#### Signature'
-[//]: # '#### TimeSelect'
+
+#### Skeleton
+
+- 移除 `avatar` 属性,可通过 `width` 和 `height` 属性模拟
+- 移除 `avatarShape` 属性,可通过 `shape` 属性设置
+- 移除 `avatarSize` 属性
+- 新增 `width` 属性,控制宽度
+- 新增 `height` 属性,控制高度
+- 新增 `duration` 属性,控制动画时长
+- 新增 `size` 属性,通过 `size` 属性可选择使用组件内置的高度
+ [//]: # '#### Steps'
+ [//]: # '#### Step'
+ [//]: # '#### Swiper'
+ [//]: # '#### Table'
+ [//]: # '#### Tag'
+ [//]: # '#### TrendArrow'
+ [//]: # '#### Video'
+ [//]: # '#### VirtualList'
+ [//]: # '#### WaterMark'
+ [//]: # '### 特色组件'
+ [//]: # '#### Address'
+ [//]: # '#### Barrage'
+ [//]: # '#### Card'
+ [//]: # '#### Signature'
+ [//]: # '#### TimeSelect'
diff --git a/src/sites/sites-react/doc/docs/taro/migrate-from-v2.en-US.md b/src/sites/sites-react/doc/docs/taro/migrate-from-v2.en-US.md
index 570aa4230b..5b524d3cb6 100644
--- a/src/sites/sites-react/doc/docs/taro/migrate-from-v2.en-US.md
+++ b/src/sites/sites-react/doc/docs/taro/migrate-from-v2.en-US.md
@@ -268,19 +268,28 @@ If your project uses these components, please read the documentation carefully a
- Added a new color attribute for price types.
[//]: # '#### Progress'
-[//]: # '#### Skeleton'
-[//]: # '#### Steps'
-[//]: # '#### Step'
-[//]: # '#### Swiper'
-[//]: # '#### Table'
-[//]: # '#### Tag'
-[//]: # '#### TrendArrow'
-[//]: # '#### Video'
-[//]: # '#### VirtualList'
-[//]: # '#### WaterMark'
-[//]: # '### 特色组件'
-[//]: # '#### Address'
-[//]: # '#### Barrage'
-[//]: # '#### Card'
-[//]: # '#### Signature'
-[//]: # '#### TimeSelect'
+
+#### Skeleton
+
+- Removed `avatar` attribute, can be simulated using `width` and `height` attributes
+- Removed `avatarShape` attribute, can be set using the `shape` attribute
+- Removed `avatarSize` attribute
+- Added `width` attribute to control width
+- Added `height` attribute to control height
+- Added `duration` attribute to control animation duration
+- Added `size` attribute to select from built-in component heights
+ [//]: # '#### Steps'
+ [//]: # '#### Step'
+ [//]: # '#### Swiper'
+ [//]: # '#### Table'
+ [//]: # '#### Tag'
+ [//]: # '#### TrendArrow'
+ [//]: # '#### Video'
+ [//]: # '#### VirtualList'
+ [//]: # '#### WaterMark'
+ [//]: # '### 特色组件'
+ [//]: # '#### Address'
+ [//]: # '#### Barrage'
+ [//]: # '#### Card'
+ [//]: # '#### Signature'
+ [//]: # '#### TimeSelect'
diff --git a/src/sites/sites-react/doc/docs/taro/migrate-from-v2.md b/src/sites/sites-react/doc/docs/taro/migrate-from-v2.md
index 4d673d5814..22d0fed005 100644
--- a/src/sites/sites-react/doc/docs/taro/migrate-from-v2.md
+++ b/src/sites/sites-react/doc/docs/taro/migrate-from-v2.md
@@ -273,19 +273,28 @@ plugins: [
- 新增 `color`, 价格类型
[//]: # '#### Progress'
-[//]: # '#### Skeleton'
-[//]: # '#### Steps'
-[//]: # '#### Step'
-[//]: # '#### Swiper'
-[//]: # '#### Table'
-[//]: # '#### Tag'
-[//]: # '#### TrendArrow'
-[//]: # '#### Video'
-[//]: # '#### VirtualList'
-[//]: # '#### WaterMark'
-[//]: # '### 特色组件'
-[//]: # '#### Address'
-[//]: # '#### Barrage'
-[//]: # '#### Card'
-[//]: # '#### Signature'
-[//]: # '#### TimeSelect'
+
+# '#### Skeleton'
+
+- 移除 `avatar` 属性,可通过 `width` 和 `height` 属性模拟
+- 移除 `avatarShape` 属性,可通过 `shape` 属性设置
+- 移除 `avatarSize` 属性
+- 新增 `width` 属性,控制宽度
+- 新增 `height` 属性,控制高度
+- 新增 `duration` 属性,控制动画时长
+- 新增 `size` 属性,通过 `size` 属性可选择使用组件内置的高度
+ [//]: # '#### Steps'
+ [//]: # '#### Step'
+ [//]: # '#### Swiper'
+ [//]: # '#### Table'
+ [//]: # '#### Tag'
+ [//]: # '#### TrendArrow'
+ [//]: # '#### Video'
+ [//]: # '#### VirtualList'
+ [//]: # '#### WaterMark'
+ [//]: # '### 特色组件'
+ [//]: # '#### Address'
+ [//]: # '#### Barrage'
+ [//]: # '#### Card'
+ [//]: # '#### Signature'
+ [//]: # '#### TimeSelect'
diff --git a/src/styles/variables-jmapp.scss b/src/styles/variables-jmapp.scss
index 1a2c5ac9fb..12b4a8dfc0 100644
--- a/src/styles/variables-jmapp.scss
+++ b/src/styles/variables-jmapp.scss
@@ -2086,7 +2086,18 @@ $skeleton-background: var(
$color-background
) !default;
$skeleton-line-width: var(--nutui-skeleton-line-width, 100%) !default;
-$skeleton-line-height: var(--nutui-skeleton-line-height, 15px) !default;
+$skeleton-line-small-height: var(
+ --nutui-skeleton-line-small-height,
+ 16px
+) !default;
+$skeleton-line-normal-height: var(
+ --nutui-skeleton-line-normal-height,
+ 24px
+) !default;
+$skeleton-line-large-height: var(
+ --nutui-skeleton-line-large-height,
+ 32px
+) !default;
$skeleton-line-border-radius: var(
--nutui-skeleton-line-border-radius,
0
diff --git a/src/styles/variables-jrkf.scss b/src/styles/variables-jrkf.scss
index 41eb24a9b1..14be5ee0ef 100644
--- a/src/styles/variables-jrkf.scss
+++ b/src/styles/variables-jrkf.scss
@@ -2116,7 +2116,18 @@ $skeleton-background: var(
$color-background
) !default;
$skeleton-line-width: var(--nutui-skeleton-line-width, 100%) !default;
-$skeleton-line-height: var(--nutui-skeleton-line-height, 15px) !default;
+$skeleton-line-small-height: var(
+ --nutui-skeleton-line-small-height,
+ 16px
+) !default;
+$skeleton-line-normal-height: var(
+ --nutui-skeleton-line-normal-height,
+ 24px
+) !default;
+$skeleton-line-large-height: var(
+ --nutui-skeleton-line-large-height,
+ 32px
+) !default;
$skeleton-line-border-radius: var(
--nutui-skeleton-line-border-radius,
0
diff --git a/src/styles/variables.scss b/src/styles/variables.scss
index 5f3b964fca..fdd13d5e1b 100644
--- a/src/styles/variables.scss
+++ b/src/styles/variables.scss
@@ -2132,13 +2132,24 @@ $form-item-tip-text-align: var(--nutui-form-item-tip-text-align, left) !default;
// skeleton(✅)
$skeleton-background: var(
--nutui-skeleton-background,
- $color-background
+ $color-background-sunken
) !default;
$skeleton-line-width: var(--nutui-skeleton-line-width, 100%) !default;
-$skeleton-line-height: var(--nutui-skeleton-line-height, 15px) !default;
+$skeleton-line-small-height: var(
+ --nutui-skeleton-line-small-height,
+ 16px
+) !default;
+$skeleton-line-normal-height: var(
+ --nutui-skeleton-line-normal-height,
+ 24px
+) !default;
+$skeleton-line-large-height: var(
+ --nutui-skeleton-line-large-height,
+ 32px
+) !default;
$skeleton-line-border-radius: var(
--nutui-skeleton-line-border-radius,
- 0
+ $radius-xs
) !default;
// card(✅)
diff --git a/src/types/spec/skeleton/base.ts b/src/types/spec/skeleton/base.ts
index e18df472f7..5df3db68fe 100644
--- a/src/types/spec/skeleton/base.ts
+++ b/src/types/spec/skeleton/base.ts
@@ -1,12 +1,14 @@
import { BaseProps } from '../../base/props'
+import { SimpleValue, UIRound, UISize } from '../../base/atoms'
export type avatarShape = 'round' | 'square'
export interface BaseSkeleton extends BaseProps {
- animated: boolean
rows: number
- title: boolean
- avatar: boolean
- avatarSize: string
+ size: Extract
+ width?: SimpleValue
+ height?: SimpleValue
+ shape: UIRound | 'circle'
+ animated: boolean
+ duration: number
visible: boolean
- avatarShape: avatarShape
}