mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 09:03:53 +00:00
19 lines
347 B
Vue
19 lines
347 B
Vue
|
<script setup lang="ts">
|
||
|
const props = defineProps<{ foo: string }>()
|
||
|
const count = ref(0)
|
||
|
const add = () => count.value++
|
||
|
|
||
|
defineExpose({ add })
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div>
|
||
|
<div>client only script setup component {{ props.foo }}</div>
|
||
|
<button @click="add">
|
||
|
{{ count }}
|
||
|
</button>
|
||
|
|
||
|
<slot name="test" />
|
||
|
</div>
|
||
|
</template>
|