yimijianfang / vue-drag-verify Goto Github PK
View Code? Open in Web Editor NEWvue滑块验证组件,图片验证组件,图片旋转验证组件,滑动验证
Home Page: https://yimijianfang.github.io/vue-drag-verify/#/
vue滑块验证组件,图片验证组件,图片旋转验证组件,滑动验证
Home Page: https://yimijianfang.github.io/vue-drag-verify/#/
快速滑动会出现,滑块未到显示验证成功
https://i.postimg.cc/qvM1NjJW/checker.jpg
Is there any way to use SVG for handlerIcon, successIcon or refreshIcon. Because when i use tailwind css it is easier to use pure SVG.
自己用的时候发现 : 移动滑块时 脱离滑块区域就会重置. 这样导致我小心翼翼的拖动滑块才能验证通过,客户反馈体验感很不好
所以绑定在dom上的mousemove mouseup去掉换成了
document.getElementsByTagName('html')[0].addEventListener('mousemove', this.dragMoving)
document.getElementsByTagName('html')[0] .addEventListener('mouseup', this.dragFinish)
验证不通过的黄色文字提示,能否提供参数修改颜色?
我在使用你的组件的时候可能碰到了一个组件冲突。
冲突组件:vuelidate(表单验证组件 )组件地址
本地组件名:drag-verify-img
在调用drag-verify-img中的reset方法时,vuelidate组件出现了this.$options为undefined错误,本地组件出问题的代码在
reImg: function() { this.$emit("update:isPassing", false); const oriData = this.$options.data(); for (const key in oriData) { if (oriData.hasOwnProperty(key)) { this.$set(this, key, oriData[key]); } } var handler = this.$refs.handler; var message = this.$refs.message; handler.style.left = "0"; this.$refs.progressBar.style.width = "0"; handler.children[0].className = this.handlerIcon; message.style["-webkit-text-fill-color"] = "transparent"; message.style.animation = "slidetounlock 3s infinite"; message.style.color = this.background; this.$refs.moveBar.style.left = "0px"; },
中,我分析后怀疑是for循环这一段
const oriData = this.$options.data(); for (const key in oriData) { if (oriData.hasOwnProperty(key)) { this.$set(this, key, oriData[key]); } }
出了问题,我现在强制修改了vuelidate的内容暂时是解决了问题。如果有兴趣可以试着修复一下问题,稍后我有时间会写一个可以复现这个问题的demo给你
不管是否import引入包,都报错,有使用的例子嘛?
it is a very nice plug-in
I made an src in the static folder and an img subfolder and I uploaded some pictures but it does not work. Could you please explain more about :imgsrc="img" in dragVerifyImgChip.
Dear
I got this error
main.vue?51a8:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')
I did not understand your meaning of
[v-slot] <template #slot>
Is that for vue-drag-verify-img-chip
Could you please make a component example with all function for vue 3
thx
vue-drag-verify-img-chip 成功后出现这个问题
<el-dialog title="" :visible.sync="dialogVisible" width="400px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" custom-class="vueDragVerifyImgChipBox" > <VueDragVerifyImgChip v-if="dialogVisible" ref="vueDragVerifyImgChipRef" :imgsrc="localUrl" :isPassing.sync="isPassing" :showRefresh="true" :barWidth="40" :width="360" text="请按住滑块拖动" successText="验证通过" handlerIcon="el-icon-d-arrow-right" successIcon="el-icon-circle-check" @passcallback="passcallback" > </VueDragVerifyImgChip> </el-dialog>
报错index.js?157d:1 Uncaught TypeError: Cannot read properties of undefined (reading 'style') at eval (index.js?157d:1:1)
请问是否可以新增验证失败事件?
滑块可以滑出图片区域
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.