Skip to content

Commit 3eb1986

Browse files
committed
update
1 parent d13e2c3 commit 3eb1986

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import Vcode from "vue-puzzle-vcode";
3030
<Vcode
3131
:show="isShow"
3232
@onSuccess="onSuccess"
33+
@onClose="onClose"
3334
/>
3435
<button @click="onSubmit">登录</button>
3536
</template>
@@ -45,9 +46,13 @@ import Vcode from "vue-puzzle-vcode";
4546
onSubmit(){
4647
this.isShow = true;
4748
},
49+
// 用户通过了验证, msg是用户移动拼图的位置和目标位置的偏差px值
4850
onSuccess(msg){
49-
// 用户通过了验证, msg是用户移动拼图的位置和目标位置的偏差px值
5051
this.isShow = false; // 通过验证后,需要自行隐藏模态框
52+
},
53+
// 用户点击遮罩层,应该关闭模态框
54+
onClose(){
55+
this.isShow = false;
5156
}
5257
}
5358
}
@@ -95,6 +100,9 @@ export default {
95100
}
96101
</script>
97102
```
103+
* 也可以是网络图片完整URL路径,但注意图片跨域问题
104+
105+
98106
### 说明
99107

100108
* 当不传递imgs字段或图片加载出错时,会自动生成随机图片

0 commit comments

Comments
 (0)