Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8944630

Browse files
committed
update 1.1.5
1 parent 2659538 commit 8944630

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,7 @@ export default {
128128

129129
- 当不传递 imgs 字段或图片加载出错时,会自动生成随机图片
130130
- 模态框的显示和隐藏完全由父级控制,所以用户通过验证后,需要手动隐藏模态框
131+
132+
### 更新日志
133+
134+
**2021年02月09日** 把所有package包更新到最新,减小代码体积。 (目前不支持vue3.0, 会报错, 等vue3.0正式发布时再改)

‎src/app.vue‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,8 @@ export default {
260260
ctx2.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
261261
262262
// 取一个随机坐标,作为拼图块的位置
263-
this.pinX = this.getRandom(
264-
this.puzzleBaseSize,
265-
this.canvasWidth - this.puzzleBaseSize - 20
266-
); // 留20的边距
267-
this.pinY = this.getRandom(
268-
20,
269-
this.canvasHeight - this.puzzleBaseSize - 20
270-
); // 主图高度 - 拼图块自身高度 - 20边距
263+
this.pinX = this.getRandom(this.puzzleBaseSize,this.canvasWidth - this.puzzleBaseSize - 20); // 留20的边距
264+
this.pinY = this.getRandom(20,this.canvasHeight - this.puzzleBaseSize - 20); // 主图高度 - 拼图块自身高度 - 20边距
271265
img.crossOrigin = "anonymous"; // 匿名,想要获取跨域的图片
272266
img.onload = () => {
273267
const [x, y, w, h] = this.makeImgSize(img);
@@ -366,7 +360,6 @@ export default {
366360
// 画整体背景图
367361
ctx.save();
368362
ctx.globalCompositeOperation = "destination-over";
369-
// ctx.drawImage(img, 0, 0, this.canvasWidth, this.canvasHeight);
370363
ctx.drawImage(img, x, y, w, h);
371364
ctx.restore();
372365

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /