Notification: Fix modifying incoming option object (#16704)

This commit is contained in:
iamkun 2019-07-31 11:51:08 +08:00 committed by hetech
parent 484a033a66
commit ec3326e0bc
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import Main from './main.vue';
import merge from 'element-ui/src/utils/merge';
import { PopupManager } from 'element-ui/src/utils/popup';
import { isVNode } from 'element-ui/src/utils/vdom';
const NotificationConstructor = Vue.extend(Main);
@ -10,7 +11,7 @@ let seed = 1;
const Notification = function(options) {
if (Vue.prototype.$isServer) return;
options = options || {};
options = merge({}, options);
const userOnClose = options.onClose;
const id = 'notification_' + seed++;
const position = options.position || 'top-right';