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>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
class: undefined,
|
||||||
|
src: undefined,
|
||||||
alt: ''
|
alt: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { computed } from 'vue'
|
|||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
variant: 'default',
|
variant: 'default',
|
||||||
|
class: undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
const badgeVariants = cva(
|
const badgeVariants = cva(
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
variant: 'default',
|
variant: 'default',
|
||||||
size: 'default',
|
size: 'default',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
class: undefined,
|
||||||
type: 'button'
|
type: 'button'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
variant: 'default'
|
variant: 'default',
|
||||||
|
class: undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 标准卡片变体定义
|
// 标准卡片变体定义
|
||||||
|
|||||||
@@ -35,8 +35,12 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
class: undefined,
|
||||||
position: 'popper',
|
position: 'popper',
|
||||||
|
side: undefined,
|
||||||
sideOffset: 4,
|
sideOffset: 4,
|
||||||
|
align: undefined,
|
||||||
|
alignOffset: undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
const contentClass = computed(() =>
|
const contentClass = computed(() =>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ interface Props {
|
|||||||
placeholder?: string
|
placeholder?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>()
|
defineProps<Props>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
class: undefined,
|
||||||
orientation: 'horizontal',
|
orientation: 'horizontal',
|
||||||
decorative: true,
|
decorative: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user