star7th 5 years ago
parent
commit
c1ba09370a

+ 1 - 1
web/index.html

@@ -16,4 +16,4 @@
       "server": window.location.protocol +'//'+ window.location.host + window.location.pathname+ '../server/index.php?s=',
       //"lang" :'en'
       "lang" :'zh-cn'
-  }</script><link href=./static/css/app.ded56d23f399d7e850180627671b2d75.css rel=stylesheet></head><body class=grey-bg><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.a6098e82988b4636789a.js></script><script type=text/javascript src=./static/js/app.697e6e6d652c51780baf.js></script></body></html>
+  }</script><link href=./static/css/app.bc5c26e28db91319fec250f4b17a4652.css rel=stylesheet></head><body class=grey-bg><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.a6098e82988b4636789a.js></script><script type=text/javascript src=./static/js/app.00f6c109f18b125a7603.js></script></body></html>

File diff suppressed because it is too large
+ 0 - 0
web/static/css/app.bc5c26e28db91319fec250f4b17a4652.css


File diff suppressed because it is too large
+ 0 - 0
web/static/css/app.ded56d23f399d7e850180627671b2d75.css


File diff suppressed because it is too large
+ 0 - 0
web/static/js/app.00f6c109f18b125a7603.js


File diff suppressed because it is too large
+ 0 - 0
web/static/js/app.697e6e6d652c51780baf.js


+ 39 - 5
web_src/src/components/item/show/show_regular_item/Index.vue

@@ -16,10 +16,20 @@
       </div>
 
       <div id="right-side">
-        <div id="p-content">
+        <div
+          id="p-content"
+          @mouseenter="showfullPageBtn = true"
+          @mouseleave="showfullPageBtn = false"
+        >
           <div class="doc-title-box" id="doc-title-box">
             <span id="doc-title-span" class="dn"></span>
             <h2 id="doc-title">{{page_title}}</h2>
+            <i
+              class="el-icon-full-screen"
+              id="full-page"
+              v-show="showfullPageBtn"
+              @click="clickFullPage"
+            ></i>
             <el-badge
               :value="attachment_count"
               class="item"
@@ -47,7 +57,7 @@
     </div>
 
     <BackToTop></BackToTop>
-    <Toc v-if="page_id"></Toc>
+    <Toc v-if="page_id && showToc"></Toc>
 
     <!-- 附件列表 -->
     <AttachmentList
@@ -89,7 +99,10 @@ export default {
       qr_item_link: '',
       page_info: '',
       copyText: '',
-      attachment_count: ''
+      attachment_count: '',
+      fullPage: false,
+      showfullPageBtn: false,
+      showToc: true
     }
   },
   components: {
@@ -115,7 +128,7 @@ export default {
       that.axios.post(url, params).then(function(response) {
         // loading.close();
         if (response.data.error_code === 0) {
-           that.content = rederPageContent(response.data.data.page_content)
+          that.content = rederPageContent(response.data.data.page_content)
 
           that.page_title = response.data.data.page_title
           that.page_info = response.data.data
@@ -148,6 +161,7 @@ export default {
       header.style.height = '10px'
       var docTitle = document.getElementById('doc-title-box')
       docTitle.style.marginTop = '40px'
+      this.showToc = false
     },
     // 根据屏幕宽度进行响应。应对小屏幕pc设备(如笔记本)的访问
     adaptToSmallpc() {
@@ -179,6 +193,19 @@ export default {
     ShowAttachment() {
       let childRef = this.$refs.AttachmentList // 获取子组件
       childRef.show()
+    },
+    clickFullPage() {
+      // 点击放大页面。由于历史包袱,只能操作dom。这是不规范的,但是现在没时间重构整块页面
+      if (this.fullPage) {
+        // 整体刷新还原
+        window.location.reload()
+      } else {
+        this.adaptToMobile()
+        $('#left-side').hide()
+        $('.op-bar').hide()
+      }
+      this.get_page_content(this.page_id)
+      this.fullPage = !this.fullPage
     }
   },
   mounted() {
@@ -211,7 +238,14 @@ export default {
   cursor: pointer;
   color: #abd1f1;
 }
-
+#full-page {
+  float: right;
+  font-size: 25px;
+  margin-top: -50px;
+  margin-right: 30px;
+  cursor: pointer;
+  color: #ccc;
+}
 #page_md_content {
   padding: 10px 10px 90px 10px;
   overflow: hidden;

Some files were not shown because too many files changed in this diff