Skip to content

Commit 1bf4bb8

Browse files
committed
[refactor] Delete meaningless code and clarify it
1 parent b799d2e commit 1bf4bb8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/notification/src/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const Notification = function(options) {
2828
options.message = 'REPLACED_BY_VNODE';
2929
}
3030
instance.id = id;
31-
instance.vm = instance.$mount();
32-
document.body.appendChild(instance.vm.$el);
33-
instance.vm.visible = true;
34-
instance.dom = instance.vm.$el;
31+
instance.$mount();
32+
document.body.appendChild(instance.$el);
33+
instance.visible = true;
34+
instance.dom = instance.$el;
3535
instance.dom.style.zIndex = PopupManager.nextZIndex();
3636

3737
let verticalOffset = options.offset || 0;
@@ -41,7 +41,7 @@ const Notification = function(options) {
4141
verticalOffset += 16;
4242
instance.verticalOffset = verticalOffset;
4343
instances.push(instance);
44-
return instance.vm;
44+
return instance;
4545
};
4646

4747
['success', 'warning', 'info', 'error'].forEach(type => {

0 commit comments

Comments
 (0)