diff --git a/src/components/ui/NavBar.vue b/src/components/ui/NavBar.vue index 4dbb424..043f4a9 100644 --- a/src/components/ui/NavBar.vue +++ b/src/components/ui/NavBar.vue @@ -5,7 +5,11 @@
-
+ +
+ +
+
@@ -37,17 +41,6 @@ 发送 - - - - -
@@ -55,8 +48,6 @@ \ No newline at end of file diff --git a/src/components/ui/calendar/Calendar.vue b/src/components/ui/calendar/Calendar.vue new file mode 100644 index 0000000..3054f73 --- /dev/null +++ b/src/components/ui/calendar/Calendar.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/components/ui/calendar/CalendarCell.vue b/src/components/ui/calendar/CalendarCell.vue new file mode 100644 index 0000000..15b8028 --- /dev/null +++ b/src/components/ui/calendar/CalendarCell.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/ui/calendar/CalendarCellTrigger.vue b/src/components/ui/calendar/CalendarCellTrigger.vue new file mode 100644 index 0000000..1107fc6 --- /dev/null +++ b/src/components/ui/calendar/CalendarCellTrigger.vue @@ -0,0 +1,39 @@ + + + diff --git a/src/components/ui/calendar/CalendarGrid.vue b/src/components/ui/calendar/CalendarGrid.vue new file mode 100644 index 0000000..e6dd7d6 --- /dev/null +++ b/src/components/ui/calendar/CalendarGrid.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/ui/calendar/CalendarGridBody.vue b/src/components/ui/calendar/CalendarGridBody.vue new file mode 100644 index 0000000..3b9e716 --- /dev/null +++ b/src/components/ui/calendar/CalendarGridBody.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/components/ui/calendar/CalendarGridHead.vue b/src/components/ui/calendar/CalendarGridHead.vue new file mode 100644 index 0000000..de1589b --- /dev/null +++ b/src/components/ui/calendar/CalendarGridHead.vue @@ -0,0 +1,16 @@ + + + diff --git a/src/components/ui/calendar/CalendarGridRow.vue b/src/components/ui/calendar/CalendarGridRow.vue new file mode 100644 index 0000000..767557d --- /dev/null +++ b/src/components/ui/calendar/CalendarGridRow.vue @@ -0,0 +1,22 @@ + + + diff --git a/src/components/ui/calendar/CalendarHeadCell.vue b/src/components/ui/calendar/CalendarHeadCell.vue new file mode 100644 index 0000000..47fefbc --- /dev/null +++ b/src/components/ui/calendar/CalendarHeadCell.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/ui/calendar/CalendarHeader.vue b/src/components/ui/calendar/CalendarHeader.vue new file mode 100644 index 0000000..175118d --- /dev/null +++ b/src/components/ui/calendar/CalendarHeader.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/ui/calendar/CalendarHeading.vue b/src/components/ui/calendar/CalendarHeading.vue new file mode 100644 index 0000000..5a11c12 --- /dev/null +++ b/src/components/ui/calendar/CalendarHeading.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/components/ui/calendar/CalendarNextButton.vue b/src/components/ui/calendar/CalendarNextButton.vue new file mode 100644 index 0000000..bd1efce --- /dev/null +++ b/src/components/ui/calendar/CalendarNextButton.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/components/ui/calendar/CalendarPrevButton.vue b/src/components/ui/calendar/CalendarPrevButton.vue new file mode 100644 index 0000000..80bdcec --- /dev/null +++ b/src/components/ui/calendar/CalendarPrevButton.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/components/ui/calendar/index.ts b/src/components/ui/calendar/index.ts new file mode 100644 index 0000000..552c634 --- /dev/null +++ b/src/components/ui/calendar/index.ts @@ -0,0 +1,14 @@ +export { default as Calendar } from "./Calendar.vue" +export { default as CalendarCell } from "./CalendarCell.vue" +export { default as CalendarCellTrigger } from "./CalendarCellTrigger.vue" +export { default as CalendarGrid } from "./CalendarGrid.vue" +export { default as CalendarGridBody } from "./CalendarGridBody.vue" +export { default as CalendarGridHead } from "./CalendarGridHead.vue" +export { default as CalendarGridRow } from "./CalendarGridRow.vue" +export { default as CalendarHeadCell } from "./CalendarHeadCell.vue" +export { default as CalendarHeader } from "./CalendarHeader.vue" +export { default as CalendarHeading } from "./CalendarHeading.vue" +export { default as CalendarNextButton } from "./CalendarNextButton.vue" +export { default as CalendarPrevButton } from "./CalendarPrevButton.vue" + +export type LayoutTypes = "month-and-year" | "month-only" | "year-only" | undefined diff --git a/src/components/ui/native-select/NativeSelect.vue b/src/components/ui/native-select/NativeSelect.vue new file mode 100644 index 0000000..3171676 --- /dev/null +++ b/src/components/ui/native-select/NativeSelect.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/components/ui/native-select/NativeSelectOptGroup.vue b/src/components/ui/native-select/NativeSelectOptGroup.vue new file mode 100644 index 0000000..7fc2df7 --- /dev/null +++ b/src/components/ui/native-select/NativeSelectOptGroup.vue @@ -0,0 +1,15 @@ + + + + + + diff --git a/src/components/ui/native-select/NativeSelectOption.vue b/src/components/ui/native-select/NativeSelectOption.vue new file mode 100644 index 0000000..6abe33b --- /dev/null +++ b/src/components/ui/native-select/NativeSelectOption.vue @@ -0,0 +1,15 @@ + + + + + + diff --git a/src/components/ui/native-select/index.ts b/src/components/ui/native-select/index.ts new file mode 100644 index 0000000..04e92c7 --- /dev/null +++ b/src/components/ui/native-select/index.ts @@ -0,0 +1,3 @@ +export { default as NativeSelect } from "./NativeSelect.vue" +export { default as NativeSelectOptGroup } from "./NativeSelectOptGroup.vue" +export { default as NativeSelectOption } from "./NativeSelectOption.vue" diff --git a/src/components/ui/popover/Popover.vue b/src/components/ui/popover/Popover.vue new file mode 100644 index 0000000..4efdb98 --- /dev/null +++ b/src/components/ui/popover/Popover.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/components/ui/popover/PopoverAnchor.vue b/src/components/ui/popover/PopoverAnchor.vue new file mode 100644 index 0000000..49e01db --- /dev/null +++ b/src/components/ui/popover/PopoverAnchor.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/components/ui/popover/PopoverContent.vue b/src/components/ui/popover/PopoverContent.vue new file mode 100644 index 0000000..cf1e55c --- /dev/null +++ b/src/components/ui/popover/PopoverContent.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/components/ui/popover/PopoverTrigger.vue b/src/components/ui/popover/PopoverTrigger.vue new file mode 100644 index 0000000..fd3b497 --- /dev/null +++ b/src/components/ui/popover/PopoverTrigger.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/components/ui/popover/index.ts b/src/components/ui/popover/index.ts new file mode 100644 index 0000000..66edf89 --- /dev/null +++ b/src/components/ui/popover/index.ts @@ -0,0 +1,4 @@ +export { default as Popover } from "./Popover.vue" +export { default as PopoverAnchor } from "./PopoverAnchor.vue" +export { default as PopoverContent } from "./PopoverContent.vue" +export { default as PopoverTrigger } from "./PopoverTrigger.vue" diff --git a/src/lib/api.ts b/src/lib/api.ts index 37dcf7f..d03fc6a 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -103,6 +103,7 @@ interface APIToken { interface SiteConfig { name: string description: string + logo?: string } interface UploadConfig { @@ -284,7 +285,7 @@ export const adminApi = { }, // 获取系统配置 - getConfig: (): Promise> => { + getConfig: (): Promise>> => { return api.get('/admin/config') }, diff --git a/src/style.css b/src/style.css index f4c1e9b..6bcad97 100644 --- a/src/style.css +++ b/src/style.css @@ -118,3 +118,33 @@ @apply bg-background text-foreground; } } + +/* 优化表单元素间距 */ +@layer components { + /* 减小Label后面的表单元素的上边距 */ + label + input, + label + textarea, + label + select, + label + .mt-2 { + margin-top: 0.375rem !important; /* 6px instead of 8px */ + } + + /* Select组件特殊处理 - 使用data-slot属性选择器 */ + label + [data-slot="select"], + [data-slot="label"] + [data-slot="select"] { + margin-top: 0.375rem !important; + } + + /* Card内容区域的表单间距优化 */ + [data-slot="card-content"] .space-y-5 > div > label + *, + [data-slot="card-content"] .space-y-4 > div > label + *, + [data-slot="card-content"] .space-y-3 > div > label + * { + margin-top: 0.375rem !important; + } + + /* 确保Card内的Select也有间距 */ + [data-slot="card-content"] [data-slot="label"] + [data-slot="select"], + [data-slot="card-content"] label + [data-slot="select"] { + margin-top: 0.375rem !important; + } +} diff --git a/src/views/HomePage.vue b/src/views/HomePage.vue index b6aa705..058cbc7 100644 --- a/src/views/HomePage.vue +++ b/src/views/HomePage.vue @@ -1,46 +1,94 @@