refactor(client): specify global scope

This commit is contained in:
syuilo
2022-01-16 10:14:14 +09:00
parent b312846ff6
commit 8322c90834
30 changed files with 75 additions and 75 deletions

View File

@ -167,7 +167,7 @@ export default defineComponent({
// このコンポーネントが作成された時、非表示状態である場合がある
// 非表示状態だと要素の幅などは0になってしまうので、定期的に計算する
const clock = setInterval(() => {
const clock = window.setInterval(() => {
if (prefixEl.value) {
if (prefixEl.value.offsetWidth) {
inputEl.value.style.paddingLeft = prefixEl.value.offsetWidth + 'px';
@ -181,7 +181,7 @@ export default defineComponent({
}, 100);
onUnmounted(() => {
clearInterval(clock);
window.clearInterval(clock);
});
});
});

View File

@ -117,7 +117,7 @@ export default defineComponent({
// このコンポーネントが作成された時、非表示状態である場合がある
// 非表示状態だと要素の幅などは0になってしまうので、定期的に計算する
const clock = setInterval(() => {
const clock = window.setInterval(() => {
if (prefixEl.value) {
if (prefixEl.value.offsetWidth) {
inputEl.value.style.paddingLeft = prefixEl.value.offsetWidth + 'px';
@ -131,7 +131,7 @@ export default defineComponent({
}, 100);
onUnmounted(() => {
clearInterval(clock);
window.clearInterval(clock);
});
});
});