GithubHelp home page GithubHelp logo

项目中使用

  • 进入目录安装依赖,国内用户推荐使用 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 点击右上角关闭按钮触发的函数

xml123's Projects

33-js-concepts icon 33-js-concepts

:scroll: 每个 JavaScript 工程师都应懂的33个概念 @leonardomso

imooc icon imooc

由浅入深全面掌握Django ORM开发的知识,以Django官方文档为依据,内容完整、准确、权威。

javascript-algorithms icon javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

node-emoji icon node-emoji

:smirk: simple emoji support for node.js projects

openwrt-ss icon openwrt-ss

打造一台翻墙路由器,ShadowSocks翻墙,OpenWrt路由器

react-admin icon react-admin

:sparkles: react-admin system solution : react 后台管理系统解决方案

spec icon spec

This repository contains the specifications.

vue-admin icon vue-admin

一个基于Vue2、element ui构建开发的后台管理系统 Demo:

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.