mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 11:34:10 +08:00
feat: FaDivider 增加 class props
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from 'vue'
|
||||
import { cn } from '@/utils'
|
||||
|
||||
defineOptions({
|
||||
name: 'FaDivider',
|
||||
})
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
position?: 'start' | 'end'
|
||||
class?: HTMLAttributes['class']
|
||||
}>()
|
||||
|
||||
const slots = defineSlots<{
|
||||
@@ -20,7 +22,7 @@ const slots = defineSlots<{
|
||||
'before:(flex-basis-0)': position === 'start',
|
||||
'after:(flex-basis-0)': position === 'end',
|
||||
'gap-4': !!slots.default,
|
||||
})"
|
||||
}, props.class)"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user