From b0f2991f207fd495fcefc41d5f28387d2becca04 Mon Sep 17 00:00:00 2001 From: Poised_flw Date: Mon, 1 Nov 2021 16:04:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=B9=E7=AA=97=E5=B1=82?= =?UTF-8?q?=E7=BA=A7=E7=82=B9=E5=87=BB=E6=BF=80=E6=B4=BB=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tis_app_template_kt/public/esplug.json | 2 +- .../src/components/Dialog/DialogPc.vue | 1 + .../src/components/Dialog/Pc.vue | 15 ++++----------- src/tis_app_template_kt/src/tis/bus.js | 2 +- src/tis_app_template_kt/src/tis/index.js | 1 + 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/tis_app_template_kt/public/esplug.json b/src/tis_app_template_kt/public/esplug.json index 8df3368..96f63f0 100644 --- a/src/tis_app_template_kt/public/esplug.json +++ b/src/tis_app_template_kt/public/esplug.json @@ -49,7 +49,7 @@ "title": "底1", "name": "底1", "component": "GlobalStateExample", - "type": "BottomWidget" + "type": "PopupWidget" }, { "name": "图层管理", diff --git a/src/tis_app_template_kt/src/components/Dialog/DialogPc.vue b/src/tis_app_template_kt/src/components/Dialog/DialogPc.vue index 14f8892..60b3007 100644 --- a/src/tis_app_template_kt/src/components/Dialog/DialogPc.vue +++ b/src/tis_app_template_kt/src/components/Dialog/DialogPc.vue @@ -18,6 +18,7 @@ export default { async get() { const list = this.$tis.getActivesByType('PopupWidget') for (let component of list) { + if (!component.lazy) continue; if (typeof component.component === 'string') { await this.$tis.loadComponent(component.component) } diff --git a/src/tis_app_template_kt/src/components/Dialog/Pc.vue b/src/tis_app_template_kt/src/components/Dialog/Pc.vue index d61f6d2..317a8a5 100644 --- a/src/tis_app_template_kt/src/components/Dialog/Pc.vue +++ b/src/tis_app_template_kt/src/components/Dialog/Pc.vue @@ -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">
@@ -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) diff --git a/src/tis_app_template_kt/src/tis/bus.js b/src/tis_app_template_kt/src/tis/bus.js index 08cbd76..6aeee53 100644 --- a/src/tis_app_template_kt/src/tis/bus.js +++ b/src/tis_app_template_kt/src/tis/bus.js @@ -172,7 +172,7 @@ const bus = new Vue({ // 激活窗口 activeComponent(component) { - const curComponent = this.actives.find(v => (c.component.name || c.component) === component) + const curComponent = this.actives.find(v => (v.component.name || v.component) === component) const maxZIndex = Math.max.apply(Math, this.actives.map(function(o) { return o.zIndex; })) const maxComponent = this.actives.find(v => v.zIndex === maxZIndex) if (curComponent === maxComponent) return; diff --git a/src/tis_app_template_kt/src/tis/index.js b/src/tis_app_template_kt/src/tis/index.js index 9868b4d..69dd230 100644 --- a/src/tis_app_template_kt/src/tis/index.js +++ b/src/tis_app_template_kt/src/tis/index.js @@ -119,6 +119,7 @@ export async function mount(props = {}) { // console.log("---", window.esapp) bus.openComponentByMenu(['kt_zzgl_datapackaging']) + bus.openComponentByMenu(['GlobalStateExample']) } /**