vue-drag-verify icon indicating copy to clipboard operation
vue-drag-verify copied to clipboard

How to reset

Open qwfysjh6 opened this issue 7 years ago • 5 comments

excuse me , How to reset

qwfysjh6 avatar Jan 23 '18 05:01 qwfysjh6

If the validation is not success, it will be reset automatically.

AshleyLv avatar Jan 23 '18 13:01 AshleyLv

成功如何回调触发事件?

ChrisChenSZ avatar Jan 25 '18 08:01 ChrisChenSZ

If the validation is successful But other validation did not pass On the premise of not refreshing the page How to reset it

qwfysjh6 avatar Jan 25 '18 14:01 qwfysjh6

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.

KennetSundien avatar Nov 30 '18 12:11 KennetSundien

@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;

Sorieee avatar Feb 26 '19 04:02 Sorieee