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:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user