vue-drag-verify
vue-drag-verify copied to clipboard
How to reset
excuse me , How to reset
If the validation is not success, it will be reset automatically.
成功如何回调触发事件?
If the validation is successful But other validation did not pass On the premise of not refreshing the page How to reset it
If the validation is successful But other validation did not pass On the premise of not refreshing the page How to reset it
You can get the component to reset by adding a v-if="someComputedCondition" and then making sure that the condition is false and then true.
This is because v-if, when false removes the component from the dom and when true it adds it again. A sideeffect of this is reinitialization of the dragverify component.
I hope this helps.
@qwfysjh6
No reset Api provided.
But you can read code, and write a reset code for yourself.
Just like
this.$refs.verify.$refs.progressBar.style.background = '#ffff99'; this.$refs.verify.$refs.message.style.color = '#111'; this.$refs.verify.isPassing = false; var handler = this.$refs.verify.$refs.handler; handler.children[0].className ='fa fa-angle-double-right' this.$refs.verify.$refs.progressBar.style.width = '0px'; handler.style.left = '0px'; this.$refs.verify.x = 0; this.isSuccess = false;