44 lines
871 B
Vue
44 lines
871 B
Vue
<template>
|
|
<view class="text_message_container bg_container" v-if="notification.contentType == 101">
|
|
<u-parse :content="getContent" :previewImg="false" :showImgMenu="false" selectable></u-parse>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {parseBr} from "@/util/common";
|
|
|
|
export default {
|
|
name: "NotificationRender",
|
|
components: {
|
|
},
|
|
props: {
|
|
message: Object,
|
|
conversationID:String,
|
|
isSender:Boolean
|
|
},
|
|
computed:{
|
|
notification(){
|
|
const body = JSON.parse(this.message.notificationElem.detail);
|
|
body.data = JSON.parse(body.data);
|
|
return body.data;
|
|
},
|
|
getContent() {
|
|
return parseBr(this.notification.textElem?.content);
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
content:"",
|
|
};
|
|
},
|
|
mounted() {
|
|
},
|
|
methods: {
|
|
onMessageEvent(e){
|
|
this.$emit('onMessageEvent',e);
|
|
}
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style> |