|
|
@ -8,7 +8,7 @@ |
|
|
|
:y="top" |
|
|
|
:w="width" |
|
|
|
:h="height" |
|
|
|
@click="activeComponent" |
|
|
|
@click.native="activeComponent" |
|
|
|
v-on:resizing="resize" |
|
|
|
v-on:dragging="resize" class="drag-container"> |
|
|
|
<div class="header"> |
|
|
@ -81,6 +81,7 @@ import VueDragResize from 'vue-drag-resize' |
|
|
|
height: Math.round(window.innerHeight * .6), |
|
|
|
top: Math.round(window.innerHeight * .2), |
|
|
|
left: Math.round(window.innerWidth * .2), |
|
|
|
// eslint-disable-next-line vue/no-reserved-keys |
|
|
|
_style: {}, // 缓存最大化之前的数据 |
|
|
|
}; |
|
|
|
}, |
|
|
@ -113,19 +114,11 @@ import VueDragResize from 'vue-drag-resize' |
|
|
|
$contentEl.style.height = window.innerHeight + 'px' |
|
|
|
} |
|
|
|
else { |
|
|
|
$dragEl.style.left = this._style.left |
|
|
|
$dragEl.style.top = this._style.top |
|
|
|
$dragEl.style.left = this._style.left + 'px' |
|
|
|
$dragEl.style.top = this._style.top + 'px' |
|
|
|
$contentEl.style.width = this._style.width + 'px' |
|
|
|
$contentEl.style.height = this._style.height + 'px' |
|
|
|
} |
|
|
|
return; |
|
|
|
this.isMax = !this.isMax; |
|
|
|
this.left = 0 |
|
|
|
this.top = 0 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.width = window.innerWidth |
|
|
|
this.height = window.innerHeight |
|
|
|
}) |
|
|
|
}, |
|
|
|
minisize() { |
|
|
|
console.log(this.dialog) |
|
|
|