Skip to content

Commit 2abb118

Browse files
authored
Merge pull request #19 from zhyc9de/master
兼容IE
2 parents ce0a4df + 6298b58 commit 2abb118

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ Toast.install = function (Vue, options) {
6262
if (type == 'close') {
6363
loadNode.show = showLoad = false;
6464
var markNode = document.querySelector('.lx-load-mark');
65-
if (markNode) markNode.remove();
65+
if (markNode) {
66+
if (typeof markNode.remove === 'function') {
67+
markNode.remove();
68+
} else { // IE have not remove
69+
markNode.parentNode.removeChild(markNode);
70+
}
71+
}
6672
} else {
6773
if (showLoad) {
6874
// 如果loading还在,则不再执行
@@ -90,4 +96,4 @@ Toast.install = function (Vue, options) {
9096
}
9197
});
9298
}
93-
module.exports = Toast;
99+
module.exports = Toast;

0 commit comments

Comments
 (0)