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

View File

@ -5,7 +5,7 @@
<h2>上传图片id</h2> <h2>上传图片id</h2>
<mb-upload-image :external-id="externalId" multiple :external-type="externalType" /> <mb-upload-image :external-id="externalId" multiple :external-type="externalType" />
<h2>上传图片url单图</h2> <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> <h2>上传图片url多图</h2>
<mb-upload-image v-model="multipleImgUrl" width="120" height="120" multiple :limit="3" @change="multipleImgChange" /> <mb-upload-image v-model="multipleImgUrl" width="120" height="120" multiple :limit="3" @change="multipleImgChange" />
</div> </div>