<script setup>
const props = defineProps({
  messageContent: String, // 消息内容
  viewType: Number, // 0发送 1接收
});


let textString = ref('')
let loading = ref(false)
const initMessage = () => {
  textString.value = props.messageContent
}

initMessage()
</script>

<template>
  <div class="text-message" :class="viewType ? 'text-message--accept' : 'text-message--send'">
    {{messageContent}} <!--{{ textString }}-->
  </div>
</template>

<style scoped lang="scss">
.text-message {
  max-width: 250px;
  padding: 12px;
  box-sizing: border-box;
  background: #F3F3F3;
  color: #000000;
  color: rgba(0, 0, 0, 0.9);
  font-size: 14px;
  word-wrap: break-word;
  word-break: break-all;
  &.text-message--accept {
    background: #F3F3F3;
    border-radius: 0 12px 12px 12px;
  }

  &.text-message--send {
    background: #FEF4E6;
    border-radius: 12px 0 12px 12px;
  }
}
</style>