Fix: 修复toast关闭时未移除Dom节点,以及补上单元测试 (#19)

* 文档页样式和打包配置优化

* upload unit test

* intanbul ignore src/index

* unit test

* utils dom unit test

* fix: toast not remove

* remove dom unit test

* remove toast clear unit test

* remove toast import vue
This commit is contained in:
张敏
2017-04-26 15:49:44 +08:00
committed by GitHub
parent 639d3a65c5
commit b4544ef1dc
3 changed files with 71 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ const getInstance = () => {
};
const removeDom = event => {
/* istanbul ignore else */
if (event.target.parentNode) {
event.target.parentNode.removeChild(event.target);
}
@@ -69,6 +70,7 @@ Toast.fail = (options) => {
};
Toast.clear = () => {
/* istanbul ignore else */
if (instance) instance.clear();
};