mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-02 12:26:36 +08:00
bug处理
This commit is contained in:
@@ -89,6 +89,7 @@ export function Layout() {
|
||||
)}
|
||||
<LayoutWorkspace
|
||||
routeKey={location.pathname}
|
||||
scrollKey={`${location.pathname}${location.search}`}
|
||||
userKey={user?.id}
|
||||
showMobileBottomNav={showMobileBottomNav}
|
||||
/>
|
||||
|
||||
@@ -31,6 +31,8 @@ type LayoutSidebarsProps = Omit<
|
||||
|
||||
type LayoutWorkspaceProps = {
|
||||
routeKey: string
|
||||
/** 滚动记忆的 key:含 query,让同一路径下的不同视图(如剧集面板)各记一份位置。 */
|
||||
scrollKey?: string
|
||||
userKey?: string
|
||||
showMobileBottomNav?: boolean
|
||||
}
|
||||
@@ -113,10 +115,11 @@ export function LayoutSidebars({
|
||||
|
||||
export function LayoutWorkspace({
|
||||
routeKey,
|
||||
scrollKey,
|
||||
userKey = 'anonymous',
|
||||
showMobileBottomNav = false,
|
||||
}: LayoutWorkspaceProps) {
|
||||
useScrollMemory(routeKey, userKey)
|
||||
useScrollMemory(scrollKey ?? routeKey, userKey)
|
||||
|
||||
const bottomPad = showMobileBottomNav
|
||||
? 'pb-[calc(3.75rem+env(safe-area-inset-bottom,0px))] lg:pb-10'
|
||||
|
||||
Reference in New Issue
Block a user