mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 20:04:09 +00:00
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();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user