Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add size attr to manage the size (in col) of each message. #977

Merged
merged 1 commit into from
Oct 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/components/chat/QChatMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<slot name="avatar">
<img class="q-message-avatar" :src="avatar">
</slot>
<div class="column">
<div :class="sizeClass">
<div v-if="name" class="q-message-name" v-html="name"></div>
<div
v-for="msg in text"
Expand Down Expand Up @@ -49,7 +49,8 @@ export default {
name: String,
avatar: String,
text: Array,
stamp: String
stamp: String,
size: String
},
computed: {
textClass () {
Expand All @@ -61,6 +62,11 @@ export default {
if (this.bgColor) {
return `text-${this.bgColor}`
}
},
sizeClass () {
if (this.size) {
return `col-${this.size}`
}
}
}
}
Expand Down