mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-15 02:14:44 +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>
|