
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@johnnyguan/vue-captcha-code
Advanced tools
npm i @johnnyguan/vue-captcha-code
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.
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>
属性名 | 描述 | 值类型 | 默认值 |
---|---|---|---|
height | canvas高度 | Number | 80 |
width | canvas宽度 | Number | 40 |
captcha | captcha code | String(4) | 不传则内部生成 |
enableClick | 是否点击canvas更新captcha | Boolean | false |
fontSize | 字体大小 | String | '20' |
fontWeight | 字体粗细 | String | 'normal' 可选'bold','bolder', '100'等 |
fontFace | 字体类型 | String | 'serif' |
fontStyle | 字体样式 | String | 'normal' 可选'italic','oblique' |
textFillColor | 字体颜色 | String | '#ff0000' |
this.$refs.code.getCode()
FAQs
vue captcha code
We found that @johnnyguan/vue-captcha-code demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.