|
@@ -49,13 +49,13 @@
|
|
|
<div>
|
|
|
<el-row>
|
|
|
<el-col :span="4">
|
|
|
- <el-anchor :container="getContainerRef(item.index)" direction="vertical" type="default" :offset="30" @click="handleClick1">
|
|
|
- <el-anchor-link :href="sub_item.href" :title="sub_item.title" :name="sub_item.id" v-for="(sub_item, index) in item.items" :key="index"/>
|
|
|
+ <el-anchor :container="`containerRef${index}`" direction="vertical" type="default" :offset="30" @click="handleClick1">
|
|
|
+ <el-anchor-link :href="sub_item.href" :title="sub_item.title" :name="sub_item.id" v-for="(sub_item, index2) in item.items" :key="index2"/>
|
|
|
</el-anchor>
|
|
|
</el-col>
|
|
|
<el-col :span="20">
|
|
|
- <div :ref="(el) => { creatRef(el, item.index) }" style="height: 400px; overflow-y: auto">
|
|
|
- <div :id="sub_item.id" style="height: auto; margin-top: 15px; font-size: 14px" v-for="(sub_item, index) in item.items" :key="index">
|
|
|
+ <div :ref="`containerRef${index}`" style="height: 400px; overflow-y: auto">
|
|
|
+ <div :id="sub_item.id" style="height: auto; margin-top: 15px; font-size: 14px" v-for="(sub_item, index3) in item.items" :key="index3">
|
|
|
<h3 style="font-weight: 600">{{ sub_item.title }}</h3>
|
|
|
<span v-html="sub_item.value"></span>
|
|
|
</div>
|
|
@@ -74,20 +74,8 @@ import { ref } from 'vue';
|
|
|
import type { TabsPaneContext } from 'element-plus';
|
|
|
import { getDoc } from '@/api/riskPrevention/planManage';
|
|
|
|
|
|
-const containerRef = ref<HTMLElement | null>(null);
|
|
|
-const containerRefs = ref([]);
|
|
|
+// const containerRef = ref<HTMLElement | null>(null);
|
|
|
const doc_items = ref([]);
|
|
|
-
|
|
|
-const creatRef = (el, index) => {
|
|
|
- if (el) {
|
|
|
- containerRefs.value[index] = el;
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-const getContainerRef = (index) => {
|
|
|
- return containerRefs.value[index];
|
|
|
-}
|
|
|
-
|
|
|
const props = defineProps({
|
|
|
id: String
|
|
|
});
|