refactor(client): specify global scope
This commit is contained in:
parent
b312846ff6
commit
8322c90834
30 changed files with 75 additions and 75 deletions
|
|
@ -59,7 +59,7 @@ const change = () => {
|
|||
slideB.value.style.backgroundImage = img;
|
||||
|
||||
slideB.value.classList.add('anime');
|
||||
setTimeout(() => {
|
||||
window.setTimeout(() => {
|
||||
// 既にこのウィジェットがunmountされていたら要素がない
|
||||
if (slideA.value == null) return;
|
||||
|
||||
|
|
@ -101,9 +101,9 @@ onMounted(() => {
|
|||
fetch();
|
||||
}
|
||||
|
||||
const intervalId = setInterval(change, 10000);
|
||||
const intervalId = window.setInterval(change, 10000);
|
||||
onUnmounted(() => {
|
||||
clearInterval(intervalId);
|
||||
window.clearInterval(intervalId);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue