Skip to content

Commit

Permalink
Message : Fix offset is set to 0 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdaodao committed Nov 2, 2021
1 parent 5390f40 commit c400198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/message/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Message = function(options) {
}
instance.$mount();
document.body.appendChild(instance.$el);
let verticalOffset = options.offset || 20;
let verticalOffset = options.offset === 0 ? options.offset : (options.offset || 20);
instances.forEach(item => {
verticalOffset += item.$el.offsetHeight + 16;
});
Expand Down

0 comments on commit c400198

Please sign in to comment.