mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
21 lines
569 B
Vue
21 lines
569 B
Vue
<template>
|
|
<div>
|
|
<div>Hello Vue {{ version }}!</div>
|
|
<div>
|
|
State: {{ state }} <button @click="updateState">
|
|
Update
|
|
</button>
|
|
</div>
|
|
Rendered on server: {{ serverBuild }}
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
useMeta({ meta: [{ name: 'description', content: 'This is a page to demo Nuxt Bridge.' }] })
|
|
const version = ref('2')
|
|
const state = useState('test-state')
|
|
state.value = '123'
|
|
const updateState = () => { state.value = '456' }
|
|
const serverBuild = useState('server-build', () => getCurrentInstance().proxy.$isServer)
|
|
</script>
|