Socket
Book a DemoInstallSign in
Socket

uni-luck-draw

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uni-luck-draw

uni-app【大转盘 / 九宫格】抽奖插件

latest
npmnpm
Version
1.4.6
Version published
Maintainers
1
Created
Source

logo

lucky-canvas 抽奖插件

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

stars forks author license

适配框架npm下载量CDN使用量
JS / JQ 中使用downloadsdownloads
Vue 中使用downloadsdownloads
React 中使用downloads-
UniApp 中使用downloads-
Taro3.x 中使用downloads-
微信小程序 中使用downloads-

官方文档 & Demo演示

中文https://100px.net

EnglishIf anyone can help translate the document, please contact me ldq404@qq.com


在 uni-app 中使用

1. 安装插件

# npm 安装:
npm install uni-luck-draw


# yarn 安装:
yarn add uni-luck-draw

2. 引入并使用

<view>
  <!-- 大转盘抽奖 -->
  <LuckyWheel
    width="600rpx"
    height="600rpx"
    ...你的配置
  />
  <!-- 九宫格抽奖 -->
  <LuckyGrid
    width="600rpx"
    height="600rpx"
    ...你的配置
  />
</view>
// npm 下载会默认到 node_modules 里面,直接引入包名即可
import LuckyWheel from 'uni-luck-draw/lucky-wheel' // 大转盘
import LuckyGrid from 'uni-luck-draw/lucky-grid' // 九宫格

// 如果你是通过 HBuilderX 导入插件,那你需要指定一下路径
// import LuckyWheel from '@/components/uni-luck-draw/lucky-wheel' // 大转盘
// import LuckyGrid from '@/components/uni-luck-draw/lucky-grid' // 九宫格

export default {
  // 注册组件
  components: { LuckyWheel, LuckyGrid },
}

3. 我提供了一个最基本的 demo 供你用于尝试

由于 uni-app 渲染 md 的时候会出问题,所以我把 demo 代码放到了文档里


4. 补充说明

Keywords

uni-app抽奖

FAQs

Package last updated on 28 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts