mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 06:35:10 +00:00
30 lines
522 B
Vue
30 lines
522 B
Vue
<template>
|
|
<div>
|
|
<div>Index Page</div>
|
|
<NuxtLink
|
|
id="btn-a"
|
|
to="/target?a"
|
|
>
|
|
Target A
|
|
</NuxtLink>
|
|
<NuxtLink
|
|
id="btn-b"
|
|
to="/target?b"
|
|
>
|
|
Target B
|
|
</NuxtLink>
|
|
|
|
<button @click="trigger">
|
|
Trigger (for manual testing)
|
|
</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
async function trigger () {
|
|
document.getElementById('btn-a').click()
|
|
await new Promise(resolve => setTimeout(resolve, 10))
|
|
document.getElementById('btn-b').click()
|
|
}
|
|
</script>
|