I'm trying to create a simple chat window using the Quasar framework
in my template, I have this
<div v-for="message in this.chatMessages" :key="message.id">
<q-chat-message
:name="message.name"
:text="message.text"
:sent="message.sent"
>
<slot name="avatar">
<q-avatar size="30">
<img alt="avatar" :src="message.avatar"/>
</q-avatar>
</slot>
</q-chat-message>
</div>
and in the data I have the following
data () {
return {
text: null,
fixed: false,
chatMessages: [
{
id: 123,
name: 'Support',
avatar: 'https://cdn.quasar.dev/img/avatar1.jpg',
text: ['hey, how are you?', ''],
sent: true
},
{
id: 456,
name: 'me',
avatar: this.$store.getters['xstore/getAvatar'],
text: ['doing fine, how r you?', ''],
sent: false
}
]
}
},
According to the documentation https://quasar.dev/vue-components/chat#introduction the component receives an array as text, like below
<q-chat-message
:text="['doing fine, how r you?']"
/>
but when I run it the text never appears on the screen, so, I'm not sure if I'm doing something wrong with the array properties, the rest of the attributes are working fine
How an array must be passed within a div v-for? is there a magic trick?
If I hardcode the text message as below they work :(
:text="['This is a hardcoded message']"

