// eslint-disable-next-line @typescript-eslint/no-explicit-any
const options: any = {
inheritAttrs: false,
};
@Component(options)
<script lang="ts">
export default {
inheritAttrs: false
}
</script>
<script setup lang="ts">
// ...setup logic
</script>
- By default, unknown attributes will be passed along to the root element of the template. To pass them to a different element, use
v-bind="$attrs"
on that element and set inheritAttrs
to false
in a normal <script>
block (not the <script setup>
block).