randomcodebycanvas
v1.0.2
Published
canvas 实现随机码
Downloads
6
Readme
Install
npm install randomcodebycanvas 或 yarn add randomcodebycanvas
Usage
<template>
<canvas id="random-code">浏览器不支持canvas</canvas>
</template>
import randomcodebycanvas from 'randomcodebycanvas'
randomcodebycanvas.init('#random-code',{w:150,h:40}, code => {
console.log(code) // random code 支持点击刷新
// canvas的默认宽度为150 高度40
})