上传图片添加tip

This commit is contained in:
吕金泽 2022-04-06 22:31:24 +08:00
parent 5b30ef2c49
commit 10985aabb2
2 changed files with 11 additions and 1 deletions

View File

@ -57,6 +57,7 @@
</el-upload>
</template>
</vuedraggable>
<div v-if="tip" class="el-upload__tip" :style="{ color: tipColor }">{{ tip }}</div>
<mb-dialog ref="cropperDialog" @confirm-click="cropper">
<template #content>
<div class="cropper-content">
@ -123,6 +124,14 @@ export default {
height: {
type: String,
default: '100'
},
tip: {
type: String,
default: ''
},
tipColor: {
type: String,
default: ''
}
},
data() {
@ -259,6 +268,7 @@ export default {
.vue-draggable >>> .el-upload {
width: 100%;
height: 100%;
display: block;
}
</style>

View File

@ -5,7 +5,7 @@
<h2>上传图片id</h2>
<mb-upload-image :external-id="externalId" multiple :external-type="externalType" />
<h2>上传图片url单图</h2>
<mb-upload-image v-model="imgUrl" @change="imgChange" />
<mb-upload-image v-model="imgUrl" @change="imgChange" tip="建议上传尺寸710*345" />
<h2>上传图片url多图</h2>
<mb-upload-image v-model="multipleImgUrl" width="120" height="120" multiple :limit="3" @change="multipleImgChange" />
</div>