mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
653856627c
Co-authored-by: julien huang <julien.huang@outlook.fr>
20 lines
325 B
Vue
20 lines
325 B
Vue
<script setup lang="ts">
|
|
function exposedFunc () {
|
|
console.log('ok')
|
|
}
|
|
|
|
defineExpose({ exposedFunc })
|
|
const $hello = ref('hello')
|
|
await new Promise(resolve => setTimeout(resolve, 300))
|
|
|
|
onMounted(() => {
|
|
console.log('mounted', $hello.value)
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
client-only component
|
|
</div>
|
|
</template>
|