GithubHelp home page GithubHelp logo

jdf2e / nutui-bingo Goto Github PK

View Code? Open in Web Editor NEW
413.0 19.0 56.0 6.73 MB

Bingo - 基于 NutUI 的抽奖组件

Home Page: https://nutui.jd.com/bingo/#/

JavaScript 9.80% HTML 1.54% Vue 66.24% SCSS 11.87% CSS 3.84% TypeScript 6.71%

nutui-bingo's Introduction

基于 NutUI 的抽奖组件库,助力营销活动和小游戏场景

特性

  • 使用 Vue3 语法
  • 支持 H5 和小程序
  • 详尽的文档和示例
  • 支持 TypeScript

组件

  • 幸运大转盘 💻 📱
  • 跑马灯 💻 📱
  • 九宫格 💻 📱
  • 开心刮刮乐 💻
  • 神秘大礼盒 💻 📱
  • 砸金蛋 💻 📱
  • 老虎机 💻 📱
  • 摇好运 💻
  • 红包雨 💻 📱
  • 娃娃机 💻
  • 你藏我猜 💻 📱
  • 摇骰子 💻 📱

支持环境

  • Android 5.0+
  • iOS 9.2+
  • 主要适用于 H5 和小程序

构建版本

  • es nutbig.es.js
  • umd nutbig.umd.js

⌨️ 本地开发

你可以使用 Gitpod 进行在线开发:

Open in Gitpod

或者克隆到本地开发:

$ git clone https://github.com/jdf2e/nutui-bingo.git
$ cd nutui-bingo
$ npm install
$ npm run dev

nutui-bingo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nutui-bingo's Issues

代码有bug?

src/packages/utils/create/component.ts:14:13 - error TS2352: Conversion of type '<PropsOptions extends Readonly<ComponentPropsOptions>, Props extends Readonly<ExtractPropTypes>>(_component: { ...; }) => (props: Record<...> & {}) => any' to type '{ <Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType<Record<string, any>> = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<...>, options?: (Pick<...> & { ...; }) | undefined): (props: Props & EmitsToProps<...>) => any; <Pro...' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Type '(props: Record<string, any> & {}) => any' is not comparable to type 'DefineComponent<any, any, any, any, any, any, any, any, any, PublicProps, Readonly, {} | { [x: string]: any; }, any>'.
Type '(props: Record<string, any> & {}) => any' is not comparable to type 'ComponentPublicInstanceConstructor<any, any, any, any, ComputedOptions, MethodOptions>'.
Type '(props: Record<string, any> & {}) => any' provides no match for the signature 'new (...args: any[]): any'.

14 create: function <
~~~~~~~~~~
15 PropsOptions extends Readonly,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
32 return defineComponent(_component as any);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 } as typeof defineComponent,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in src/packages/utils/create/component.ts:14

在NutUI4项目中无法使用

尝鲜用 taro + NutUI4 新建项目,并安装bingo,运行报错:

ERROR in ./src/pages/index/index.vue?vue&type=template&id=1badc801 (./node_modules/unplugin/dist/webpack/loaders/transform.js?unpluginName=unplugin-vue-components!./node_modules/babel-loader/lib/index.js??clonedRuleSet-11.use[0]!./node_modules/vue-loader/dist/templ
ateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/pages/index/index.vue?vue&type=template&id=1badc801) 1:112-170
Module not found: Error: Can't resolve '@nutui/nutui-taro/dist/packages/bigmarquee/style' in

在NutUI3下使用正常

大转盘的单位不是自适应单位

在h5中或小程序中不会转化rpx或rem单位,是需要额外处理吗?
ps:像九宫格或跑马灯这两个组件是会转化为rpx的,不过h5中不是rem单位,还是px单位
image

砸金蛋组件功能期望优化

1.砸金蛋组件期望暴露当前点击的金蛋的下标和当前金蛋的原数据对象
2.砸金蛋组件期望能够接收【已砸金蛋数组】进行初始化组件,来满足用户刷新后砸过的金蛋能够回显的需求

感谢作者开源 🙏

SquareNine 九宫格组件问题

  1. 小程序上没有中奖的图片显示有问题,没有显示对应id的奖品图片
  2. 连续翻转2张牌,位置就错乱了, 官网可以复现
  3. 在微信小程序中,收牌的位置没有完全隐藏在翻牌按钮下

image

关于跑马灯更换图片的问题

请问Marquee 跑马灯怎么更换点击抽奖后的itemStyle背景图和startStyle背景图?现在只能更换点击抽奖前的背景图。

抽奖机的 BUG,不中奖显示三个图片一样

当后端返回不中奖时,设置 prizeIndex = -1 ,但抽奖机还是显示三个图片一样。
在官网验证也会出现这个问题:

  1. 点击不中奖按钮(双击后出现概率会很高)
  2. 显示三个图片一样

以下图片都是通过双击「不中奖」按钮出现的
288851666064054_ pic
288861666064201_ pic
288871666064232_ pic

开始抽奖为什么不加一个条件

抽奖一般都会设置一个条件才可以抽奖,但是目前只要点击了抽奖 不管有没有写逻辑都会转动抽奖。
为什么不把lock做成可配置的了?

大转盘抽奖ts校验问题

小白提问求助:
在大转盘抽奖代码中,turntable.value.rotateTurn()这行代码会提示“turntable.value”可能为 “null”。const turntable: Ref
请问如何解决定义类型的问题?谢谢

刮刮卡回调事件问题

src\packages__VUE\scratchcard\index.vue ---目标路径
image
图中方法,会改变回调事件导致,刮开后执行到该回调中。

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.