11import { Avatar , Cell , Skeleton , Switch } from '@nutui/nutui-react-taro'
22import React , { useState } from 'react'
33import { View , Text } from '@tarojs/components'
4+ import pxTransform from '@/utils/px-transform'
45
56const Demo5 = ( ) => {
67 const [ checked , setChecked ] = useState ( false )
@@ -13,30 +14,37 @@ const Demo5 = () => {
1314 < Cell >
1415 < Switch
1516 onChange = { ( value , event ) => changeStatus ( value ) }
16- style = { { marginBottom : 8 } }
17+ style = { { marginBottom : pxTransform ( 8 ) } }
1718 />
1819 </ Cell >
1920 < Cell >
2021 < View style = { { width : '100%' } } >
2122 < View style = { { display : 'flex' } } >
22- < Skeleton visible = { checked } width = { 50 } height = { 50 } shape = "circle" >
23+ < Skeleton
24+ visible = { checked }
25+ width = { pxTransform ( 50 ) }
26+ height = { pxTransform ( 50 ) }
27+ shape = "circle"
28+ >
2329 < Avatar
2430 className = "nut-skeleton-content-avatar"
2531 size = "50"
2632 src = "https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png"
2733 />
2834 </ Skeleton >
29- < View style = { { flex : 1 , marginLeft : 8 } } >
35+ < View style = { { flex : 1 , marginLeft : pxTransform ( 8 ) } } >
3036 < Skeleton
3137 visible = { checked }
3238 size = "large"
3339 width = "30%"
34- style = { { marginBottom : 8 } }
40+ style = { { marginBottom : pxTransform ( 8 ) } }
3541 >
36- < span > NutUI-React</ span >
42+ < View style = { { lineHeight : 1 , height : pxTransform ( 16 ) } } >
43+ NutUI-React
44+ </ View >
3745 </ Skeleton >
3846 < Skeleton visible = { checked } size = "small" rows = { 2 } >
39- < Text >
47+ < Text style = { { wordBreak : 'break-all' } } >
4048 一套京东风格的轻量级移动端React组件库,提供丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。
4149 </ Text >
4250 </ Skeleton >
0 commit comments