use nextTick instead of setTimeout

This commit is contained in:
Puniko 2022-12-29 21:27:15 +01:00
parent 6998cae7e3
commit 54f0b67b25

View file

@ -29,7 +29,7 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { ref, nextTick } from 'vue';
import * as foundkey from 'foundkey-js';
import { i18n } from '@/i18n';
import { defaultStore } from '@/store';
@ -145,7 +145,7 @@ function performSeek() {
function toggleVisible() {
hide.value = !hide.value;
setTimeout(() => { stop(hide.value); }, 100);
nextTick(() => { stop(hide.value); });
}
function display() {