在window上挂载创建和销毁樱花雨的方法

This commit is contained in:
Vixcity
2024-05-06 22:17:49 +08:00
parent b6cd1ed80a
commit aa3210553d

View File

@@ -174,9 +174,13 @@ function createSakura() {
}
}
// 销毁樱花雨
function destroySakura() {
const sakura = document.getElementById(id)
if (sakura && sakura.parentNode) {
sakura.parentNode.removeChild(sakura)
}
}
window.createSakura = createSakura
window.destroySakura = destroySakura