refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
|
@ -1,21 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
const { as = 'div', active } = defineProps<{
|
||||
as: any
|
||||
active: boolean
|
||||
}>()
|
||||
|
||||
const el = ref()
|
||||
|
||||
watch(() => active, (active) => {
|
||||
const _el = unrefElement(el)
|
||||
|
||||
if (active && _el)
|
||||
_el.scrollIntoView({ block: 'nearest', inline: 'start' })
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="as" ref="el">
|
||||
<slot />
|
||||
</component>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue