提交 da027b9c 编写于 作者: V Vladimir Kharlampidi

fix(core messages): fixed issue with `attrs` in `.addMessage` method

上级 4159ae46
......@@ -123,15 +123,12 @@ class Messages extends Framework7Class {
if (message.isTitle) {
return `<div class="messages-title">${message.text}</div>`;
}
const attrs = Object.keys(message.attrs)
.map((attr) => `${attr}="${message.attrs[attr]}"`)
.join(' ');
return (
<div
class={`message message-${message.type} ${message.isTyping ? 'message-typing' : ''} ${
message.cssClass || ''
}`}
{...attrs}
{...message.attrs}
>
{message.avatar && (
<div class="message-avatar" style={`background-image:url(${message.avatar})`}></div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册