提交 37771091 authored 作者: 刘旭's avatar 刘旭

优化

上级 f07f843d
......@@ -4,7 +4,9 @@
<view class="choose-img">
<view v-for="(item, index) in imageVideoData" :key="index" :data="index" class="box-img">
<view style="width: 100%;">
<view v-if="item.type == 'image/jpeg'" style="width: 100%;"><image :src="item.path" mode="widthFix" class="img-list" lazy-load /></view>
<view v-if="item.type == 'image/jpeg' || item.type == 'image/png'" style="width: 100%;">
<image :src="item.path" mode="widthFix" class="img-list" lazy-load />
</view>
<view v-else style="width: 100%;"><video :src="item.path" object-fit="fill" class="img-list" /></view>
<view class="iconfont icon-icons03 replace" @click="replaceImg(index)" style="color: #007aff;"></view>
<view class="iconfont icon-shanchu delele" @click="deleteImg(index)" style="color: #F56C6C;"></view>
......@@ -12,8 +14,8 @@
</view>
</view>
<view @click="upload" style="margin: 40rpx 0 10rpx 0;" class="addImage"><view class="iconfont icon-jia"></view></view>
<text style="padding-top: 20rpx;">只能上传图片或视频文件,且不超过20mb</text>
<button type="primary" @click="save" style="margin: 0 auto;">保存</button>
<view style="padding-top: 20rpx;">只能上传图片或视频文件,且不超过20mb</view>
<button type="primary" @click="save" style="margin-top: 20px;">保存</button>
</uni-section>
</view>
</template>
......@@ -130,7 +132,7 @@ let uploadVideo = () => {
type: data.type,
sort: imageVideoData.value.length
});
uni.hideLoading()
uni.hideLoading();
},
fail(res: any) {
console.log(res);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论