Nuxt/test/fixtures/basic/components/WrapClientComponent.vue

17 lines
350 B
Vue
Raw Permalink Normal View History

<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>