mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
19 lines
291 B
Vue
19 lines
291 B
Vue
|
<script lang="ts">
|
||
|
export default defineNuxtComponent({
|
||
|
setup (_p, ctx) {
|
||
|
const state = ref(0)
|
||
|
|
||
|
const add = () => state.value++
|
||
|
|
||
|
ctx.expose({ add, state })
|
||
|
return {
|
||
|
state
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div>Hi i should be rendered {{ state }}</div>
|
||
|
</template>
|