@km.js/react-aliyun-human-verify
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

react-aliyun-human-verify

阿里云机器人验证组件

参数和 API

docs/package-public.d.ts

相关

示例

import { AliyunHumanVerify } from '@km.js/react-aliyun-human-verify';

class MyComp extends React.Component {
	render() {
		return (
			<div>
				<AliyunHumanVerify
					appkey="XXXXXXXXX0000000000"
					scene="ic_login"
					onSuccess={() => this.onSuccess()}
					onLoaded={(ref) => (this.cc = ref)}
					onFailed={() => this.onFailed()}
				/>
				<button onClick={this.cc.reset()}>RESET</button>
			</div>
		);
	}

	onSuccess(data) {
		// do anything you want
	}

	onFailed() {
		alert('江南皮革厂倒闭了!');
	}
}

Readme

Keywords

none

Package Sidebar

Install

npm i @km.js/react-aliyun-human-verify

Weekly Downloads

7

Version

0.0.5

License

MIT

Unpacked Size

50.7 kB

Total Files

27

Last publish

Collaborators

  • gongt