refactor(layout): update BasicLayout and LayoutHeader styling with ant design improvements

- Replace ant-design-vue message with vue-sonner toast notifications
- Remove LayoutHeader component import from BasicLayout
- Update CSS classes for better styling consistency
- Adjust padding and spacing in layout components
- Modify shadow and overflow properties in task management views
- Add hidden class utility for element visibility control
This commit is contained in:
2026-03-16 01:52:38 +08:00
parent 8fdce94c47
commit 16f34ac54e
11 changed files with 977 additions and 692 deletions

View File

@@ -1,8 +1,5 @@
<script setup>
import LayoutHeader from './LayoutHeader.vue'
defineOptions({ name: 'BasicLayout' })
defineProps({
title: { type: String, default: '' },
showBack: { type: Boolean, default: false },
@@ -13,19 +10,9 @@ const emit = defineEmits(['back'])
</script>
<template>
<div class="flex flex-col h-full overflow-hidden rounded-xl border bg-card">
<LayoutHeader
:title="title"
:show-back="showBack"
@back="emit('back')"
>
<template #extra>
<slot name="extra"></slot>
</template>
</LayoutHeader>
<div class="flex flex-col h-full overflow-hidden">
<!-- 页面内容 -->
<div class="flex-1 flex flex-col overflow-x-hidden overflow-y-auto bg-card p-4">
<div class="flex-1 flex flex-col overflow-x-hidden overflow-y-auto p-4">
<slot></slot>
</div>
</div>

View File

@@ -32,12 +32,10 @@ const handleBack = () => {
<template>
<div
class="flex justify-between items-center gap-4 border-b bg-card shrink-0 min-h-14 transition-all"
class="flex justify-between items-center gap-4 shrink-0 min-h-12"
:class="{
'border-border': !ghost,
'border-transparent bg-transparent': ghost,
'px-4 py-3': !padding,
'dark:border-border dark:bg-card dark:text-foreground': !ghost
'bg-transparent': ghost,
'px-4 py-2': !padding
}"
:style="padding ? { padding } : {}"
>
@@ -53,9 +51,9 @@ const handleBack = () => {
</Button>
<div class="flex-1 min-w-0 flex items-center">
<slot name="header">
<h1 v-if="title" class="text-lg font-semibold text-foreground m-0 leading-snug tracking-tight">
<span v-if="title" class="text-base font-medium text-foreground">
{{ title }}
</h1>
</span>
</slot>
</div>
</div>