From ce24da25e300618a65a2e78fa1448964fdb38f5c Mon Sep 17 00:00:00 2001 From: xlleng1 Date: Tue, 30 Jan 2024 10:33:07 +0800 Subject: [PATCH] =?UTF-8?q?[Issues:=20#I8Z67Q]=20=E6=B7=BB=E5=8A=A0jeanreg?= =?UTF-8?q?isser-react-native-slider=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1224/jeanregisser-react-native-slider.md | 176 +++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 1224/jeanregisser-react-native-slider.md diff --git a/1224/jeanregisser-react-native-slider.md b/1224/jeanregisser-react-native-slider.md new file mode 100644 index 00000000..d6068ae5 --- /dev/null +++ b/1224/jeanregisser-react-native-slider.md @@ -0,0 +1,176 @@ +> 模板版本:v0.1.2 + +

+

jeanregisser-react-native-slider

+

+

+ + License + +

+ + +> [!tip] [Github 地址](https://github.com/react-native-oh-library/jeanregisser-react-native-slider/tree/sig) + +## 安装与使用 + +进入到工程目录并输入以下命令: + + + +#### **yarn** + +```bash +yarn add @react-native-oh-tpl/react-native-slider +``` + +#### **npm** +```bash +npm i --save @react-native-oh-tpl/react-native-slider +``` + + +下面的代码展示了这个库的基本使用场景: + +```js +import React, { useState} from 'react'; +import {Button, View, StyleSheet, Text } from 'react-native'; +import Slider from 'react-native-slider'; + + +export function SliderExample() { + const [isCheckerboardVisible, setIsCheckerboardVisible] = useState(false); + const [value, setValue] = useState(0.200); + return ( + + default style + + + with min,max and custom tints + + + with style,thumbStyle,thumbStyle + + + with thumbTouchSize,event + { + console.log('===Slider onValueChange: ' + value); + }} + + onSlidingStart={() => { + console.log('===Slider onSlidingStart'); + }} + + onSlidingComplete={() => { + console.log('===Slider onSlidingComplete'); + }} + /> + + with thumbImage + + + with animateTransitions + + +