Notification: fix style when message prop is omitted

This commit is contained in:
Leopoldthecoder
2017-12-25 16:08:55 +08:00
committed by 杨奕
parent 3e945aa2b1
commit bd616e37b6
4 changed files with 5 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ const Notification = function(options) {
if (isVNode(options.message)) {
instance.$slots.default = [options.message];
options.message = '';
options.message = 'REPLACED_BY_VNODE';
}
instance.id = id;
instance.vm = instance.$mount();

View File

@@ -16,7 +16,7 @@
</i>
<div class="el-notification__group" :class="{ 'is-with-icon': typeClass || iconClass }">
<h2 class="el-notification__title" v-text="title"></h2>
<div class="el-notification__content">
<div class="el-notification__content" v-show="message">
<slot>
<p v-if="!dangerouslyUseHTMLString">{{ message }}</p>
<p v-else v-html="message"></p>