Selaa lähdekoodia

提交一下(限制高度)

1
mo 4 vuotta sitten
vanhempi
commit
c3d57c3b3e

+ 1 - 0
public/html/index.html

@@ -28,6 +28,7 @@
 }
 
 .vsplitbar {
+  display: none!important;
     width: 3px;
     /*background: #B9B9B9;*/
     border-right: 1px solid #8f949a;

+ 1 - 3
src/constant/instructionList.js

@@ -34,9 +34,7 @@ export const instructionList = {
   '/teamList': '新建乐团',
   '/business/buildVip':'新建vip-乐理课',
   '/vipManager/vipList':'vip-乐理课进行中',
-  '/business/vipDetail':{
-    4:'进行中-休学'
-  },
+  '/business/vipDetail':"vip-乐理课进行中",
   '/accompanyManager/accompany':{
     1:'网管课进行中',
     2:'网管课购买'

+ 22 - 9
src/layout/components/instructions.vue

@@ -18,7 +18,7 @@
       @dragstop="resizestop"
       :preventActiveBehavior="true"
     >
-      <div class="wall"  ></div>
+      <div class="wall"></div>
       <div class="showBtnList">
         <el-popover placement="bottom" trigger="hover">
           <div class="popover-container" style="text-align: center">
@@ -120,6 +120,7 @@ export default {
     this.setBtnStatus(this.$route);
     // document.onfullscreenchange = this.resizeI;
     window.addEventListener("resize", this.resizeWindow);
+    // document.querySelector(".app-main").addEventListener("resize",this.resizeMain)
   },
   beforeDestroy() {},
   methods: {
@@ -153,6 +154,13 @@ export default {
       if (!this.fullscreen) {
         this.h = Math.abs(e.height);
         this.w = Math.abs(e.width);
+        if (e.top < 135) {
+          this.y = 135;
+          this.isShow = false;
+          this.$nextTick((res) => {
+            this.isShow = true;
+          });
+        }
       }
       setTimeout(() => {
         this.isResizing = false;
@@ -160,12 +168,10 @@ export default {
     },
 
     onResizing(e) {
-      // console.log(e)
       this.isResizing = true;
-      this.x = e.left
-      this.y = e.top
+      this.x = e.left;
+      this.y = e.top;
       if (e.top < 135) {
-        // console.log('来了')
         this.y = 135;
         // document.documentElement.querySelector("#instructions").style.top =
         //   "135px";
@@ -189,15 +195,18 @@ export default {
     fullPageBook() {
       this.isShow = false;
       this.$nextTick((res) => {
-        const bodyEle = document.querySelector(".app-main");
         this.h = this.docY - this.y;
-        // document.querySelector('#instructions .content-container').style.width = this.w+'px'
+        const bodyEle = document.querySelector(".app-main");
         this.w = bodyEle.clientWidth;
         this.x = 210;
         this.y = 135;
         this.isShow = true;
       });
     },
+    // resizeMain(){
+    //   //   const bodyEle = document.querySelector(".app-main");
+    //   // this.w =
+    // },
     async showInstructions() {
       this.initSize();
       if (!this.isShow) {
@@ -273,8 +282,6 @@ export default {
       console.log(this.isShowBtn);
       this.$emit("checkShow", this.isShowBtn);
     },
-    showFullPage() {},
-    resetVideo() {},
     gotoIns() {
       let str = this.url.replace("&c=1", "");
       this.$router.push({
@@ -298,6 +305,12 @@ export default {
 
     fullscreen() {
       const bodyEle = document.querySelector(".app-main");
+      console.log(
+        this.h == this.docY - this.y,
+        this.w == bodyEle.clientWidth,
+        this.x == 210,
+        this.y == 135
+      );
       // this.h = this.docY - this.y;
       return (
         this.h == this.docY - this.y &&