Commit 959995fe by 前端

Merge branch 'v1.73.0' into 'master'

上线合并

See merge request !37
2 parents 24876580 b9df1836
Pipeline #42 for 959995fe failed in 0 seconds
<template>
<el-main
id="glsxRightSide"
class="glsx-right-side"
:style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
>
<el-breadcrumb>
<el-breadcrumb-item class="breadcrumb-item"
:class="{active: index === breadCrumbList.length - 1, pointer: item.path}"
v-for="(item, index) in breadCrumbList"
:key="index"
@click="routerGo(item, item.path || '/noData')">
{{item.name}}
</el-breadcrumb-item>
</el-breadcrumb>
<div v-show="showEmpty">
<el-empty description="暂无数据" :image-size="imgSize"></el-empty>
</div>
<div v-show="!showEmpty" id="sub-system-frame" ref="elmSubMicro"></div>
</el-main>
<el-main id="glsxRightSide"
class="glsx-right-side"
:style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }">
<el-breadcrumb>
<el-breadcrumb-item class="breadcrumb-item"
:class="{active: index === breadCrumbList.length - 1, pointer: item.path}"
v-for="(item, index) in breadCrumbList"
:key="index"
@click="routerGo(item, item.path || '/noData')">
{{item.name}}
</el-breadcrumb-item>
</el-breadcrumb>
<div v-show="showEmpty">
<el-empty description="暂无数据"
:image-size="imgSize"></el-empty>
</div>
<div v-show="!showEmpty"
id="sub-system-frame"
ref="elmSubMicro"></div>
</el-main>
</template>
<script>
......@@ -39,13 +40,25 @@ export default {
// 监听子系统挂载的元素内容变化
const subMircroEle = document.getElementById('sub-system-frame');
subMircroEle.addEventListener('DOMNodeInserted', function (e) {
const target = e.currentTarget,
tarInner = target.innerHTML;
if (!state.el_sub_innerH !== !tarInner) {
state.el_sub_innerH = target.innerHTML;
}
})
// subMircroEle.addEventListener('DOMNodeInserted', function (e) {
// const target = e.currentTarget,
// tarInner = target.innerHTML;
// if (!state.el_sub_innerH !== !tarInner) {
// state.el_sub_innerH = target.innerHTML;
// }
// })
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.type === 'childList') {
const tarInner = subMircroEle.innerHTML;
if (state.el_sub_innerH !== tarInner) {
state.el_sub_innerH = tarInner;
}
}
});
});
observer.observe(subMircroEle, { childList: true, subtree: true });
})
const showEmpty = computed(() => {
......@@ -104,7 +117,7 @@ export default {
}
</style>
<style lang="less" scoped>
@import "styles/variables.less";
@import 'styles/variables.less';
.glsx-right-side {
position: relative;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!