Fix:5761 【礼品集采中心PC端】【商户入驻-礼品集采中心】头像、资质内容,点击图片可重新上传,无删除按键。
This commit is contained in:
@@ -44,11 +44,19 @@
|
||||
v-if="!form.avatar"
|
||||
class="btn-upload"
|
||||
>上传图片</view>
|
||||
<image
|
||||
v-else
|
||||
:src="form.avatar"
|
||||
class="img-preview"
|
||||
/>
|
||||
<view v-else class="img-wrap">
|
||||
<image
|
||||
:src="form.avatar"
|
||||
class="img-preview"
|
||||
/>
|
||||
<view
|
||||
v-if="!reviewing"
|
||||
class="delete-badge"
|
||||
@click.stop="deleteImg('avatar')"
|
||||
>
|
||||
x
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
@@ -139,12 +147,23 @@
|
||||
>上传图片</view>
|
||||
<view v-else>
|
||||
<view v-if="qualificationArr.length > 0" class="flex">
|
||||
<image
|
||||
<view
|
||||
v-for="(item, index) in qualificationArr"
|
||||
:key="index"
|
||||
:src="item"
|
||||
class="img-preview"
|
||||
/>
|
||||
class="img-wrap"
|
||||
>
|
||||
<image
|
||||
:src="item"
|
||||
class="img-preview"
|
||||
/>
|
||||
<view
|
||||
v-if="!reviewing"
|
||||
class="delete-badge"
|
||||
@click.stop="deleteImg('qualification', index)"
|
||||
>
|
||||
x
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -433,6 +452,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除图片
|
||||
deleteImg(target, index) {
|
||||
if (target === 'avatar') {
|
||||
this.form.avatar = ''
|
||||
} else if (target === 'qualification') {
|
||||
this.qualificationArr.splice(index, 1)
|
||||
this.form.qualification = this.qualificationArr.join(',')
|
||||
}
|
||||
},
|
||||
// 省市区
|
||||
result(values) {
|
||||
this.address = {
|
||||
@@ -526,6 +554,23 @@ export default {
|
||||
.font-color-red{
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.img-wrap {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
.delete-badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 20rpx;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
padding: 2rpx 8rpx;
|
||||
border-radius: 0 0 0 200rpx;
|
||||
font-size: 22rpx;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.captcha-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user