From 3b152363173cd92376d0aab3ab257a2b9f783aa2 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期四, 10 九月 2020 13:26:09 +0800
Subject: [PATCH] 修复应用窗口最大化后拖拽还原没有复位的bug
---
src/pages/desktop/index/components/DFrame.vue | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/pages/desktop/index/components/DFrame.vue b/src/pages/desktop/index/components/DFrame.vue
index 2df51c1..c4eac1d 100644
--- a/src/pages/desktop/index/components/DFrame.vue
+++ b/src/pages/desktop/index/components/DFrame.vue
@@ -7,7 +7,7 @@
@contextmenu.prevent="openMenuList($event.offsetY,$event.offsetX,data)"
v-bind:style="{left: data.leftOffset + 'px', top: data.topOffset + 'px', 'z-index': 125 + data.order, width: width + 'px', height: height + 'px'}"
>
- <div class="d-frame-title" v-drag @click="frameClick">
+ <div class="d-frame-title" v-drag='fullScreen' @click="frameClick">
<div class="d-frame-title-operation">
<i class="icon-minus d-frame-operation-minus" @click="minFrame(data,$event)">
<img :src="`${publicPath}images/desktop/header-icon/min.png`" alt />
@@ -195,12 +195,13 @@
},
directives: {
- drag(el) {
-
- if (el.dragLock) {
+ drag(el, binding) {
+ if (el.dragLock || binding.arg) {
return
}
el.onmousedown = function (e) {
+ console.log('binding',binding)
+ if(binding.value) return;
el.dragLock = true;
let disx = e.clientX - el.parentElement.offsetLeft;
let disy = e.clientY - el.parentElement.offsetTop;
@@ -223,6 +224,7 @@
toTop = document.body.getBoundingClientRect().height - 31;
}
el.parentElement.style.top = toTop + 'px';
+
};
document.onmouseup = function () {
el.dragLock = false;
--
Gitblit v1.8.0