mirror of https://gitee.com/answerdev/answer.git
fix: toast hook close func
This commit is contained in:
parent
0868952992
commit
ee729d8247
|
@ -28,8 +28,11 @@ const useToast = () => {
|
|||
});
|
||||
|
||||
const onClose = () => {
|
||||
//
|
||||
root.unmount();
|
||||
const parent = document.querySelector('.page-wrap');
|
||||
if (parent?.contains(div)) {
|
||||
parent.removeChild(div);
|
||||
}
|
||||
|
||||
setShow(false);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue