修复:留言板列表无法显示的问题
- 移除了 body-class 的 h-screen overflow-hidden 导致高度被截断吃掉列表的 bug
- 重构了分类导航和右侧留言流的布局,允许自然高度滚动和自适应显示
- 使得全局的 session('success') 能正常随着页面流展示出提示横幅
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
@section('body-class', 'flex flex-col h-screen overflow-hidden')
|
||||
|
||||
@section('body-data', "x-data=\"{ showWriteForm: false, towho: '{{ $defaultTo }}' }\"")
|
||||
|
||||
@section('content')
|
||||
@@ -82,10 +82,11 @@
|
||||
</div>
|
||||
|
||||
{{-- 主体内容区 --}}
|
||||
<div class="flex-1 flex overflow-hidden">
|
||||
<div class="flex max-w-7xl mx-auto mt-4 px-4 sm:px-6 lg:px-8">
|
||||
|
||||
{{-- 左侧:分类导航 --}}
|
||||
<div class="w-64 bg-white border-r border-gray-200 shrink-0 hidden md:flex flex-col">
|
||||
<div
|
||||
class="w-64 bg-white border border-gray-200 rounded-lg shrink-0 hidden md:flex flex-col mb-10 self-start sticky top-20">
|
||||
<div class="p-6 flex-1">
|
||||
{{-- 新建留言按钮 --}}
|
||||
<button
|
||||
@@ -117,7 +118,7 @@
|
||||
</div>
|
||||
|
||||
{{-- 右侧:留言流列表 --}}
|
||||
<main class="flex-1 overflow-y-auto p-4 sm:p-6 lg:p-8 bg-gray-50">
|
||||
<main class="flex-1 p-4 sm:p-0 md:pl-6 pb-20">
|
||||
<div class="max-w-4xl mx-auto space-y-4">
|
||||
|
||||
@forelse($messages as $msg)
|
||||
|
||||
Reference in New Issue
Block a user