From c181655b8d91dcd350506bba519e53fe01ba43bf Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 18 Oct 2022 09:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=94=E8=AE=B0=E7=9A=84=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/myNote.vue | 22 +++++++++++++++++----- src/views/study/coursenew.vue | 12 +++++++++--- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index e9bbccfb..7feac19e 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -14,14 +14,14 @@
-
+
@@ -123,6 +123,8 @@ export default { inAnimationText:'笔记保存成功,U币+2', isEdit:false, inputHeight:70, + listHeight:170, + inputRows:2, courseId:'', inAnimation: false, btnPlayTime:false,//是否显示添加视频时间 @@ -157,8 +159,18 @@ export default { watch: { //内容的高度 height(val){ - this.inputHeight=(val-185); - console.log(this.inputHeight,'this.inputHeight'); + + //$this.controlHeight=h- + this.listHeight=val-95; + this.inputHeight=(val-220); + + this.inputRows=parseInt(this.inputHeight/30); + if(this.inputRows>20){ + this.inputRows=20; + } + + //console.log(this.inputHeight,this.inputRows,this.listHeight,'my note height'); + if(this.inputHeight>500){ this.inputHeight=500; } @@ -482,7 +494,7 @@ export default { margin: 30px 0px; box-sizing: border-box; padding: 8px 30px; - min-height: 300px; + min-height: 200px; overflow-y: auto; background-color: #fff; diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 4d024308..6d8d6b29 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -600,13 +600,19 @@ this.$nextTick(function(){ - //let h0=document.getElementById('id_course_player').offsetHeight; + //let h0=document.getElementById('id_course_player').offsetHeight; let h=$this.$refs.coursePlayer.offsetHeight; + //let h1=$this.$refs.coursePlayer.clientHeight; ///console.log(h0,h,$this.controlHeight,'$this.controlHeight'); - //按高度 + //解决获取高度不正的问题 + if(h>400 && h<500){ + h=h+40; + }else if(h>500){ + h=h+60; + } //$this.controlHeight=h-99; $this.controlHeight=h-95; - console.log(h,$this.controlHeight,'$this.controlHeight'); + //console.log(h,$this.controlHeight,'$this.controlHeight'); }) },