Commit 0c6c1b37 by skynono Committed by GitHub

fix(wallet): 修复计费历史弹窗分页与列表重叠 (#5627)

base-ui 的 ScrollArea 仅靠 max-height 无法约束高度:其 Viewport 用
height:100%,当 Root 只有 max-height 而无确定高度时会回退为 auto,
内容撑满并溢出到 Root 之外,盖住下方分页。改用原生 max-h + overflow-y-auto
的 div,列表正确内部滚动,分页作为同级元素干净地排在下方。
parent 74091744
...@@ -35,7 +35,6 @@ import { ...@@ -35,7 +35,6 @@ import {
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label' import { Label } from '@/components/ui/label'
import { ScrollArea } from '@/components/ui/scroll-area'
import { import {
Select, Select,
SelectContent, SelectContent,
...@@ -145,7 +144,7 @@ export function BillingHistoryDialog({ ...@@ -145,7 +144,7 @@ export function BillingHistoryDialog({
</div> </div>
{/* Records List */} {/* Records List */}
<ScrollArea className='max-h-[min(54vh,520px)] pr-3 sm:pr-4'> <div className='max-h-[min(54vh,520px)] overflow-y-auto pr-1'>
{loading ? ( {loading ? (
<div className='space-y-3'> <div className='space-y-3'>
{Array.from({ length: 5 }).map((_, i) => ( {Array.from({ length: 5 }).map((_, i) => (
...@@ -275,7 +274,7 @@ export function BillingHistoryDialog({ ...@@ -275,7 +274,7 @@ export function BillingHistoryDialog({
})} })}
</div> </div>
)} )}
</ScrollArea> </div>
{/* Pagination */} {/* Pagination */}
{!loading && records.length > 0 && ( {!loading && records.length > 0 && (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment