Git Product home page Git Product logo

ruanjianbai / lucky-canvas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luckdraw/lucky-canvas-invalid

0.0 1.0 0.0 1.26 MB

🌼🌼🌼 使用 TypeScript + 原生 Canvas 封装的 JS 抽奖插件【大转盘 / 九宫格】🚀 并内置了一个微型的响应式来处理异步数据渲染,🌈 一套源码适配多端框架 js / jq / vue / react / taro / uni-app / 微信小程序等等...

Home Page: https://100px.net/usage/js.html

License: Apache License 2.0

TypeScript 95.12% JavaScript 4.88%

lucky-canvas's Introduction

logo

lucky-canvas 抽奖插件

一个基于 JavaScript 的 ( 大转盘 / 九宫格 ) 抽奖插件

简体中文 · English

stars forks version downloads downloads

author license


官方文档 & Demo演示

中文https://100px.net/usage/js.html

EnglishIf anyone can help translate the document, please contact me [email protected]



在 Js / JQuery 中使用

方式 1:通过 script 标签引入

为了避免 CDN 链接出现异常或波动,我非常建议你缓存到本地或服务器

<div id="my-lucky"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lucky-canvas.umd.min.js"></script>
<script>

  // 大转盘抽奖
  let luckyWheel = new LuckyCanvas.LuckyWheel({
    el: '#my-lucky',
    width: '300px',
    height: '300px'
  }, {
    // ...你的配置
  })
  
  // 九宫格抽奖
  let luckyGrid = new LuckyCanvas.LuckyGrid({
    el: '#my-lucky',
    width: '300px',
    height: '300px'
  }, {
    // ...你的配置
  })

</script>

如果您觉得这个项目还不错, 可以在 Github 上面帮我点个star ☜(゚ヮ゚☜)


友情链接

lucky-canvas's People

Contributors

buuing avatar shenyixuanv1 avatar luck-draw avatar mizhousoft avatar

Watchers

James Cloos 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.