@pekings/verification-code
v0.0.4
Published
Verification Code Library
Downloads
7
Readme
verification code library
Install
Using npm
to install
npm install @pekings/verification-code --save
Using yarn
to install
yarn add @pekings/verification-code
Quickstart
// 引入lib
import VerificationCode from "@pekings/verification-code";
<canvas width="200" height="100" id="v-code"></canvas>;
const vCode = new VerificationCode(
document.getElementById("v-code"),
(code) => {
// 接收每次生成的随机验证码
console.log(code);
}
);
// 开启渲染
vCode.draw();