diff --git a/zh-cn/react-native-fingerprint-scanner.md b/zh-cn/react-native-fingerprint-scanner.md new file mode 100644 index 0000000000000000000000000000000000000000..c29f9c9c3f711fa0f4f170e8f9934d0c9387240a --- /dev/null +++ b/zh-cn/react-native-fingerprint-scanner.md @@ -0,0 +1,251 @@ +> 模板版本:v0.2.1 + +

+

react-native-fingerprint-scanner

+

+

+ + Supported platforms + + + License + +

+ +> [!tip] [Github 地址](https://github.com/react-native-oh-library/react-native-fingerprint-scanner) + +## 安装与使用 + +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-fingerprint-scanner Releases](https://github.com/react-native-oh-library/react-native-fingerprint-scanner/releases),并下载适用版本的 tgz 包。 + +进入到工程目录并输入以下命令: + +> [!TIP] # 处替换为 tgz 包的路径 + + + +#### **npm** + +```bash +npm install @react-native-oh-tpl/react-native-fingerprint-scanner@file:# +``` + +#### **yarn** + +```bash +yarn add @react-native-oh-tpl/react-native-fingerprint-scanner@file:# +``` + + + +快速使用: + +> [!WARNING] 使用时 import 的库名不变。 + +```js +import { View, Button } from "react-native"; +import FingerprintScanner from 'react-native-fingerprint-scanner'; + +export default function App() { + const handleClick = () => { + FingerprintScanner + .isSensorAvailable() + .then((Biometrics) => { + }).catch((err) => { + }); + } + const handleScanner = () => { + FingerprintScanner.authenticate({title: '1111'}) + .then(() => { + }).catch((err) => { + }); + } + const handleAttempt = () => { + let eror = FingerprintScanner.onAttempt() + } + const handleRelease = () => { + FingerprintScanner.release() + } + return ( + +