Update 0BDFDB.plugin.js
This commit is contained in:
parent
366b77aa27
commit
e15e5ec361
|
@ -1162,8 +1162,9 @@ module.exports = (_ => {
|
||||||
if (disableInteractions) data.toast.style.setProperty("pointer-events", "none", "important");
|
if (disableInteractions) data.toast.style.setProperty("pointer-events", "none", "important");
|
||||||
else {
|
else {
|
||||||
BDFDB.DOMUtils.addClass(data.toast, BDFDB.disCN.toastclosable);
|
BDFDB.DOMUtils.addClass(data.toast, BDFDB.disCN.toastclosable);
|
||||||
data.toast.addEventListener("click", _ => {
|
data.toast.addEventListener("click", event => {
|
||||||
if (typeof data.config.onClick == "function") data.config.onClick();
|
console.log(event.target);
|
||||||
|
if (typeof data.config.onClick == "function" && !BDFDB.DOMUtils.getParent(BDFDB.dotCN.toastcloseicon, event.target)) data.config.onClick();
|
||||||
data.toast.close();
|
data.toast.close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue