@@ -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');
})
},