javascript - 在本机反应中绘制垂直虚线
解决方案
首先,如果您想要更多样式,可以搜索第三个库。我找到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/>
推荐阅读
- c++ - C++ Linux basic_string::_M_construct null 在运行时无效错误
- python - 如何安排电报机器人发送消息?
- vba - 查找并删除电子邮件第一行中的特定句子
- c# - 在圆形形成中生成的对象的移位旋转 - Unity C#
- sql - DB2 SQL 查找第一个和最后一个招聘日期与 deptno 10 相同的部门编号并计算年份
- mysql - SQL中基于datediff和curdate函数计算列值
- python - 适用于 AWS EC2 多账户的 Powershell 脚本
- javascript - 文本未出现在 SVG 上
- python - 使用多个变量/输入查询数据框列
- angular - 每个 Mat 表数据源