提交 0bafd69b authored 作者: 杨斌基's avatar 杨斌基

feat(上报内容): 上传 3 张图片后隐藏上传按钮

上级 48be1e1a
......@@ -85,7 +85,7 @@
<image @click.native.stop="cancel(item, index)" mode="aspectFill" class="upload_del" src="/static/icon/ic_zp_del@2x.png" />
</view>
</view>
<view v-if="uploadVisible" class="photo_upload" @click="upload(option)">
<view v-if="getUploadVisible(option)" class="photo_upload" @click="upload(option)">
<image mode="aspectFill" class="upload_icon" src="/static/icon/upload_icon@2x.png" />
</view>
</view>
......@@ -284,7 +284,7 @@
<image @click.native.stop="cancel(item, index)" mode="aspectFill" class="upload_del" src="/static/icon/ic_zp_del@2x.png" />
</view>
</view>
<view v-if="uploadVisible" class="photo_upload" @click="upload(option)">
<view v-if="getUploadVisible(option)" class="photo_upload" @click="upload(option)">
<image mode="aspectFill" class="upload_icon" src="/static/icon/upload_icon@2x.png" />
</view>
</view>
......@@ -597,9 +597,6 @@ export default {
uploadTitle() {
return `上传${this.uploadActionsOptions.map(v => v.name).join('/')}`
},
uploadVisible() {
return !this.isOnlyAllowUploadImages || this.photoList.length < mustUploadImageCount
},
videoFit() {
return this.video.fullscreen ? 'contain' : 'cover'
}
......@@ -933,6 +930,13 @@ export default {
getThumbnail(url, width = 168, height = 168) {
return `${url}|imageView2/1/w/${width}/h/${height}/interlace/1`
},
getUploadVisible({ type }) {
// 视频目前不限上传数量
if (type === 'video') return true
return this.mustUploadImageCount > this.uploadedImages.length
},
onVideoFullscreenChange(e) {
const { fullScreen } = e.detail
this.video.fullscreen = fullScreen
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论