-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
圆角边框问题 #1538
Comments
@devYoungyang 感谢您提出宝贵的 issue,我会通知开发尽快处理! |
您说的是这个问题吗? #1390 |
不是,你把我的代码放在一个demo执行一下,仔细看圆角周围会有细线 |
我在安卓手机测试,没看出来有黑色的线……你能贴个截图吗?这个问题在安卓、ios 都有吗? |
安卓没有,iOS设备才有 |
情景再现了没有? |
复现了,正在查找原因 |
@devYoungyang |
其他颜色是没有问题,原因能说清楚一点吗? |
@zanetti4 这个问题给出这个解释,就算解决了? |
我们查到更详细的解释,再告诉您。 |
大半个月过去了,没有回音吗 |
似乎这个问题是 RN 自己在 IOS 上面的问题。 我在 https://reactnative.dev/docs/getting-started 上面用示例代码一样复现了这个问题。 这边有一个临时的解决办法是在外层套上一层 View,在外层进行 border 的设定以避免此问题: <View style={{
borderColor: 'cyan',
borderRadius: 10,
borderWidth: 4,
overflow: 'hidden',
marginTop: 16,
}}>
<View style={{
width: 200,
height: 200,
backgroundColor: 'red',
}}/>
</View> ** PS:如果有大量的此布局可能会导致性能问题。 ** 附上运行在 https://reactnative.dev/docs/getting-started 的示例代码: <View style={{
alignItems: "center",
justifyContent: 'center',
backgroundColor: 'white',
flex: 1,
}}>
<View style={{
width: 200,
height: 200,
borderColor: 'cyan',
backgroundColor: 'red',
borderRadius: 10,
borderWidth: 4,
}}/>
<View style={{
borderColor: 'cyan',
borderRadius: 10,
borderWidth: 4,
overflow: 'hidden',
marginTop: 16,
}}>
<View style={{
width: 200,
height: 200,
backgroundColor: 'red',
}}/>
</View>
</View> 在原生 Expo Go IOS 客户端运行的截图: |
是否为新品(必填)
新品
用户ID(必填)
1434926611
企业名称(必填)
飞彗
环境(必填)
现象(必填)
<View style={{ height: 400, alignItems: "center", justifyContent: 'center' }}> <View style={{ width: 200, height: 200, borderColor: 'cyan', backgroundColor: 'red', borderRadius: 10, borderWidth: 2.5 }} /> </View>
如上给一个组件设置圆角边框,在圆角周围会有一条黑色的线
期望(必填)
给出原因,解决上述问题,
不要贴大段代码❗️
The text was updated successfully, but these errors were encountered: