diff --git a/src/core/view/components/canvas/index.vue b/src/core/view/components/canvas/index.vue index 11abd6f33162d051788e499563de169bcf9e1c67..94e7f221216dd38f4e1470cc7c71505ad3284ed2 100644 --- a/src/core/view/components/canvas/index.vue +++ b/src/core/view/components/canvas/index.vue @@ -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: {