Nuxt/playground/app.vue

31 lines
525 B
Vue
Raw Normal View History

2021-03-18 14:26:41 +00:00
<template>
2021-10-12 13:49:21 +00:00
<div class="app">
<img src="~/assets/logo.svg" height="40">
<h1 class="greeting">
{{ hello }}, <br>Nuxt 3!
</h1>
2021-03-18 14:26:41 +00:00
</div>
</template>
2021-10-12 13:49:21 +00:00
<script setup>
const greetings = [
'Hello',
'Hi',
'Salut',
'こんにちは',
'你好'
]
const hello = useState('hello', () => greetings[Math.random() * greetings.length | 0])
</script>
2021-10-12 13:49:21 +00:00
<style scoped>
.app {
font-family: Avenir, Helvetica, Arial, sans-serif;
padding: 1rem 1.5rem;
}
.greeting {
font-size: 4em;
font-weight: 400;
}
</style>