Code Monkey home page Code Monkey logo

wx-jigsaw-master's Introduction

wx-jigsaw-master

微信小程序滑动验证组件

一些说明

  • copy componments目录,然后按自定义组件方式(详见官方文档)使用,如
<jigsaw></jigsaw>
  • 可自定义的样式属性有canvasWidth、canvasHeight以及监听事件bindmyevent
  • canvasWidth、canvasHeight默认300*150,修改此值可能需要更新组件css样式
  • 注意监听事件我只定义了一个返回值(e.detail.result)为布尔类型,将在滑动验证成功时触发此事件
  • 调用了两个接口,easymock(登录假数据)和picsum.photos(获取图片),调试注意关闭域名检测
  • 加载图片有点慢,因为要调wx.getImageinfo接口缓存图片,如果不缓存图片而直接canvas调网络图片真机不能正常显示。
  • 滑块真机调试卡顿已解决(使用wxs响应事件),避免在频率刷新高的事件中使用this.setData
//支持登录的用户及密码
"user": [
      {
        "name": "admin",
        "password": "1234"
      },
      {
        "name": "yousf",
        "password": "yousf"
      },
      {
        "name": "we",
        "password": "moximoxi"
      }
    ]

更多信息

wx-jigsaw-master's People

Contributors

intxzt avatar

Stargazers

 avatar

Forkers

ixiaoyy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.