mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
29 lines
353 B
Vue
29 lines
353 B
Vue
<template>
|
|
<div>
|
|
Custom2 Layout:
|
|
<slot />
|
|
|
|
<div class="count">
|
|
{{ count }}
|
|
</div>
|
|
<button
|
|
class="add-count"
|
|
@click="count++"
|
|
>
|
|
add count
|
|
</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const count = ref(0)
|
|
|
|
function logFoo () {
|
|
console.log('bar')
|
|
}
|
|
|
|
defineExpose({
|
|
logFoo,
|
|
})
|
|
</script>
|