From 9e57b0e45e45fe7fb26cee13df6f18f1f815d3a0 Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Tue, 23 Mar 2021 19:42:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E6=A1=A3=EF=BC=9A=E5=B0=86?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A0=8F=E4=B8=8A=E7=A7=BB=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E8=A1=8C=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 文档:将搜索栏上移,并减少行间距 --- .../components/document/ApiDocumentAnchor.vue | 51 +++++++++++++++---- .../components/list/ApiDocumentsPage.vue | 3 +- frontend/src/document/Document.vue | 3 +- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue b/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue index 7f6552d34c..25bcdd5c51 100644 --- a/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue +++ b/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue @@ -2,7 +2,7 @@
- + @@ -25,8 +25,32 @@ - + + + + + + + + + + + + + + + + + + + + + +
@@ -343,6 +367,7 @@ export default { projectId: String, documentId: String, moduleIds: Array, + sharePage:Boolean, pageHeaderHeight:Number, }, activated() { @@ -396,7 +421,7 @@ export default { }, changeFixed(clientHeight) { if (this.$refs.apiDocInfoDiv) { - let countPageHeight = 350; + let countPageHeight = 300; if(this.pageHeaderHeight!=0 && this.pageHeaderHeight != null){ countPageHeight = this.pageHeaderHeight } @@ -606,7 +631,7 @@ export default { //判断移动到了第几个元素. 公式: 移动过的高度+页面显示高度-第index子元素的高度(含20px)>0 的 index最大值 if(scrolledHeigh>0){ lastIndex = index; - let itemHeight = this.$refs.apiDocInfoDivItem[index].offsetHeight+20; + let itemHeight = this.$refs.apiDocInfoDivItem[index].offsetHeight+10; scrolledHeigh = scrolledHeigh - itemHeight; }else{ break; @@ -653,7 +678,7 @@ export default { this.currentApiIndexInApiShowArray++; }else{ this.apiShowArray.shift(); - let itemHeight = this.$refs.apiDocInfoDivItem[0].offsetHeight+20; + let itemHeight = this.$refs.apiDocInfoDivItem[0].offsetHeight+10; this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivScrollTop-itemHeight); } } @@ -670,7 +695,7 @@ export default { let itemHeightCount = 0; if(this.currentApiIndexInApiShowArray > 0){ for (let i = 0; i <= this.currentApiIndexInApiShowArray-1; i++) { - let itemHeight = this.$refs.apiDocInfoDivItem[i].offsetHeight+20; + let itemHeight = this.$refs.apiDocInfoDivItem[i].offsetHeight+10; itemHeightCount+=itemHeight; } } @@ -768,7 +793,7 @@ export default { .smallFontClass { font-size: 13px; - margin: 20px 10px; + margin: 20px 5px; } .tip { @@ -779,16 +804,20 @@ export default { } .apiInfoRow { - margin: 20px 10px; + margin: 10px 10px; +} + +.apiInfoRow.el-row { + margin: 10px 10px; } .apiStatusTag { - margin: 20px 5px; + margin: 10px 10px; } .showDataDiv { background-color: #F5F7F9; - margin: 20px 10px; + margin: 10px 10px; max-height: 300px; overflow: auto; } @@ -818,7 +847,7 @@ export default { } .document-table { - margin: 20px 10px; + margin: 10px 10px; width: auto; } diff --git a/frontend/src/business/components/api/definition/components/list/ApiDocumentsPage.vue b/frontend/src/business/components/api/definition/components/list/ApiDocumentsPage.vue index 23ba5cbb50..46a31eca18 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiDocumentsPage.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiDocumentsPage.vue @@ -1,7 +1,7 @@ @@ -16,6 +16,7 @@ export default { }, data() { return { + isSharePage:false, } }, props: { diff --git a/frontend/src/document/Document.vue b/frontend/src/document/Document.vue index f4354b4fa9..3cca730ffd 100644 --- a/frontend/src/document/Document.vue +++ b/frontend/src/document/Document.vue @@ -1,6 +1,6 @@ @@ -19,6 +19,7 @@ export default { documentId:"", projectId:"", pageHeaderHeight:100, + sharePage:true, moduleIds:[], } },