Commit 4b44e519 by 张立顺

style:详情页图片弹框显示

1 parent 67630f41
......@@ -54,6 +54,12 @@
<!-- v-for="(subItem, subIdx) in item.imgList" -->
<img class="detail-img"
:src="detailForm.papersList?detailForm.papersList[imgToAttr[subItem]]:''">
<span class="img-btns">
<span class="btn-item">
<i @click.stop="handleImgLook(detailForm.papersList?detailForm.papersList[imgToAttr[subItem]]:'')"
class="el-icon-zoom-in"></i>
</span>
</span>
<div v-if="item.labelList"
class="imageLabel">
{{item.labelList[subIdx]}}
......@@ -101,7 +107,12 @@
</el-form-item>
</div>
</el-form> -->
<el-dialog :visible.sync="lookImgVisible"
append-to-body>
<img width="100%"
:src="picUrl"
alt="图片">
</el-dialog>
</div>
</template>
......@@ -120,6 +131,8 @@ export default {
},
data() {
return {
lookImgVisible: false,
picUrl: '',
detailForm: {},
formArray: [
{
......@@ -613,6 +626,11 @@ export default {
},
methods: {
handleImgLook(url) {
this.lookImgVisible = true
this.picUrl = url
},
resetTableHeight() {
function getClientHeight() {
let clientHeight = 0
......@@ -812,17 +830,14 @@ export default {
cursor: pointer;
margin-right: 100px;
}
.account-detail .detail-img:hover {
margin-right: 0px;
width: 90%;
height: 90%;
}
.account-detail .detail-img:hover + .imageLabel {
// margin-right: 0px;
width: 90%;
// width: 50%;
// height: 50%;
}
// .account-detail .detail-img:hover {
// margin-right: 0px;
// width: 90%;
// height: 90%;
// }
// .account-detail .detail-img:hover + .imageLabel {
// width: 90%;
// }
.itemContainer {
padding: 30px 0;
background: #f4f6fc;
......@@ -831,6 +846,7 @@ export default {
.imageContainer {
// style="display: inline-block;"
// max-height: 50%;
position: relative;
max-width: 50%;
box-sizing: border-box;
display: inline-block;
......@@ -848,6 +864,33 @@ export default {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
}
.img-btns {
display: none;
position: absolute;
width: 180px;
height: 104px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.imageContainer:hover .img-btns {
display: block;
}
/* .transition-box {
margin-bottom: 10px;
width: 200px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!