From b1f445ca85d4f77325bf00aeda7d047c7772e4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Fri, 6 Sep 2019 09:20:45 +0800 Subject: [PATCH] $Message add background prop --- src/components/message/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/message/index.js b/src/components/message/index.js index 7cc41c08..516e3f32 100644 --- a/src/components/message/index.js +++ b/src/components/message/index.js @@ -31,7 +31,7 @@ function getMessageInstance () { return messageInstance; } -function notice (content = '', duration = defaults.duration, type, onClose = function () {}, closable = false, render = function () {}) { +function notice (content = '', duration = defaults.duration, type, onClose = function () {}, closable = false, render = function () {}, background = false) { const iconType = iconTypes[type]; // if loading @@ -53,7 +53,8 @@ function notice (content = '', duration = defaults.duration, type, onClose = fun render: render, onClose: onClose, closable: closable, - type: 'message' + type: 'message', + background: background }); // 用于手动消除 @@ -90,7 +91,7 @@ export default { content: options }; } - return notice(options.content, options.duration, type, options.onClose, options.closable, options.render); + return notice(options.content, options.duration, type, options.onClose, options.closable, options.render, options.background); }, config (options) { if (options.top || options.top === 0) {