diff --git a/src/core/view/components/resize-sensor/index.vue b/src/core/view/components/resize-sensor/index.vue index 94192514e912a32d42e1314db7c465ba7fdfe9d4..d35b79a598ac5019ca82b986412e801e1e623f78 100644 --- a/src/core/view/components/resize-sensor/index.vue +++ b/src/core/view/components/resize-sensor/index.vue @@ -10,8 +10,8 @@ export default { data: function () { return { size: { - width: 0, - height: 0 + width: -1, + height: -1 } } }, @@ -19,15 +19,10 @@ export default { size: { deep: true, handler: function (size) { - this.reset() this.$emit('resize', Object.assign({}, size)) } } }, - beforeDestroy: function () { - this.$emit('resize', { width: 0, height: 0 }) - this.$emit('resizeSensorBeforeDestroy') - }, mounted: function () { if (this.initial === true) { this.$nextTick(this.update) @@ -65,6 +60,7 @@ export default { update: function () { this.size.width = this.$el.offsetWidth this.size.height = this.$el.offsetHeight + this.reset() } }, render: function (create) { @@ -94,7 +90,7 @@ export default {