Files
ZhHealth/pages/im/components/showText.nvue
2022-02-07 17:22:09 +08:00

47 lines
924 B
Plaintext

<template>
<view class="im--box">
<text class="im--text" :class="guest ? 'right': 'left'">{{ msg.content }}</text>
</view>
</template>
<script>
export default {
name: 'showText',
data() {
return {
};
},
props: {
msg: {
type: Object,
default: {}
},
guest: {
type: Boolean,
default: true
}
}
}
</script>
<style scoped>
.im--text {
max-width: 400rpx;
padding: 20rpx;
font-size: 28rpx;
line-height: 40rpx;
}
.im--text.left {
border-radius: 0 20rpx 20rpx 20rpx;
background: white;
}
.im--text.right {
border-radius: 20rpx 0 20rpx 20rpx;
background: #34CE98;
color: white;
}
</style>