Skip to content

Commit

Permalink
update: H5 canvas优先使用用户设置的宽高
Browse files Browse the repository at this point in the history
  • Loading branch information
dcloudhdx committed Apr 24, 2019
1 parent 9665540 commit ac4bd26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/view/components/canvas/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export default {
},
mounted () {
this._resize({
width: this.$el.offsetWidth,
height: this.$el.offsetHeight
width: this.$attrs.width ? parseInt(this.$attrs.width) : this.$el.offsetWidth,
height: this.$attrs.height ? parseInt(this.$attrs.height) : this.$el.offsetHeight
})
},
methods: {
Expand Down

0 comments on commit ac4bd26

Please sign in to comment.