mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 16:28:49 +08:00
feat: FaSelect 组件增加 class props
This commit is contained in:
@@ -7,7 +7,6 @@ import { Maximize, Minimize, X } from 'lucide-vue-next'
|
||||
import {
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
|
||||
DialogPortal,
|
||||
useForwardPropsEmits,
|
||||
} from 'radix-vue'
|
||||
|
||||
@@ -45,7 +45,7 @@ function handleCollaspe() {
|
||||
</slot>
|
||||
</div>
|
||||
<div
|
||||
:class="cn('main-container group relative h-[calc-size(auto,size)] p-5 transition-height after:(pointer-events-none absolute bottom-0 left-0 z-1 h-12 max-h-full w-full from-transparent to-[hsl(var(--card))] bg-gradient-to-b opacity-0 transition-opacity content-empty)', {
|
||||
:class="cn('group relative h-[calc-size(auto,size)] p-5 transition-height after:(pointer-events-none absolute bottom-0 left-0 z-1 h-12 max-h-full w-full from-transparent to-[hsl(var(--card))] bg-gradient-to-b opacity-0 transition-opacity content-empty)', {
|
||||
'overflow-hidden': collaspe,
|
||||
'after:(opacity-100)': isCollaspe,
|
||||
}, props.mainClass)" :style="{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from 'vue'
|
||||
import { cn } from '@/utils'
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
@@ -19,6 +21,7 @@ const props = defineProps<{
|
||||
value: string
|
||||
disabled?: boolean
|
||||
}[]
|
||||
class?: HTMLAttributes['class']
|
||||
}>()
|
||||
|
||||
const value = defineModel<string>()
|
||||
@@ -35,7 +38,7 @@ const selectedOption = computed({
|
||||
|
||||
<template>
|
||||
<Select v-model:model-value="value" :disabled>
|
||||
<SelectTrigger class="w-[200px]">
|
||||
<SelectTrigger :class="cn('w-[200px]', props.class)">
|
||||
<SelectValue :placeholder="selectedOption.label" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
|
||||
Reference in New Issue
Block a user