Giter Site home page Giter Site logo

books's Introduction

项目中使用

  • 进入目录安装依赖,国内用户推荐使用 cnpm 进行加速
npm install taro-canvas-code --save
  • 在代码中 import 并按照文档说明使用
import ImageCode from 'taro-canvas-code';

示例代码

<!--WXML示例代码-->
<ImageCode
          imageUrl={url}
          onReload={this.onReload}
          onClose={this.onClose}
          onMath={this.onMath}
          top={'30%'}
        />

更多使用方式请移步仓库地址查看 demo 和使用方式.

属性列表

属性 类型 默认值 必填 说明
imageUrl string 背景图片的路径,要求宽325px,高217px
top string 0 组件距离顶部高度
onReload function 重新渲染时触发的函数
onMath function 滑动结束后进行验证的函数,接收两个参数,第一个是滑动结束的x坐标,第二个是验证失败执行的回调函数
onClose function 点击右上角关闭按钮触发的函数

books's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.