fix: change attribute inheritance element
This commit is contained in:
parent
13c47ce50b
commit
40f07479e1
|
|
@ -3,6 +3,10 @@ import type { WithClassAsProps } from './interface'
|
||||||
import { useCarousel } from './useCarousel'
|
import { useCarousel } from './useCarousel'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
inheritAttrs: false,
|
||||||
|
})
|
||||||
|
|
||||||
const props = defineProps<WithClassAsProps>()
|
const props = defineProps<WithClassAsProps>()
|
||||||
|
|
||||||
const { carouselRef, orientation } = useCarousel()
|
const { carouselRef, orientation } = useCarousel()
|
||||||
|
|
@ -17,6 +21,7 @@ const { carouselRef, orientation } = useCarousel()
|
||||||
orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',
|
orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',
|
||||||
props.class,
|
props.class,
|
||||||
)"
|
)"
|
||||||
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ import { useCarousel } from './useCarousel'
|
||||||
import type { WithClassAsProps } from './interface'
|
import type { WithClassAsProps } from './interface'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
inheritAttrs: false,
|
||||||
|
})
|
||||||
|
|
||||||
const props = defineProps<WithClassAsProps>()
|
const props = defineProps<WithClassAsProps>()
|
||||||
|
|
||||||
const { carouselRef, orientation } = useCarousel()
|
const { carouselRef, orientation } = useCarousel()
|
||||||
|
|
@ -17,6 +21,7 @@ const { carouselRef, orientation } = useCarousel()
|
||||||
orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',
|
orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',
|
||||||
props.class,
|
props.class,
|
||||||
)"
|
)"
|
||||||
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user