随手拍改造完成

This commit is contained in:
aixianling
2022-10-20 16:35:10 +08:00
parent f8989e4b3c
commit 5775c244cb
10 changed files with 472 additions and 440 deletions

View File

@@ -3,7 +3,7 @@
<div class="imgList" v-if="type == 'image'">
<div class="item" v-for="(item, i) in fileList" :key="i">
<ai-image :src="item.url" :preview="preview"/>
<u-icon class="delBtn" color="#f46" name="close-circle-fill" size="40" @click="remove(i)"/>
<u-icon v-if="!disabled" class="delBtn" color="#f46" name="close-circle-fill" size="40" @click="remove(i)"/>
</div>
<div v-if="!disabled&&(fileList.length == 0 || (fileList.length < limit))" class="default" @click="upload">
<u-icon name="photo" size="64" :label="placeholder" label-pos="bottom" label-color="#89b"/>
@@ -70,6 +70,8 @@ export default {
this.fileList = v
} else if (v?.url) {
this.fileList = [v]
} else if (v?.length > 0) {
this.fileList = v
}
}
},
@@ -128,7 +130,6 @@ export default {
this.$emit('manual', img)
uni.hideLoading()
} else {
console.log(this.$instance.defaults)
uni.uploadFile({
url: this.$instance.defaults.baseURL + this.action,
filePath: img.path,