2021-09-05 21:21:33 +00:00
|
|
|
<template>
|
2021-10-11 17:48:03 +00:00
|
|
|
<div>
|
|
|
|
<div>Hello Vue {{ version }}!</div>
|
|
|
|
<div>
|
|
|
|
State: {{ state }} <button @click="updateState">
|
|
|
|
Update
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-03-25 12:18:43 +00:00
|
|
|
Rendered on server: {{ serverBuild }}
|
2021-10-11 17:48:03 +00:00
|
|
|
</div>
|
2021-09-05 21:21:33 +00:00
|
|
|
</template>
|
2021-09-22 15:34:11 +00:00
|
|
|
|
2021-10-07 08:31:29 +00:00
|
|
|
<script setup>
|
|
|
|
useMeta({ meta: [{ name: 'description', content: 'This is a page to demo Nuxt Bridge.' }] })
|
|
|
|
const version = ref('2')
|
2021-10-11 17:48:03 +00:00
|
|
|
const state = useState('test-state')
|
|
|
|
state.value = '123'
|
|
|
|
const updateState = () => { state.value = '456' }
|
2022-03-25 12:18:43 +00:00
|
|
|
const serverBuild = useState('server-build', () => getCurrentInstance().proxy.$isServer)
|
2021-09-22 15:34:11 +00:00
|
|
|
</script>
|