Commit 4de8239a authored by 罗林杰's avatar 罗林杰

修改bug

parent c5e70616
......@@ -139,7 +139,6 @@
<!-- 详情弹窗 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="deviceFormRef" :model="form" label-position="right" label-width="auto">
<div class="item">
<div>
<img v-if="form.avatarImg" class="avatarSize" :src="form.avatarImg" alt="" mode="aspectFill">
......@@ -157,18 +156,18 @@
<el-col :span="24">
<div style="font-size: 15px;padding-left: 20px;padding-bottom: 20px;" class="content">{{ form.content }}</div>
</el-col>
<div>
<div style="width: 500px">
<!-- 当没有图片时 -->
<div v-if="!form.url || form.url.length === 0" style="text-align: center; color: #999;" />
<!-- 当图片数量为1时 -->
<div v-else-if="form.url.length === 1" style="margin-left: 150px">
<div v-else-if="form.url.length === 1" style="margin-left: 30px">
<img :src="form.url[0]" alt="" class="avatar1">
</div>
<!-- 当图片数量为4或6时,上下两排展示 -->
<div v-else-if=" form.url.length === 2" style="padding-left: 40px">
<el-row v-for="(row, rowIndex) in Math.ceil(form.url.length / 2)" :key="rowIndex" :gutter="1">
<el-col v-for="(imagePath, index) in form.url.slice(rowIndex * 2, rowIndex * 2 + 2)" :key="index" :span="12">
<div style="margin-left: -15px">
<div style="margin-left: -10px">
<img :src="imagePath" alt="" class="avatar3">
</div>
</el-col>
......@@ -185,7 +184,7 @@
</el-row>
</div>
<!-- 当图片数量为5, 7, 8或9时,按九宫格显示 -->
<el-row v-else :gutter="2" style="padding-left: 50px">
<el-row v-else :gutter="2" style="padding-left: 60px">
<el-col v-for="(imagePath, index) in form.url" :key="index" :span="8">
<div style="margin-left: -20px">
<img :src="imagePath" alt="" class="avatar2">
......@@ -253,7 +252,7 @@
</div>
</div>
<div style="display: flex;justify-content: flex-end">
<span v-if="comment.examStatus=='0'" style="color: red">*</span>
<span v-if="reply.examStatus=='0'" style="color: red">*</span>
<el-button v-if="isEdit" type="text" @click="deleteReply(reply)">删除</el-button>
</div>
</div>
......@@ -262,7 +261,6 @@
</li>
</ul>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="!isEdit" class="cancelBtn" @click="cancel">取 消</el-button>
<el-button v-if="isEdit && form.examStatus =='0'" class="cancelBtn" @click="rejection">驳 回</el-button>
......@@ -724,13 +722,13 @@ export default {
display: block;
}
.avatar2 {
width: 170px;
height: 130px;
width: 145px;
height: 120px;
display: block;
}
.avatar3 {
width: 263px;
height: 200px;
width: 230px;
height: 180px;
display: block;
}
.avatar4 {
......@@ -739,9 +737,9 @@ export default {
display: block;
}
.avatar5 {
width: 255px;
height: 200px;
padding-top: 4px;
width: 230px;
height: 210px;
padding-top: 2px;
display: block;
}
.commentTitle{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment