mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-05 03:47:12 +00:00
17 lines
350 B
Vue
17 lines
350 B
Vue
<template>
|
|
<div>
|
|
<ClientSetupScript
|
|
ref="clientSetupScript"
|
|
class="client-only-script-setup"
|
|
foo="hello"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const clientSetupScript = ref<{ $el: HTMLElement }>()
|
|
onMounted(() => {
|
|
console.log(clientSetupScript.value?.$el as HTMLElement ? 'has $el' : 'no $el')
|
|
})
|
|
</script>
|