|
@@ -57,14 +57,14 @@ const getDocument=(id)=>{
|
|
|
defaultActiveId.value = id
|
|
|
helpDocument.value=res.data || {}
|
|
|
Content.value = helpDocument.value.Content + createBottomHref(helpDocument.value.Recommend)
|
|
|
- if(helpDocument.value?.Anchor?.length>0){
|
|
|
- isRightFold.value=false
|
|
|
- hasAnchorData.value=true
|
|
|
- }else{
|
|
|
- isRightFold.value=true
|
|
|
- hasAnchorData.value=false
|
|
|
- }
|
|
|
-
|
|
|
+ // if(helpDocument.value?.Anchor?.length>0){
|
|
|
+ // isRightFold.value=false
|
|
|
+ // hasAnchorData.value=true
|
|
|
+ // }else{
|
|
|
+ // isRightFold.value=true
|
|
|
+ // hasAnchorData.value=false
|
|
|
+ // }
|
|
|
+ console.log(helpDocument.value?.Anchor);
|
|
|
setTimeout(()=>{
|
|
|
scrollTopList.value=[]
|
|
|
getScrollTopList(helpDocument.value.Anchor || [])
|
|
@@ -83,8 +83,8 @@ const getDocument=(id)=>{
|
|
|
}
|
|
|
}else if(res.code == 4001){
|
|
|
helpDocument.value={}
|
|
|
- isRightFold.value=true
|
|
|
- hasAnchorData.value=false
|
|
|
+ // isRightFold.value=true
|
|
|
+ // hasAnchorData.value=false
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -242,8 +242,9 @@ const scrollChange=()=>{
|
|
|
</div>
|
|
|
<div class="document-body-right" :style="{'max-width': isRightFold?'0':'300px'}">
|
|
|
<div class="body-right-box">
|
|
|
+ <div class="anchor-box-title">本篇目录</div>
|
|
|
<el-tree :data="helpDocument.Anchor" node-key="AnchorId" @current-change="menuChange" class="right-anchor-tree"
|
|
|
- ref="rightTreeRef" :props="treeProp" :current-node-key="currentNodeKey" icon="none" empty-text="暂无数据"
|
|
|
+ ref="rightTreeRef" :props="treeProp" :current-node-key="currentNodeKey" icon="none" empty-text=""
|
|
|
default-expand-all :expand-on-click-node="false" >
|
|
|
<template #default="{ node, data }">
|
|
|
<a @click="(e)=>navigate(e,'#'+data.Anchor)" class="custom-tree-node" v-html="data.AnchorName"
|
|
@@ -252,7 +253,7 @@ const scrollChange=()=>{
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="fold-right-icon" @click="isRightFold=!isRightFold" v-if="hasAnchorData">
|
|
|
+ <div class="fold-right-icon" @click="isRightFold=!isRightFold">
|
|
|
<img src="@/assets/img/icon/fold.png" v-show="!isRightFold" />
|
|
|
<img src="@/assets/img/icon/unfold.png" v-show="isRightFold" />
|
|
|
</div>
|
|
@@ -355,8 +356,16 @@ const scrollChange=()=>{
|
|
|
box-sizing: border-box;
|
|
|
align-self: flex-start;
|
|
|
.body-right-box{
|
|
|
- padding: 12px 24px 24px;
|
|
|
+ padding: 0 24px 24px;
|
|
|
box-sizing: border-box;
|
|
|
+ .anchor-box-title{
|
|
|
+ font-size: 18px;
|
|
|
+ line-height: 25px;
|
|
|
+ color: #333333;
|
|
|
+ font-weight: bold;
|
|
|
+ white-space: nowrap;
|
|
|
+ margin-bottom: 40px;
|
|
|
+ }
|
|
|
.custom-tree-node{
|
|
|
padding: 8px 12px;
|
|
|
font-size: 14px;
|