mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 00:02:28 +08:00
refactor(frontend): 优化 UI 基础组件
- 添加默认 class 属性支持 - 改进组件类型定义 - 优化属性配置
This commit is contained in:
@@ -10,6 +10,8 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
class: undefined,
|
||||
src: undefined,
|
||||
alt: ''
|
||||
})
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
variant: 'default',
|
||||
class: undefined,
|
||||
})
|
||||
|
||||
const badgeVariants = cva(
|
||||
|
||||
@@ -25,6 +25,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
variant: 'default',
|
||||
size: 'default',
|
||||
disabled: false,
|
||||
class: undefined,
|
||||
type: 'button'
|
||||
})
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
variant: 'default'
|
||||
variant: 'default',
|
||||
class: undefined,
|
||||
})
|
||||
|
||||
// 标准卡片变体定义
|
||||
|
||||
@@ -35,8 +35,12 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
class: undefined,
|
||||
position: 'popper',
|
||||
side: undefined,
|
||||
sideOffset: 4,
|
||||
align: undefined,
|
||||
alignOffset: undefined,
|
||||
})
|
||||
|
||||
const contentClass = computed(() =>
|
||||
|
||||
@@ -5,7 +5,7 @@ interface Props {
|
||||
placeholder?: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
defineProps<Props>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -10,6 +10,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
class: undefined,
|
||||
orientation: 'horizontal',
|
||||
decorative: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user