|
@@ -434,6 +434,7 @@
|
|
|
background: bgColorList[activeIndex].contentInnerBg,
|
|
|
borderColor: bgColorList[activeIndex].glossaryBg,
|
|
|
}"
|
|
|
+ ref="mene"
|
|
|
>
|
|
|
<menu-right
|
|
|
:colorObj="bgColorList[activeIndex]"
|
|
@@ -478,7 +479,11 @@
|
|
|
<span id="copyDownUrl">{{ share_url }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="catalog-box" v-if="menuFeature === 'list'">
|
|
|
+ <div
|
|
|
+ class="catalog-box"
|
|
|
+ v-if="menuFeature === 'list' && menuShow"
|
|
|
+ ref="catalog"
|
|
|
+ >
|
|
|
<ul class="treeList">
|
|
|
<li v-for="(item, index) in issueChnList" :key="index">
|
|
|
<p class="parent-node">
|
|
@@ -1041,6 +1046,7 @@ export default {
|
|
|
loading: false,
|
|
|
menuType: "original",
|
|
|
menuFeature: "", // 功能
|
|
|
+ menuShow: true, // 展示目录
|
|
|
shareSrc: "", // 分享图片
|
|
|
share_url: "", // 分享链接
|
|
|
shareLoading: false,
|
|
@@ -1635,6 +1641,7 @@ export default {
|
|
|
type === "cloud" ||
|
|
|
type === "chart"
|
|
|
) {
|
|
|
+ this.menuShow = true;
|
|
|
if (type === "share" || type === "cloud" || type === "print") {
|
|
|
if (this.userMessage) {
|
|
|
if (type === "cloud") {
|
|
@@ -1856,6 +1863,18 @@ export default {
|
|
|
closePrint() {
|
|
|
this.printFlag = false;
|
|
|
},
|
|
|
+ handleClickOutside(event) {
|
|
|
+ const catalog = this.$refs.catalog;
|
|
|
+ const mene = this.$refs.mene;
|
|
|
+ if (
|
|
|
+ (catalog && catalog.contains(event.target)) ||
|
|
|
+ (mene && mene.contains(event.target))
|
|
|
+ ) {
|
|
|
+ this.menuShow = true;
|
|
|
+ } else {
|
|
|
+ this.menuShow = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
if (this.config) {
|
|
@@ -1880,11 +1899,13 @@ export default {
|
|
|
this_.timer = setInterval(() => {
|
|
|
this_.readLength++;
|
|
|
}, 1000);
|
|
|
+ document.addEventListener("click", this.handleClickOutside);
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
if (this.support) {
|
|
|
this.handleReadArticle();
|
|
|
}
|
|
|
+ document.removeEventListener("click", this.handleClickOutside);
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -2188,7 +2209,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.catalog-box {
|
|
|
- right: calc((100% - 1000px) / 2);
|
|
|
+ right: 162px;
|
|
|
left: auto;
|
|
|
margin-left: auto;
|
|
|
.treeList {
|