Socket
Socket
Sign inDemoInstall

@johnnyguan/vue-captcha-code

Package Overview
Dependencies
17
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @johnnyguan/vue-captcha-code

vue captcha code


Version published
Weekly downloads
26
decreased by-63.89%
Maintainers
1
Install size
25.1 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 25 Mar 2020

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc