mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 09:03:53 +00:00
e6ca07bdc0
Co-authored-by: Daniel Roe <daniel@roe.dev> Co-authored-by: jhuang@hsk-partners.com <jhuang@hsk-partners.com>
20 lines
367 B
Vue
20 lines
367 B
Vue
<template>
|
|
<div v-bind="$attrs" class="multi-root-node-script-count">
|
|
{{ count }}
|
|
</div>
|
|
<button class="multi-root-node-script-button" @click="add">
|
|
add 1 to count
|
|
</button>
|
|
</template>
|
|
|
|
<script>
|
|
export default defineNuxtComponent({
|
|
setup () {
|
|
const count = ref(0)
|
|
|
|
const add = () => count.value++
|
|
return { count, add }
|
|
}
|
|
})
|
|
</script>
|