ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3.09k stars 611 forks source link

SegmentedControl 自定义样式后显示问题 #474

Closed M45ter closed 5 years ago

M45ter commented 5 years ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

SegmentedControl 设置高度后,圆角部分异常,内外圆角有空隙,自定义segment的borderWidth后,上下边框也有异常

What is expected?

高度、边框with等可自定义

What is actually happening?

自定义后显示异常 QQ截图20190430132210 截图是手机上的

Environment Info
antd 3.1.5
React 0.59.4
System android
Browser 8.1

代码连接里有,web版的自定义稍有不同,好像不会合并默认antd的style

BANG88 commented 5 years ago

Android ?

M45ter commented 5 years ago

Android ?

是的,ios没有测试,不过看源码ios是用的ios自带组件

BANG88 commented 5 years ago

试试

styles={{
            segment: {
              borderWidth: 1,
              borderColor: "#108ee9",
              borderRadius: 5
            },
            itemLeftRadius: {
              borderTopLeftRadius: 0,
              borderBottomLeftRadius: 0,
            },
            itemRightRadius: {
              borderTopRightRadius: 0,
              borderBottomRightRadius: 0,
            },
          }}
        />