【发布时间】:2020-03-02 20:40:55
【问题描述】:
【问题讨论】:
-
我查过了,但只有一个点。如果我想申请,我必须做超过 15 个 Views 标签。代码太多/
-
你已经尝试过
borderRadius : 1?
标签: javascript css reactjs react-native layout
【问题讨论】:
borderRadius : 1 ?
标签: javascript css reactjs react-native layout
首先,如果您想要更多样式,可以搜索第三个库。我找到了react-native-dash 库。你可以像下面这样使用:
<Dash dashGap={3} style={{width:1, height:100, flexDirection:'column',}}/>
那么,如果你想自己定义一个组件,你可以使用样式,并将其放入 纯成分
export const DotLine = (props) => {
return({
<View style={{
borderStyle: 'dotted',
height:200,
borderLeftWidth:5
}}/>
})
}
//then use it in other components
<Icon/><DotLine/><Icon/>
【讨论】: