Skip to content

Commit f99fe5a

Browse files
Fix: type hinting and canvas bg
1 parent d685b22 commit f99fe5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PictureInput.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
default: 'image/*'
5959
},
6060
size: {
61-
type: Number,
61+
type: [String, Number],
6262
default: Number.MAX_SAFE_INTEGER
6363
},
6464
name: {
@@ -74,6 +74,7 @@ export default {
7474
default: 'btn btn-primary button'
7575
},
7676
crop: {
77+
type: Boolean,
7778
default: true
7879
},
7980
customStrings: {
@@ -235,6 +236,7 @@ export default {
235236
}
236237
}
237238
const canvas = this.$refs.previewCanvas
239+
canvas.style.background = 'none'
238240
canvas.width = this.previewWidth * this.pixelRatio
239241
canvas.height = this.previewHeight * this.pixelRatio
240242
this.context.setTransform(1, 0, 0, 1, 0, 0)

0 commit comments

Comments
 (0)