@lucky-canvas/taro

0.0.14 • Public • Published
logo

@lucky-canvas/taro 抽奖插件

一个基于 Taro 的 ( 大转盘 / 九宫格 / 老虎机 ) 抽奖插件

stars forks author license


官方文档

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


在 Taro 中使用

安装

为了确保相关依赖安装正确, 你必须通过 npm / yarn 来安装

# npm 安装:
npm install @lucky-canvas/taro@latest

# yarn 安装:
yarn add @lucky-canvas/taro@latest

使用

taro-vue 简单示例

<template>
  <view>

    <!-- 大转盘抽奖 -->
    <LuckyWheel width="600rpx" height="600rpx" ...你的配置 />

    <!-- 九宫格抽奖 -->
    <LuckyGrid width="600rpx" height="600rpx" ...你的配置 />

    <!-- 老虎机抽奖 -->
    <SlotMachine width="600rpx" height="600rpx" ...你的配置 />

  </view>
</template>

<script>
import { LuckyWheel, LuckyGrid, SlotMachine } from '@lucky-canvas/taro/vue'
export default {
  components: { LuckyWheel, LuckyGrid, SlotMachine },
}
</script>

taro-react 简单示例

import React from 'react'
import { View } from '@tarojs/components'
import { LuckyWheel, LuckyGrid, SlotMachine } from '@lucky-canvas/taro/react'

export default class Index extends React.Component {
  render () {
    return <View>

      {/* 大转盘抽奖 */}
      <LuckyWheel width="300px" height="300px" ...你的配置 />

      {/* 大转盘抽奖 */}
      <LuckyGrid width="300px" height="300px" ...你的配置 />

      {/* 老虎机抽奖 */}
      <SlotMachine width="300px" height="300px" ...你的配置 />

    </View>
  }
}

完整文档: https://100px.net


🙏🙏🙏 点个Star

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


Package Sidebar

Install

npm i @lucky-canvas/taro

Homepage

100px.net

Weekly Downloads

83

Version

0.0.14

License

Apache-2.0

Unpacked Size

56.5 kB

Total Files

13

Last publish

Collaborators

  • ldq404