@tuya-oh/react-native-dash
Version:
A <Dash /> component for react-native to draw dashed or dotted lines
81 lines (55 loc) • 2.69 kB
Markdown
> 模板版本:v0.2.2
<p align="center">
<h1 align="center"> <code>react-native-dash</code> </h1>
</p>
<p align="center">
<a href="https://gitee.com/rn-mi/ty-react-native-dash">
<img src="https://img.shields.io/badge/platforms-android%20|%20ios%20|%20harmony%20-lightgrey.svg" alt="Supported platforms" />
</a>
<a href="https://gitee.com/rn-mi/ty-react-native-dash/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License" />
</a>
</p>
> [!TIP] [Gitee 地址](https://gitee.com/rn-mi/ty-react-native-dash)
## 安装与使用
<!-- tabs:start -->
#### **npm**
```bash
npm install @tuya-oh/react-native-dash@file:#
```
#### **yarn**
```bash
yarn add @tuya-oh/react-native-dash@file:#
```
<!-- tabs:end -->
快速使用:
```js
import React, { Component } from "react";
import { AppRegistry, StyleSheet, Text, View } from "react-native";
import Dash from 'react-native-dash';
export default function App() {
return (
return <Dash style={{width:100, height:1}} />
)
}
```
## 约束与限制
### 兼容性
在以下版本验证通过
1. RNOH:0.72.50; SDK:HarmonyOS 5.0.1.115; IDE:DevEco Studio 5.0.7.200; ROM:5.0.0.135;
## 属性
> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
#### Props
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| :------------ | ---------------------- | :--------------------: | :------: | -------- | ----------------- |
| style | Dash container style | `View.PropTypes.Style` | No | All | YES |
| dashGap | Gap between two dashes | `number` | No | All | YES |
| dashLength | Length of each dash | `number` | No | All | YES |
| dashThickness | Thickness of each dash | `number` | No | All | YES |
| dashColor | Color of each dash | `string` | No | All | YES |
| dashStyle | Dashes style | `View.PropTypes.Style` | No | All | YES |
### 遗留问题
### 其他
### 开源协议
本项目基于 [The MIT License (MIT)](https://gitee.com/rn-mi/ty-react-native-dash/blob/master/LICENSE) ,请自由地享受和参与开源。