hookehuyr

refactor(布局): 移除AppLayout中的title必填项并调整样式

移除AppLayout组件中title属性的必填限制,并根据是否传入title动态调整页面布局样式。同时,在多个页面中移除了不再需要的title属性,以简化代码并提高组件灵活性。
......@@ -24,7 +24,6 @@ declare module 'vue' {
SummerCampCard: typeof import('./components/ui/SummerCampCard.vue')['default']
TermsPopup: typeof import('./components/ui/TermsPopup.vue')['default']
VanButton: typeof import('vant/es')['Button']
VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanDatePicker: typeof import('vant/es')['DatePicker']
......
<!--
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-24 14:05:01
* @FilePath: /mlaj/src/components/layout/AppLayout.vue
* @Description: 文件描述
-->
<template>
<div class="bg-gradient-to-br from-green-50 via-teal-50 to-blue-50 min-h-screen pb-16">
<GradientHeader
v-if="title"
:title="title"
:showBackButton="showBackButton"
:onBack="handleBack"
:rightContent="rightContent"
/>
<main class="pb-16">
<main :class="{ 'pb-16': title, 'py-4': !title }">
<slot></slot>
</main>
<BottomNav v-if="!hideBottomNav" />
......@@ -20,7 +28,7 @@ import GradientHeader from '../ui/GradientHeader.vue'
const props = defineProps({
title: {
type: String,
required: true
required: false
},
showBackButton: {
type: Boolean,
......
......@@ -6,7 +6,7 @@
* @Description: 文件描述
-->
<template>
<AppLayout title="帮助中心">
<AppLayout>
<div class="bg-gradient-to-br from-green-50 via-green-100/30 to-blue-50/30 min-h-screen">
<div class="px-4 py-6">
<FrostedGlass class="rounded-xl overflow-hidden">
......
<!--
* @Date: 2025-03-24 12:56:07
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-24 13:07:40
* @LastEditTime: 2025-03-24 14:05:34
* @FilePath: /mlaj/src/views/profile/MessagesPage.vue
* @Description: 消息中心页面
-->
<template>
<AppLayout title="消息中心">
<AppLayout>
<div class="bg-gradient-to-br from-green-50 via-green-100/30 to-blue-50/30 min-h-screen">
<van-list
v-model:loading="loading"
......
<!--
* @Date: 2025-03-24 13:04:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-24 13:22:18
* @LastEditTime: 2025-03-24 14:05:18
* @FilePath: /mlaj/src/views/profile/SettingsPage.vue
* @Description: 用户设置页面
-->
<template>
<AppLayout title="设置">
<AppLayout>
<div class="bg-gradient-to-br from-green-50 via-green-100/30 to-blue-50/30 min-h-screen">
<div class="px-4 py-6">
<FrostedGlass class="rounded-xl overflow-hidden">
......