We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example
<gocaptcha-click v-if="captcha.type == 'ClickBasic' || captcha.type == 'ClickShape'" :data="captcha.data" :events="captchaEvents[captcha.type]" /> <gocaptcha-slide v-if="captcha.type == 'SlideBasic'" :data="captcha.data" :events="captchaEvents[captcha.type]" /> <gocaptcha-slide-region v-if="captcha.type == 'SlideRegion'" :data="captcha.data" :events="captchaEvents[captcha.type]" /> <gocaptcha-rotate v-if="captcha.type == 'RotateBasic'" :data="captcha.data" :events="captchaEvents[captcha.type]" /> import { captchaEvents } from 'captcha.js' data() { captchaEvents, captcha: { type: 'ClickBasic', data: { image: "data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQ" thumb: "data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQ" } } }
captcha.js
export const captchaEvents = { ClickBasic: { click(x, y) { console.log("click >>>>>>>", x, y) }, confirm(dots, clear) { console.log("dots >>>>>>>", dots) setTimeout(() => { clear() }, 100) }, refresh() { console.log("refresh >>>>>>>") // clickData.image = clickImage2 }, close() { console.log("close >>>>>>>") }, }, ClickShape: { click(x, y) { console.log("click >>>>>>>", x, y) }, confirm(dots, clear) { console.log("dots >>>>>>>", dots) setTimeout(() => { clear() }, 100) }, refresh() { console.log("refresh >>>>>>>") // clickData.image = clickImage2 }, close() { console.log("close >>>>>>>") }, }, SlideBasic: { move(x, y) { console.log("move >>>>>>>", x, y) }, refresh() { console.log("refresh >>>>>>>") // slideData.thumbX = 40 // slideData.thumbY = 60 // slideData.image = clickImage2 }, close() { console.log("close >>>>>>>") } }, SlideRegion: { move(x, y) { console.log("move >>>>>>>", x, y) }, refresh() { console.log("refresh >>>>>>>") // slideRegionData.thumbX = 40 // slideRegionData.thumbY = 60 // slideRegionData.image = clickImage2 }, close() { console.log("close >>>>>>>") } }, RotateBasic: { rotate(angle) { console.log("rotate >>>>>>>", angle) }, refresh() { console.log("refresh >>>>>>>") // rotateData.image = clickImage2 }, close() { console.log("close >>>>>>>") } } }
为什么总是报错 [Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'clickEvent')"
[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'clickEvent')"
The text was updated successfully, but these errors were encountered:
哈喽,看着是 beta 版本的 gocaptcha-button 的 clickEvent 事件没传递问题,正式版已发布了,你使用正式版本就好
Sorry, something went wrong.
No branches or pull requests
为什么总是报错
[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'clickEvent')"
The text was updated successfully, but these errors were encountered: