Commit 61fa563b by cwq0219

样式

1 parent 082bc5e5
...@@ -171,6 +171,13 @@ ...@@ -171,6 +171,13 @@
class="number" class="number"
v-else-if="item.maxPhotoNum > 1 && (formData[item.name].length < item.maxPhotoNum)" v-else-if="item.maxPhotoNum > 1 && (formData[item.name].length < item.maxPhotoNum)"
>{{formData[item.name].length}}/{{item.maxPhotoNum}}</span> >{{formData[item.name].length}}/{{item.maxPhotoNum}}</span>
<!-- <span
v-show="!formData[item.name]"
class="close"
@click='handleImgDelete(item)'
>
<i class="el-icon-delete"></i>
</span> -->
<template> <template>
<img <img
v-if="formData[item.name] && item.maxPhotoNum === 1" v-if="formData[item.name] && item.maxPhotoNum === 1"
...@@ -192,18 +199,19 @@ ...@@ -192,18 +199,19 @@
</div> </div>
<template> <template>
<div v-if="item.maxPhotoNum > 1 && formData[item.name].length"> <div v-if="item.maxPhotoNum > 1 && formData[item.name].length">
<img <span
class="muti-imgs" class="muti-imgs"
v-for="(subItem, subIndex) in formData[item.name]" v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex" :key="subIndex"
:src="subItem.content" >
/> <img :src="subItem.content" />
<div <span
class="close" class="close"
@click='delBgimg($index)' @click='handleImgDelete(item, subIndex)'
> >
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </span>
</span>
</div> </div>
</template> </template>
</template> </template>
...@@ -214,7 +222,8 @@ ...@@ -214,7 +222,8 @@
</el-row> </el-row>
<el-row <el-row
v-for="(subItem, subIndex) in formData[item.name]" v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"> :key="subIndex"
>
<el-input <el-input
v-if="subItem.resType === 2" v-if="subItem.resType === 2"
type="textarea" type="textarea"
...@@ -224,7 +233,8 @@ ...@@ -224,7 +233,8 @@
></el-input> ></el-input>
<div <div
class="descList-img" class="descList-img"
v-else-if="subItem.resType === 1"> v-else-if="subItem.resType === 1"
>
<img :src="subItem.content" /> <img :src="subItem.content" />
<input <input
type="file" type="file"
...@@ -429,6 +439,10 @@ export default { ...@@ -429,6 +439,10 @@ export default {
}) })
} }
}, },
// 图片删除
handleImgDelete(targetItem, subIndex = -1) {
Array.isArray(this.formData[targetItem.name]) ? this.formData[targetItem.name].splice(subIndex, 1) : (this.formData[targetItem.name] = '')
},
// 描述 1-图片;2-文字 // 描述 1-图片;2-文字
handleAddDesc(resType, targetItem) { handleAddDesc(resType, targetItem) {
// console.log(this.formData[targetItem.name]) // console.log(this.formData[targetItem.name])
...@@ -510,6 +524,10 @@ export default { ...@@ -510,6 +524,10 @@ export default {
} }
.d2-form .muti-imgs { .d2-form .muti-imgs {
position: relative;
}
.d2-form .muti-imgs img {
width: 88px; width: 88px;
height: 74px; height: 74px;
} }
......
<!-- 客户预录 --> <!-- 客户预录 -->
<template> <template>
<div> <d2-container>
<el-form <el-form
ref="editCusFrom" ref="editCusFrom"
:model="form" :model="form"
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
>确认</el-button> >确认</el-button>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
</div> </div>
</div> </d2-container>
</template> </template>
<script> <script>
......
...@@ -111,9 +111,9 @@ export default { ...@@ -111,9 +111,9 @@ export default {
letter-spacing: 1.38px; letter-spacing: 1.38px;
} }
.personalInfo .info-img { .personalInfo .info-img {
width: 85px; width: 120px;
height: 85px; height: 120px;
border-radius: 10px; margin-right: 5px;
} }
.personalInfo .tag { .personalInfo .tag {
margin-right: 10px; margin-right: 10px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!