EEUI.APP
首页
文档
- 指南
- 组件
- 模块
插件
- 插件市场
- 开发文档
热更新
控制台
Editor
例子
社区
需要加载的模块
## # eeui.swipeCaptcha
const eeui = app.requireModule('eeui');
### # 预览效果显示滑动验证码弹窗
### # 示例代码
/*@param imgUrl 自定义显示的图片@param callback 回调事件/eeui.swipeCaptcha(imgUrl, callback(result))
### # imgUrl 参数说明
<template><div class="app"><text class="button" @click="swipeCaptcha">打开验证</text></div></template><style>.app {flex: 1;justify-content: center;align-items: center;}.button {text-align: center;margin-top: 20px;padding-top: 20px;padding-bottom: 20px;padding-left: 30px;padding-right: 30px;color: #ffffff;background-color: #00B4FF;}</style><script>const eeui = app.requireModule('eeui');export default {methods: {swipeCaptcha() {eeui.swipeCaptcha("", (res)=>{switch (res.status) {case "success":eeui.toast("验证成功");break;case "failed":eeui.toast("验证失败");break;}});},}};</script>
| 类型 | 必须 | 描述 | 默认值 |
|---|---|---|---|
String | - | 自定义显示的图片 | - |
result说明
{pageName: '页面名称',status: 'create', //状态,详见:注①}
-注①:
create页面创建完毕
- destroy页面已销毁
- success验证成功
- failed验证失败
### # 简单示例
在 GitHub 上编辑此页
//示例①eeui.swipeCaptcha("", function(result) {//……});//示例②eeui.swipeCaptcha('http://...../captcha.png', function(result) {//……});
最后一次更新: 1/5/2020, 4:12:37 PM
