|
@@ -17,13 +17,16 @@
|
|
</div>
|
|
</div>
|
|
</el-header>
|
|
</el-header>
|
|
<el-main style="overflow: auto;">
|
|
<el-main style="overflow: auto;">
|
|
- <div class="height_100 claim" v-loading="loading" v-if="!checkedRightTree" :style="setStyle()" >
|
|
|
|
|
|
+ <div class="height_100" v-loading="loading" v-if="!checkedRightTree" :style="setStyle()" >
|
|
<template v-if="name != 2">
|
|
<template v-if="name != 2">
|
|
<div class="height_100" v-html="getViewDom(this[tabItem.field], '权利要求'+tabItem.label, 'column')" :data-type="name == 2?'权利要求原文':'权利要求'+tabItem.label" ></div>
|
|
<div class="height_100" v-html="getViewDom(this[tabItem.field], '权利要求'+tabItem.label, 'column')" :data-type="name == 2?'权利要求原文':'权利要求'+tabItem.label" ></div>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <div v-equal_heights="'yiwen'" class="height_100" v-html="getViewDom(this[tabItem.field], '权利要求'+tabItem.label, 'column')" :data-type="name == 2?'权利要求原文':'权利要求'+tabItem.label" ref="yuanwen"></div>
|
|
|
|
- <div class="height_100" v-html="getViewDom(contentOut, '权利要求译文', 'column')" :data-type="'权利要求译文'" ref="yiwen"></div>
|
|
|
|
|
|
+ <div class="height_100 claim">
|
|
|
|
+ <div v-equal_heights="'yiwen'" class="height_100" v-html="getViewDom(this[tabItem.field], '权利要求'+tabItem.label, 'column')" :data-type="name == 2?'权利要求原文':'权利要求'+tabItem.label" ref="yuanwen"></div>
|
|
|
|
+ <div class="height_100" v-html="getViewDom(contentOut, '权利要求译文', 'column')" :data-type="'权利要求译文'" ref="yiwen"></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -69,17 +72,29 @@ export default {
|
|
var that = vnode.context
|
|
var that = vnode.context
|
|
// 获取另一个容器的引用
|
|
// 获取另一个容器的引用
|
|
const otherContainerSelector = binding.value;
|
|
const otherContainerSelector = binding.value;
|
|
-
|
|
|
|
|
|
+
|
|
that.$nextTick(()=>{
|
|
that.$nextTick(()=>{
|
|
const otherContainer = that.$refs[otherContainerSelector];
|
|
const otherContainer = that.$refs[otherContainerSelector];
|
|
if (!otherContainer) {
|
|
if (!otherContainer) {
|
|
console.error('Unable to find the other container');
|
|
console.error('Unable to find the other container');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ window.addEventListener("resize",that.$commonJS.debounce(()=>{
|
|
|
|
+ const children = el.children;
|
|
|
|
+ const otherChildren = otherContainer.children;
|
|
|
|
+ for (let i = 0; i < children.length && i < otherChildren.length; i++) {
|
|
|
|
+ children[i].style.height = 'auto';
|
|
|
|
+ otherChildren[i].style.height = 'auto';
|
|
|
|
+ const maxHeight = Math.max(children[i].offsetHeight, otherChildren[i].offsetHeight);
|
|
|
|
+ children[i].style.height = maxHeight + 'px';
|
|
|
|
+ otherChildren[i].style.height = maxHeight + 'px';
|
|
|
|
+ otherChildren[i].style.background = '#f3f4f8';
|
|
|
|
+ }
|
|
|
|
+ },500))
|
|
// 遍历当前容器和另一个容器的子div,并设置对应索引的高度
|
|
// 遍历当前容器和另一个容器的子div,并设置对应索引的高度
|
|
const children = el.children;
|
|
const children = el.children;
|
|
- const otherChildren = otherContainer.children;
|
|
|
|
|
|
+ const otherChildren = otherContainer.children;
|
|
for (let i = 0; i < children.length && i < otherChildren.length; i++) {
|
|
for (let i = 0; i < children.length && i < otherChildren.length; i++) {
|
|
const maxHeight = Math.max(children[i].offsetHeight, otherChildren[i].offsetHeight);
|
|
const maxHeight = Math.max(children[i].offsetHeight, otherChildren[i].offsetHeight);
|
|
children[i].style.height = maxHeight + 'px';
|
|
children[i].style.height = maxHeight + 'px';
|
|
@@ -92,6 +107,17 @@ export default {
|
|
componentUpdated(el, binding) {
|
|
componentUpdated(el, binding) {
|
|
// 这里可能需要额外的逻辑来处理更新后的高度同步
|
|
// 这里可能需要额外的逻辑来处理更新后的高度同步
|
|
},
|
|
},
|
|
|
|
+ unbind(el) {
|
|
|
|
+ var eventListener = window.eventListeners_
|
|
|
|
+ if(!eventListener){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ const listeners = eventListener.resize
|
|
|
|
+ if(listeners){
|
|
|
|
+ window.removeEventListener("resize");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -792,6 +818,8 @@ export default {
|
|
// overflow: auto;
|
|
// overflow: auto;
|
|
padding: 0 5px;
|
|
padding: 0 5px;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
</style>
|
|
</style>
|