52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
<template>
|
|
<view class="im--img" :class="guest ? 'right': 'left'">
|
|
<image class="src" :src="msg.thumbnail" @click="previewImage" mode="widthFix"></image>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'showImage',
|
|
props: {
|
|
msg: {
|
|
type: Object,
|
|
default: {}
|
|
},
|
|
guest: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
methods: {
|
|
previewImage() {
|
|
uni.previewImage({
|
|
urls: [
|
|
this.msg.remote
|
|
],
|
|
current: 1
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.im--img {
|
|
padding: 19rpx;
|
|
}
|
|
|
|
.im--img.left {
|
|
border-radius: 0 20rpx 20rpx 20rpx;
|
|
background: white;
|
|
}
|
|
|
|
.im--img.right {
|
|
border-radius: 20rpx 0 20rpx 20rpx;
|
|
background: #34CE98;
|
|
}
|
|
|
|
.src {
|
|
width: 240rpx;
|
|
}
|
|
</style>
|