
ui和功能分离的九宫格
The grid-roll lottery system offers a sophisticated yet user-friendly approach to conducting prize draws. By separating UI and logic within the component, it allows developers to focus solely on the visual aspect and prize assignment, while the underlying functionality manages the complex mechanics. With two distinct lottery modes, grid-roll provides flexibility depending on the specific needs of the draw, making it an ideal choice for various applications.
This system is not only aesthetically pleasing but also highly functional, catering to both index-based and PID-based prize selections. The configuration options afford considerable control over the lottery experience, ensuring it can adapt to different scenarios effortlessly.
Two Lottery Modes: Choose between index and PID modes for flexible prize selection based on your specific requirements.
Customizable Grid Layout: Supports various configurations for grid size, allowing you to set the layout that best fits your application.
Dynamic Rolling Control: Speed and direction can be adjusted for a personalized experience, whether in clockwise or counterclockwise motion.
Event Callbacks: Stay informed with callbacks that notify you when the lottery is underway or when a selection has been made, enhancing interactivity.
Versatile Prize Configuration: Easily mark prizes as disabled or use PIDs for customized prize allocation according to your needs.
Reliable Initialization: Automatically initializes the lottery grid upon setup and offers the ability to re-initialize in case of unexpected layout changes.
Promise-Based Functions: The core methods such as startRoll and stopRoll return promises, ensuring smooth and manageable execution of the lottery process.
Adaptive Lighting: The optional lamplight feature enhances the excitement by adding visual effects to signify winning moments.

Vue.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.
SCSS is a preprocessor scripting language that extends the capabilities of CSS by adding features such as variables, nesting, and mixins. It allows developers to write more efficient and maintainable CSS code, and helps to streamline the development process by reducing repetition and increasing reusability.
ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.
Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.