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:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
.van-toast-fade-enter, .van-toast-fade-leave-active {
|
||||
.van-toast-fade-enter-active, .van-toast-fade-leave-active {
|
||||
transition: opacity .2s;
|
||||
}
|
||||
.van-toast-fade-enter, .van-toast-fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user