@@ -822,7 +822,7 @@ export default function DashboardPage() {
822822
823823 // 计算全局每列的最大宽度
824824 if ( filtered . length === 0 ) {
825- return { filteredPrices : filtered , badgeWidths : { input : 90 , cached : 90 , output : 90 } } ;
825+ return { filteredPrices : filtered , badgeWidths : { input : 98 , cached : 98 , output : 98 } } ;
826826 }
827827
828828 const maxInputLen = Math . max ( ...filtered . map ( p => String ( p . inputPricePer1M ) . length ) ) ;
@@ -832,9 +832,9 @@ export default function DashboardPage() {
832832 return {
833833 filteredPrices : filtered ,
834834 badgeWidths : {
835- input : Math . max ( 90 , 70 + maxInputLen * 8 ) ,
836- cached : Math . max ( 90 , 70 + maxCachedLen * 8 ) ,
837- output : Math . max ( 90 , 70 + maxOutputLen * 8 )
835+ input : Math . max ( 98 , 76 + maxInputLen * 9 ) ,
836+ cached : Math . max ( 98 , 76 + maxCachedLen * 9 ) ,
837+ output : Math . max ( 98 , 76 + maxOutputLen * 9 )
838838 }
839839 } ;
840840 } , [ prices , priceSearchQuery ] ) ;
@@ -2037,20 +2037,20 @@ export default function DashboardPage() {
20372037 < div className = "lg:col-span-3" >
20382038 < div className = "scrollbar-slim grid max-h-[420px] gap-3 overflow-y-auto pr-1" >
20392039 { filteredPrices . length ? filteredPrices . map ( ( price ) => (
2040- < div key = { price . model } className = { `flex items-center justify-between rounded-xl border px-4 py-3 ${ darkMode ? "border-slate-700 bg-slate-800/50" : "border-slate-200 bg-slate-50" } ` } >
2040+ < div key = { price . model } className = { `flex items-center justify-between rounded-xl border px-4 pt-3 pb-2.5 ${ darkMode ? "border-slate-700 bg-slate-800/50" : "border-slate-200 bg-slate-50" } ` } >
20412041 < div >
20422042 < p className = { `text-base font-semibold ${ darkMode ? "text-white" : "text-slate-900" } ` } > { price . model } </ p >
2043- < div className = "mt-1 grid grid-cols-3 gap-2 text-xs " >
2044- < span className = { `inline-flex items-center justify-between rounded-full px-2 py-0.5 ${ darkMode ? "bg-rose-500/15 text-rose-200" : "bg-rose-100 text-rose-700" } ` } style = { { width : `${ badgeWidths . input } px` } } >
2045- < span > 输入</ span >
2043+ < div className = "mt-1.5 grid grid-cols-3 gap-2 text-sm leading-5 " >
2044+ < span className = { `inline-flex items-center justify-between rounded-full px-2 py-0 ${ darkMode ? "bg-rose-500/15 text-rose-200" : "bg-rose-100 text-rose-700" } ` } style = { { width : `${ badgeWidths . input } px` } } >
2045+ < span className = "font-medium" > 输入</ span >
20462046 < span className = "font-semibold tabular-nums" > ${ price . inputPricePer1M } /M</ span >
20472047 </ span >
2048- < span className = { `inline-flex items-center justify-between rounded-full px-2 py-0.5 ${ darkMode ? "bg-amber-500/15 text-amber-200" : "bg-amber-100 text-amber-700" } ` } style = { { width : `${ badgeWidths . cached } px` } } >
2049- < span > 缓存</ span >
2048+ < span className = { `inline-flex items-center justify-between rounded-full px-2 py-0 ${ darkMode ? "bg-amber-500/15 text-amber-200" : "bg-amber-100 text-amber-700" } ` } style = { { width : `${ badgeWidths . cached } px` } } >
2049+ < span className = "font-medium" > 缓存</ span >
20502050 < span className = "font-semibold tabular-nums" > ${ price . cachedInputPricePer1M } /M</ span >
20512051 </ span >
2052- < span className = { `inline-flex items-center justify-between rounded-full px-2 py-0.5 ${ darkMode ? "bg-emerald-500/15 text-emerald-200" : "bg-emerald-100 text-emerald-700" } ` } style = { { width : `${ badgeWidths . output } px` } } >
2053- < span > 输出</ span >
2052+ < span className = { `inline-flex items-center justify-between rounded-full px-2 py-0 ${ darkMode ? "bg-emerald-500/15 text-emerald-200" : "bg-emerald-100 text-emerald-700" } ` } style = { { width : `${ badgeWidths . output } px` } } >
2053+ < span className = "font-medium" > 输出</ span >
20542054 < span className = "font-semibold tabular-nums" > ${ price . outputPricePer1M } /M</ span >
20552055 </ span >
20562056 </ div >
0 commit comments