mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-12 22:20:19 +08:00
- 后端 apply_body_rules 支持点号分隔的嵌套路径(如 metadata.user.name) - 支持 \. 转义字面量点号(如 config\.v1.enabled) - 配置导出导入升级至 v2.2,新增 SystemConfig 支持 - 前端请求体规则编辑器改用 JSON 格式输入,增加实时验证指示 - 用量记录表格新增移动端卡片视图,优化筛选器响应式布局
34 lines
1010 B
Vue
34 lines
1010 B
Vue
<script setup lang="ts">
|
|
import { SelectTrigger as SelectTriggerPrimitive } from 'radix-vue'
|
|
import { ChevronDown } from 'lucide-vue-next'
|
|
import { cn } from '@/lib/utils'
|
|
import { computed } from 'vue'
|
|
|
|
interface Props {
|
|
class?: string
|
|
disabled?: boolean
|
|
}
|
|
|
|
const props = defineProps<Props>()
|
|
|
|
const triggerClass = computed(() =>
|
|
cn(
|
|
'flex h-11 w-full items-center justify-between rounded-2xl border border-border/60 bg-card/80 px-4 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/60 disabled:cursor-not-allowed disabled:opacity-50 text-foreground cursor-pointer backdrop-blur transition-all',
|
|
props.class
|
|
)
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<SelectTriggerPrimitive
|
|
v-bind="$attrs"
|
|
:class="triggerClass"
|
|
:disabled="disabled"
|
|
>
|
|
<span class="truncate">
|
|
<slot />
|
|
</span>
|
|
<ChevronDown class="h-4 w-4 opacity-50 pointer-events-none flex-shrink-0" />
|
|
</SelectTriggerPrimitive>
|
|
</template>
|