|
1 | 1 |
|
2 | 2 | <div align="center"> |
3 | 3 | <img src="https://raw.githubusercontent.com/LuckDraw/lucky-canvas/master/logo.png" width="128" alt="logo" /> |
4 | | - <h1>vue-luck-draw 抽奖插件</h1> |
5 | | - <p>一个基于 vue 的 ( 大转盘 / 九宫格 ) 抽奖插件</p> |
| 4 | + <h1>lucky-canvas 抽奖插件</h1> |
| 5 | + <p>一个基于 JavaScript 的 ( 大转盘 / 九宫格 ) 抽奖插件</p> |
6 | 6 | <p class="hidden"> |
7 | | - <a href="https://github.com/LuckDraw/vue-luck-draw#readme">简体中文</a> |
| 7 | + <a href="https://github.com/luckdraw/lucky-canvas#readme">简体中文</a> |
8 | 8 | · |
9 | | - <a href="https://github.com/LuckDraw/vue-luck-draw/tree/master/en">English</a> |
| 9 | + <a href="https://github.com/luckdraw/lucky-canvas/tree/master/en">English</a> |
10 | 10 | </p> |
11 | 11 | <p> |
12 | | - <a href="https://github.com/LuckDraw/vue-luck-draw/stargazers" target="_black"> |
13 | | - <img src="https://img.shields.io/github/stars/LuckDraw/vue-luck-draw?color=%23ffca28&logo=github&style=flat-square" alt="stars" /> |
| 12 | + <a href="https://github.com/LuckDraw/lucky-canvas/stargazers" target="_black"> |
| 13 | + <img src="https://img.shields.io/github/stars/luckdraw/lucky-canvas?color=%23ffca28&logo=github&style=flat-square" alt="stars" /> |
14 | 14 | </a> |
15 | | - <a href="https://github.com/LuckDraw/vue-luck-draw/network/members" target="_black"> |
16 | | - <img src="https://img.shields.io/github/forks/LuckDraw/vue-luck-draw?color=%23ffca28&logo=github&style=flat-square" alt="forks" /> |
| 15 | + <a href="https://github.com/luckdraw/lucky-canvas/network/members" target="_black"> |
| 16 | + <img src="https://img.shields.io/github/forks/luckdraw/lucky-canvas?color=%23ffca28&logo=github&style=flat-square" alt="forks" /> |
17 | 17 | </a> |
18 | | - <a href="https://www.npmjs.com/package/vue-luck-draw" target="_black"> |
19 | | - <img src="https://img.shields.io/npm/v/vue-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="version" /> |
| 18 | + <a href="https://www.npmjs.com/package/lucky-canvas" target="_black"> |
| 19 | + <img src="https://img.shields.io/npm/v/lucky-canvas?color=%23ffca28&logo=npm&style=flat-square" alt="version" /> |
20 | 20 | </a> |
21 | | - <a href="https://www.npmjs.com/package/vue-luck-draw" target="_black"> |
22 | | - <img src="https://img.shields.io/npm/dm/vue-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" /> |
| 21 | + <a href="https://www.npmjs.com/package/lucky-canvas" target="_black"> |
| 22 | + <img src="https://img.shields.io/npm/dm/lucky-canvas?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" /> |
23 | 23 | </a> |
24 | | - <a href="https://www.jsdelivr.com/package/npm/vue-luck-draw" target="_black"> |
25 | | - <img src="https://data.jsdelivr.com/v1/package/npm/vue-luck-draw/badge" alt="jsdelivr" /> |
| 24 | + <a href="https://www.jsdelivr.com/package/npm/lucky-canvas" target="_black"> |
| 25 | + <img src="https://data.jsdelivr.com/v1/package/npm/lucky-canvas/badge" alt="downloads" /> |
26 | 26 | </a> |
27 | 27 | </p> |
28 | 28 | <p> |
29 | 29 | <a href="https://github.com/buuing" target="_black"> |
30 | 30 | <img src="https://img.shields.io/badge/Author-%20buuing%20-7289da.svg?&logo=github&style=flat-square" alt="author" /> |
31 | 31 | </a> |
32 | | - <a href="https://github.com/LuckDraw/vue-luck-draw/blob/master/LICENSE" target="_black"> |
33 | | - <img src="https://img.shields.io/github/license/LuckDraw/vue-luck-draw?color=%232DCE89&logo=github&style=flat-square" alt="license" /> |
| 32 | + <a href="https://github.com/luckdraw/lucky-canvas/blob/master/LICENSE" target="_black"> |
| 33 | + <img src="https://img.shields.io/github/license/luckdraw/lucky-canvas?color=%232dce89&logo=github&style=flat-square" alt="license" /> |
34 | 34 | </a> |
35 | 35 | </p> |
36 | 36 | </div> |
|
39 | 39 |
|
40 | 40 | ## 官方文档 & Demo演示 |
41 | 41 |
|
42 | | -> **中文**:[https://100px.net/usage/vue.html](https://100px.net/usage/vue.html) |
| 42 | +> **中文**:[https://100px.net/usage/js.html](https://100px.net/usage/js.html) |
43 | 43 |
|
44 | 44 | > **English**:**If anyone can help translate the document, please contact me** `ldq404@qq.com` |
45 | 45 |
|
46 | 46 | <br /> |
47 | 47 |
|
48 | | -- **在 js / jq 中使用 [lucky-canvas](https://github.com/luckdraw/lucky-canvas)** |
| 48 | +- **在 js / jq 中使用 [lucky-canvas](https://100px.net/usage/js.html)** |
49 | 49 |
|
50 | | -- **在 vue 中使用 [vue-luck-draw](https://github.com/luckdraw/vue-luck-draw)** |
| 50 | +- **在 vue 中使用 [vue-luck-draw](https://100px.net/usage/vue.html)** |
51 | 51 |
|
52 | | -- **在 react 中使用 [react-luck-draw](https://github.com/luckdraw/react-luck-draw)** |
| 52 | +- **在 react 中使用 [react-luck-draw](https://100px.net/usage/react.html)** |
53 | 53 |
|
54 | | -- **在 uni-app 中使用 [uni-luck-draw](https://github.com/luckdraw/uni-luck-draw)** |
| 54 | +- **在 uni-app 中使用 [uni-luck-draw](https://100px.net/usage/uni-app.html)** |
55 | 55 |
|
56 | | -- **在 taro 中使用 [taro-luck-draw](https://github.com/luckdraw/taro-luck-draw)** |
| 56 | +- **在 taro 中使用 [taro-luck-draw](https://100px.net/usage/taro.html)** |
57 | 57 |
|
58 | | -- **在 微信小程序 中使用 [mini-luck-draw](https://github.com/luckdraw/mini-luck-draw)** |
| 58 | +- **在 微信小程序 中使用 [mini-luck-draw](https://100px.net/usage/wx.html)** |
59 | 59 |
|
60 | 60 | <br /> |
61 | 61 |
|
62 | | -## 在 vue2.x / vue3.x 中使用 |
63 | | - |
64 | | -### 方式 1:通过 import 引入 |
65 | | - |
66 | | -1. 首先安装插件 |
67 | | - |
68 | | -```shell |
69 | | -# npm 安装: |
70 | | -npm install vue-luck-draw |
71 | | - |
72 | | -# yarn 安装: |
73 | | -yarn add vue-luck-draw |
74 | | -``` |
75 | | - |
76 | | -2. 然后找到 `main.js` 引入插件并 `use` |
77 | | - |
78 | | -```js |
79 | | -// vue2.x |
80 | | -import LuckDraw from 'vue-luck-draw' |
81 | | -Vue.use(LuckDraw) |
82 | | - |
83 | | -// vue3.x |
84 | | -import LuckDraw from 'vue-luck-draw/vue3' |
85 | | -createApp(App).use(LuckDraw).mount('#app') |
86 | | -``` |
87 | | - |
88 | | -3. 最后在组件内使用 **`<LuckyWheel />`大转盘抽奖** 或 **`<LuckyGrid />`九宫格抽奖** |
89 | | - |
90 | | -```vue |
91 | | -<template> |
92 | | - <div> |
93 | | - <!-- 大转盘抽奖 --> |
94 | | - <LuckyWheel |
95 | | - width="200px" |
96 | | - height="200px" |
97 | | - ...你的配置 |
98 | | - /> |
99 | | - <!-- 九宫格抽奖 --> |
100 | | - <LuckyGrid |
101 | | - width="200px" |
102 | | - height="200px" |
103 | | - ...你的配置 |
104 | | - /> |
105 | | - </div> |
106 | | -</template> |
107 | | -``` |
| 62 | +### 贡献者 |
108 | 63 |
|
109 | 64 | <br /> |
110 | 65 |
|
111 | | -### 方式 2:通过 script 标签引入 |
112 | | - |
113 | | -> 为了避免 CDN 链接出现异常或波动,我非常建议你**缓存到本地或服务器(✿◡‿◡)** |
114 | | -
|
115 | | -- **vue2.x:** [https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/dist/vue-luck-draw.umd.min.js](https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/dist/vue-luck-draw.umd.min.js) |
116 | | - |
117 | | -- **vue3.x:** [https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/vue3/vue-luck-draw.umd.min.js](https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/vue3/vue-luck-draw.umd.min.js) |
118 | | - |
119 | | - |
120 | | -```html |
121 | | -<div id="app"> |
122 | | - <!-- 大转盘抽奖 --> |
123 | | - <lucky-wheel |
124 | | - width="200px" |
125 | | - height="200px" |
126 | | - ...你的配置 |
127 | | - /> |
128 | | - <!-- 九宫格抽奖 --> |
129 | | - <lucky-grid |
130 | | - width="200px" |
131 | | - height="200px" |
132 | | - ...你的配置 |
133 | | - /> |
134 | | -</div> |
135 | | -<script src="./vue.min.js"></script> |
136 | | -<script src="./vue-luck-draw.umd.min.js"></script> |
137 | | -<script> |
138 | | - new Vue({ |
139 | | - el: '#app', |
140 | | - data () { |
141 | | - return {} |
142 | | - } |
143 | | - }) |
144 | | -</script> |
145 | | -``` |
146 | | - |
147 | | -<br /> |
148 | | - |
149 | | -### **如果您觉得这个项目还不错, 可以在 [Github](https://github.com/LuckDraw/vue-luck-draw) 上面帮我点个`star` ☜(゚ヮ゚☜)** |
150 | | - |
| 66 | +### **如果您觉得这个项目还不错, 可以在 [Github](https://github.com/LuckDraw/lucky-canvas) 上面帮我点个`star` ☜(゚ヮ゚☜)** |
151 | 67 |
|
152 | 68 | <br /> |
153 | 69 |
|
154 | 70 | ## 友情链接 |
155 | 71 |
|
156 | 72 | - [🎁 h5-Dooring 一款功能强大,高可扩展的H5可视化编辑器](https://github.com/MrXujiang/h5-Dooring) |
157 | 73 |
|
| 74 | + |
| 75 | +<!-- lerna过滤器配置 --> |
| 76 | +<!-- https://github.com/lerna/lerna/tree/main/core/filter-options#readme --> |
0 commit comments