BUG 25116
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div v-if="$slots.default" @tap="prev">
|
||||
<slot/>
|
||||
</div>
|
||||
<u-image v-else :src="src" @tap="prev">
|
||||
<u-image v-else :src="image" @tap="prev">
|
||||
<image v-if="link" class="errorImage" slot="error" :src="$cdn+'link.png'"/>
|
||||
<image v-else-if="miniapp" class="errorImage" slot="error" :src="$cdn+'miniwxmp.jpg'"/>
|
||||
<image v-else class="errorImage" slot="error" :src="$cdn+'file.png'"/>
|
||||
@@ -21,6 +21,11 @@ export default {
|
||||
dialog: false
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
image(){
|
||||
return this.src?.replace(/\\/g,'/')
|
||||
}
|
||||
},
|
||||
props: {
|
||||
src: String,
|
||||
preview: Boolean,
|
||||
@@ -35,10 +40,10 @@ export default {
|
||||
...mapActions(['previewFile', 'injectJWeixin']),
|
||||
prev() {
|
||||
if (this.preview) {
|
||||
if (!!this.src) {
|
||||
if (!!this.image) {
|
||||
uni.previewImage({
|
||||
current: this.src,
|
||||
urls: [this.src]
|
||||
current: this.image,
|
||||
urls: [this.image]
|
||||
})
|
||||
} else {
|
||||
this.previewFile({size: 1, ...this.file})
|
||||
|
||||
Reference in New Issue
Block a user