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