1.0.0-2 • Published 1 year ago

lattice-lottery-new v1.0.0-2

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

lattice-lottery-new

兼容Vue、react、微信小程序等框架的活动抽奖组件

文档地址

lattice-lottery-new

快速开始

# 安装
npm install lattice-lottery-new --save
// 按需引入
import LotteryGrid from 'lattice-lottery-new/LotteryGrid'

const list = [
  {
    label: "华为Mate 60 Pro+",
  },
  {
    label: "1000元现金红包",
  },
  {
    label: "三等奖",
  },
  {
    label: "500元现金红包",
  },
  {
    label: "谢谢参与",
  },
  {
    label: "六等奖",
  },
  {
    label: "7等奖",
  },
  {
    label: "8等奖",
  },
]

// 初始化
oLotteryGrid = new LotteryGrid({
  element: '.LotteryGrid', // dom class name or id name
  list,
  onend: (val) => {
    console.log("结束", val)
  },
  onsubmit: () => {
    oLotteryGrid.go(4) // index position, start at 0
  }
})
1.0.0-2

1 year ago

1.0.0-1

1 year ago

1.0.0-0

1 year ago