mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
课程笔记含有图片支持图片放大。
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<template v-for="img in item.content">
|
<template v-for="img in item.content">
|
||||||
<img :src="fileBaseUrl + img" alt=""/>
|
<img @click="showBigImg(fileBaseUrl + img)" :src="fileBaseUrl + img" alt=""/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -167,6 +167,14 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 图片放大框 -->
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisibleBigImage"
|
||||||
|
:close-on-click-modal="true"
|
||||||
|
width="30%">
|
||||||
|
<img :src="currentImagePath" style="width: 100%;" />
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -186,6 +194,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
dialogVisibleBigImage:false, // 显示图片放大框 true-显示弹框;false-隐藏弹框
|
||||||
|
currentImagePath:'',
|
||||||
userData:{},
|
userData:{},
|
||||||
formatDate,
|
formatDate,
|
||||||
formatDateShort,
|
formatDateShort,
|
||||||
@@ -254,6 +264,12 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 笔记图片放大
|
||||||
|
showBigImg(path){
|
||||||
|
this.currentImagePath = path;
|
||||||
|
this.dialogVisibleBigImage = true;
|
||||||
|
},
|
||||||
|
|
||||||
routerTo(item) {
|
routerTo(item) {
|
||||||
if(item.courseId) {
|
if(item.courseId) {
|
||||||
this.$router.push('/course/studyindex?id='+item.courseId);
|
this.$router.push('/course/studyindex?id='+item.courseId);
|
||||||
|
|||||||
Reference in New Issue
Block a user