mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
笔记的高度问题
This commit is contained in:
@@ -14,14 +14,14 @@
|
||||
</div>
|
||||
<div class="newcote-text">
|
||||
<el-input type="textarea" :autofocus="true" :style="`min-height:${inputHeight}px`" placeholder="好记性不如烂笔头,记录些什么吧~"
|
||||
v-model="content_new" maxlength="200" :autosize="{ minRows: 2, maxRows: 20}"
|
||||
v-model="content_new" maxlength="200" :autosize="{ minRows: inputRows, maxRows: 20}"
|
||||
show-word-limit>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 我的笔记 -->
|
||||
<div v-if="notetab == 2">
|
||||
<div class="mycote-content" v-show="!isEdit" :style="`height:${inputHeight+100}px`">
|
||||
<div class="mycote-content" v-show="!isEdit" :style="`height:${listHeight}px`">
|
||||
<div v-if="noteList.length > 0">
|
||||
<div style="border-bottom:1px solid #4444;padding-bottom:25px;" v-for="note in noteList"
|
||||
:key="note.id">
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -602,11 +602,17 @@
|
||||
this.$nextTick(function(){
|
||||
//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');
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user