React Native NativeWind View with padding left

7gs2gvoe  于 6个月前  发布在  React
关注(0)|答案(1)|浏览(60)

我有一个奇怪的填充左边当使用View在其他View
我使用nativewind2.0.11

<View className="flex-col items-center justify-center flex-grow gap-2 bg-blue-400">
    <View className="flex-row justify-between w-1/2 gap-2 bg-red-400 ">
        <Text>+</Text>
        <Text>4</Text>
        <Text>-</Text>
    </View>
</View>

字符串
这给予我:


的数据
你可以看到,在“+"之前,我得到了一个左填充

xpcnnkqh

xpcnnkqh1#

问题发生在v2
试试这个

<View className="flex-col items-center justify-center flex-grow bg-blue-400" style={{ gap: 8 }}>
    <View className="flex-row justify-between w-1/2 bg-red-400 " style={{ gap: 8 }}>
        <Text>+</Text>
        <Text>4</Text>
        <Text>-</Text>
    </View>
</View>

字符串
https://github.com/marklawlor/nativewind/issues/622

相关问题