You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@johnnyguan/vue-captcha-code

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@johnnyguan/vue-captcha-code

vue captcha code

0.1.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

vue-captcha-code

Project setup

npm i @johnnyguan/vue-captcha-code

Description

This project is aimed to show captcha code (length: 4) by canvas. The captcha code can either be passed as a variable or be generated by default.

Usage

main.js

import Vue from 'vue'
import App from './App.vue'
import VueCaptchaCode from '@johnnyguan/vue-captcha-code'
Vue.use(VueCaptchaCode)
Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')

XXX.vue

<captcha-code ref="code"></captcha-code>

Configuration

属性名描述值类型默认值
heightcanvas高度Number80
widthcanvas宽度Number40
captchacaptcha codeString(4)不传则内部生成
enableClick是否点击canvas更新captchaBooleanfalse
fontSize字体大小String'20'
fontWeight字体粗细String'normal' 可选'bold','bolder', '100'等
fontFace字体类型String'serif'
fontStyle字体样式String'normal' 可选'italic','oblique'
textFillColor字体颜色String'#ff0000'

Method

this.$refs.code.getCode()

Keywords

vue

FAQs

Package last updated on 25 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.