Skip to content

Commit 5eb5cb5

Browse files
committed
upgrade: 升级 v3.4.5 更新核心依赖, 新增 init 方法用于重置画布宽高和 dpr
1 parent ce02078 commit 5eb5cb5

File tree

10 files changed

+119
-89
lines changed

10 files changed

+119
-89
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
</p>
1111
<p>
1212
<a href="https://github.com/LuckDraw/vue-luck-draw/stargazers" target="_black">
13-
<img src="https://img.shields.io/github/stars/buuing/vue-luck-draw?color=%23ffca28&logo=github&style=flat-square" alt="stars" />
13+
<img src="https://img.shields.io/github/stars/LuckDraw/vue-luck-draw?color=%23ffca28&logo=github&style=flat-square" alt="stars" />
1414
</a>
1515
<a href="https://github.com/LuckDraw/vue-luck-draw/network/members" target="_black">
16-
<img src="https://img.shields.io/github/forks/buuing/vue-luck-draw?color=%23ffca28&logo=github&style=flat-square" alt="forks" />
16+
<img src="https://img.shields.io/github/forks/LuckDraw/vue-luck-draw?color=%23ffca28&logo=github&style=flat-square" alt="forks" />
1717
</a>
1818
<a href="https://www.npmjs.com/package/vue-luck-draw" target="_black">
1919
<img src="https://img.shields.io/npm/v/vue-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="version" />
@@ -30,7 +30,7 @@
3030
<img src="https://img.shields.io/badge/Author-%20buuing%20-7289da.svg?&logo=github&style=flat-square" alt="author" />
3131
</a>
3232
<a href="https://github.com/LuckDraw/vue-luck-draw/blob/master/LICENSE" target="_black">
33-
<img src="https://img.shields.io/github/license/buuing/vue-luck-draw?color=%232DCE89&logo=github&style=flat-square" alt="license" />
33+
<img src="https://img.shields.io/github/license/LuckDraw/vue-luck-draw?color=%232DCE89&logo=github&style=flat-square" alt="license" />
3434
</a>
3535
</p>
3636
</div>
@@ -39,7 +39,7 @@
3939

4040
## 官方文档 & Demo演示
4141

42-
> **中文**[https://100px.net/document/vue.html](https://100px.net/document/vue.html)
42+
> **中文**[https://100px.net/usage/vue.html](https://100px.net/usage/vue.html)
4343
4444
> **English****If anyone can help translate the document, please contact me** `ldq404@qq.com`
4545
@@ -151,7 +151,7 @@ createApp(App).use(LuckDraw).mount('#app')
151151

152152
<br />
153153

154-
## 推荐的开源项目
154+
## 友情链接
155155

156156
- [🎁 h5-Dooring 一款功能强大,高可扩展的H5可视化编辑器](https://github.com/MrXujiang/h5-Dooring)
157157

dist/vue-luck-draw.common.js

Lines changed: 25 additions & 19 deletions
Large diffs are not rendered by default.

dist/vue-luck-draw.umd.js

Lines changed: 25 additions & 19 deletions
Large diffs are not rendered by default.

dist/vue-luck-draw.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-luck-draw",
3-
"version": "3.4.4",
3+
"version": "3.4.5",
44
"description": "一个支持 vue2 / vue3 的(大转盘抽奖 / 九宫格抽奖)luckydraw 插件",
55
"main": "index.js",
66
"keywords": [
@@ -22,6 +22,6 @@
2222
],
2323
"homepage": "https://100px.net",
2424
"dependencies": {
25-
"lucky-canvas": "^1.5.2"
25+
"lucky-canvas": "^1.5.3"
2626
}
2727
}

src/LuckyGrid.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
// 添加版本信息到标签上, 方便定位版本问题
5050
this.$refs.luckyGrid.setAttribute('package', `${name}@${version}`)
5151
try {
52-
this.init()
52+
this.initLucky()
5353
this.$emit('success')
5454
} catch (err) {
5555
this.$emit('error', err)
@@ -58,7 +58,7 @@ export default {
5858
}
5959
},
6060
methods: {
61-
init () {
61+
initLucky () {
6262
this.$lucky = new LuckyGrid({
6363
flag: 'WEB',
6464
width: this.width,
@@ -78,6 +78,9 @@ export default {
7878
},
7979
})
8080
},
81+
init () {
82+
this.$lucky && this.$lucky.init({})
83+
},
8184
play (...rest) {
8285
this.$lucky.play(...rest)
8386
},

src/LuckyWheel.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
// 添加版本信息到标签上, 方便定位版本问题
3636
this.$refs.luckyWheel.setAttribute('package', `${name}@${version}`)
3737
try {
38-
this.init()
38+
this.initLucky()
3939
this.$emit('success')
4040
} catch (err) {
4141
this.$emit('error', err)
@@ -44,7 +44,7 @@ export default {
4444
}
4545
},
4646
methods: {
47-
init () {
47+
initLucky () {
4848
this.$lucky = new LuckyWheel({
4949
flag: 'WEB',
5050
width: this.width,
@@ -64,6 +64,9 @@ export default {
6464
},
6565
})
6666
},
67+
init () {
68+
this.$lucky && this.$lucky.init({})
69+
},
6770
play (...rest) {
6871
this.$lucky.play(...rest)
6972
},

vue3/vue-luck-draw.common.js

Lines changed: 24 additions & 18 deletions
Large diffs are not rendered by default.

vue3/vue-luck-draw.umd.js

Lines changed: 24 additions & 18 deletions
Large diffs are not rendered by default.

vue3/vue-luck-draw.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)