课程学习,右边高度随着内容变化自动变化

This commit is contained in:
daihh
2022-10-17 21:26:31 +08:00
5 changed files with 81 additions and 33 deletions

View File

@@ -46,6 +46,7 @@
</div>
</div>
<div v-if="!scoreInfo.has" class="player-rate">
<el-rate v-model="scoreInfo.score" text-color="#ff9900" score-template="{value}" void-color="#fff" @change="addScore"></el-rate>
</div>
<div v-if="scoreInfo.has" style="padding-top: 5px;display: flex;">
@@ -116,6 +117,7 @@
</div>
<!-- 课程单元 -->
<div class="course-units" v-if="tab == 1">
<div :style="`height: ${controlHeight}px;overflow-y: auto;`">
<div class="catalog" v-if="courseInfo.type == 20">
<div v-for="(item, index) in catalogTree" :key="index" :name="index">
@@ -178,8 +180,7 @@
<div class="teacher" v-for="(item, idx) in teachers" :key="idx">
<div class="teacher-avator">
<!-- <div class="teacher-text" v-if="item.authorInfo.avatar == ''">{{userAvatarText(item.teacherName)}}</div> -->
<div v-if="item.authorInfo.avatar !== ''">
<el-avatar :src="fileBaseUrl + item.authorInfo.avatar" shape="circle" :size="50"></el-avatar>
</div>
<div v-else class="teacher-text">
<div v-if="item.authorInfo.sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
@@ -306,7 +307,7 @@
totalContent: 0, //课程内容数量
pageCount: 0,
currentPage: 0,
fileBaseUrl: this.$xpage.constants.fileBaseUrl,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
contentList: [],
sectionList: [],
teachers: [],
@@ -340,13 +341,7 @@
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
this.courseId = this.$route.query.id;
this.loadData();
var $this = this;
// window.onresize = function(){ // 定义窗口大小变更通知事件
// let w2=$this.$refs.coursePlayer.offsetWidth;
// //按高度
// $this.controlHeight=w2*(9/16);
// //console.log(w,w2,'区域的高茺');
// };
},
computed: {
...mapGetters(['userInfo']),
@@ -385,11 +380,16 @@
},
methods: {
Fn1(){
<<<<<<< .mine
//console.log('子组件发生变化');
// this.componentKey += 1;
=======
console.log('子组件发生变化');
// this.componentKey += 1;
>>>>>>> .theirs
// this.$forceUpdate();
// window.location.reload()
// this.coutab(3);
this.timer = new Date().getTime()
},
@@ -782,6 +782,9 @@
res.result.some(author => {
if (author.aid == item.teacherId) {
item.authorInfo = author;
if(author.avatar){
item.avatar=this.fileBaseUrl + author.avatar;
}
return true;
} else {
return false;
@@ -1300,6 +1303,7 @@
//内容块样式定义
.course-content {
min-height: 745px;
margin: 20px auto;
.course-playbox {
background-color: #fff;
@@ -1309,6 +1313,7 @@
.course-player{ //内容播放区域
flex:1;
min-width: 700px;
min-height: 500px;
height: 100%;
border: 1px solid #ffffff;
@@ -1327,6 +1332,7 @@
.course-info {
flex:1;
min-width: 700px;
min-height: 710px;
box-sizing: border-box;
padding-right: 20px;
@@ -1549,6 +1555,7 @@
}
.con-audio-player {
padding: 50px 50px;
}
}