Browse Source

修复弹窗层级点击激活的问题

master
Poised_flw 4 years ago
parent
commit
b0f2991f20
  1. 2
      src/tis_app_template_kt/public/esplug.json
  2. 1
      src/tis_app_template_kt/src/components/Dialog/DialogPc.vue
  3. 15
      src/tis_app_template_kt/src/components/Dialog/Pc.vue
  4. 2
      src/tis_app_template_kt/src/tis/bus.js
  5. 1
      src/tis_app_template_kt/src/tis/index.js

2
src/tis_app_template_kt/public/esplug.json

@ -49,7 +49,7 @@
"title": "底1", "title": "底1",
"name": "底1", "name": "底1",
"component": "GlobalStateExample", "component": "GlobalStateExample",
"type": "BottomWidget"
"type": "PopupWidget"
}, },
{ {
"name": "图层管理", "name": "图层管理",

1
src/tis_app_template_kt/src/components/Dialog/DialogPc.vue

@ -18,6 +18,7 @@ export default {
async get() { async get() {
const list = this.$tis.getActivesByType('PopupWidget') const list = this.$tis.getActivesByType('PopupWidget')
for (let component of list) { for (let component of list) {
if (!component.lazy) continue;
if (typeof component.component === 'string') { if (typeof component.component === 'string') {
await this.$tis.loadComponent(component.component) await this.$tis.loadComponent(component.component)
} }

15
src/tis_app_template_kt/src/components/Dialog/Pc.vue

@ -8,7 +8,7 @@
:y="top" :y="top"
:w="width" :w="width"
:h="height" :h="height"
@click="activeComponent"
@click.native="activeComponent"
v-on:resizing="resize" v-on:resizing="resize"
v-on:dragging="resize" class="drag-container"> v-on:dragging="resize" class="drag-container">
<div class="header"> <div class="header">
@ -81,6 +81,7 @@ import VueDragResize from 'vue-drag-resize'
height: Math.round(window.innerHeight * .6), height: Math.round(window.innerHeight * .6),
top: Math.round(window.innerHeight * .2), top: Math.round(window.innerHeight * .2),
left: Math.round(window.innerWidth * .2), left: Math.round(window.innerWidth * .2),
// eslint-disable-next-line vue/no-reserved-keys
_style: {}, // _style: {}, //
}; };
}, },
@ -113,19 +114,11 @@ import VueDragResize from 'vue-drag-resize'
$contentEl.style.height = window.innerHeight + 'px' $contentEl.style.height = window.innerHeight + 'px'
} }
else { 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.width = this._style.width + 'px'
$contentEl.style.height = this._style.height + '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() { minisize() {
console.log(this.dialog) console.log(this.dialog)

2
src/tis_app_template_kt/src/tis/bus.js

@ -172,7 +172,7 @@ const bus = new Vue({
// 激活窗口 // 激活窗口
activeComponent(component) { 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 maxZIndex = Math.max.apply(Math, this.actives.map(function(o) { return o.zIndex; }))
const maxComponent = this.actives.find(v => v.zIndex === maxZIndex) const maxComponent = this.actives.find(v => v.zIndex === maxZIndex)
if (curComponent === maxComponent) return; if (curComponent === maxComponent) return;

1
src/tis_app_template_kt/src/tis/index.js

@ -119,6 +119,7 @@ export async function mount(props = {}) {
// console.log("---", window.esapp) // console.log("---", window.esapp)
bus.openComponentByMenu(['kt_zzgl_datapackaging']) bus.openComponentByMenu(['kt_zzgl_datapackaging'])
bus.openComponentByMenu(['GlobalStateExample'])
} }
/** /**

Loading…
Cancel
Save