taro-skeleton icon indicating copy to clipboard operation
taro-skeleton copied to clipboard

taro3.5.5版本Skeleton loading设置true时报错

Open jch7013 opened this issue 3 years ago • 3 comments

taro3.5.5版本Skeleton loading设置true时报错 image

jch7013 avatar Nov 08 '22 06:11 jch7013

同问,一样的报错

lxzy-yun avatar Jun 25 '23 02:06 lxzy-yun

应该是源码里这个Blcok组件的问题,这里建议直接返回props.children就可以了

if (!props.loading) {
   return <Block>{props.children}</Block>
}

lxzy-yun avatar Jun 25 '23 02:06 lxzy-yun

应该是源码里这个Blcok组件的问题,这里建议直接返回props.children就可以了

if (!props.loading) {
   return <Block>{props.children}</Block>
}

好的,我看下

lentoo avatar Jun 25 '23 02:06 lentoo