fix --safe-area-inset-top
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: var(--tui-detail-empty-inset, calc(env(safe-area-inset-top, 0px) + 48px));
|
padding-top: var(--tui-detail-empty-inset, calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 48px));
|
||||||
// 必须有不透明背景:切换视图时它和旧内容同时在场,
|
// 必须有不透明背景:切换视图时它和旧内容同时在场,
|
||||||
// 透明的话提示文字会浮在还在滑出的页面上,看起来像重影。
|
// 透明的话提示文字会浮在还在滑出的页面上,看起来像重影。
|
||||||
background: var(--tui-detail-empty-background, var(--td-bg-color-page));
|
background: var(--tui-detail-empty-background, var(--td-bg-color-page));
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: calc(env(safe-area-inset-top, 0px) + 48px + 1rem);
|
padding-top: calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 48px + 1rem);
|
||||||
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
|
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@@ -75,7 +75,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.tui-navbar {
|
&.tui-navbar {
|
||||||
--tui-nav-height: calc(env(safe-area-inset-top, 0px) + 48px);
|
--tui-nav-height: calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 48px);
|
||||||
|
--td-navbar-padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
|
||||||
|
|
||||||
|
.t-navbar__content,
|
||||||
|
.t-navbar__placeholder {
|
||||||
|
height: var(--tui-nav-height);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.t-navbar__content {
|
.t-navbar__content {
|
||||||
color: var(--td-text-color-primary);
|
color: var(--td-text-color-primary);
|
||||||
@@ -102,6 +109,10 @@
|
|||||||
*/
|
*/
|
||||||
.tui-app-shell.is-rail {
|
.tui-app-shell.is-rail {
|
||||||
|
|
||||||
|
.rail {
|
||||||
|
padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
|
||||||
|
}
|
||||||
|
|
||||||
.t-navbar--fixed .t-navbar__content {
|
.t-navbar--fixed .t-navbar__content {
|
||||||
left: var(--tui-fixed-left, 0px);
|
left: var(--tui-fixed-left, 0px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ export function useMasterDetailPane(options: UseMasterDetailPaneOptions): UseMas
|
|||||||
if (options.syncQuery !== false) {
|
if (options.syncQuery !== false) {
|
||||||
watch([selectedId, editing], ([id, isEditing]) => {
|
watch([selectedId, editing], ([id, isEditing]) => {
|
||||||
// 窄屏走的是整页详情路由,列表页不该再改 query 把它顶掉
|
// 窄屏走的是整页详情路由,列表页不该再改 query 把它顶掉
|
||||||
if (!isWide.value) {
|
if (!isWide.value || route.path !== options.path) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,11 +349,12 @@ export function useMasterDetailPane(options: UseMasterDetailPaneOptions): UseMas
|
|||||||
if (options.syncQuery !== false) {
|
if (options.syncQuery !== false) {
|
||||||
watch(
|
watch(
|
||||||
() => [
|
() => [
|
||||||
|
route.path,
|
||||||
String(route.query[queryKey] || ""),
|
String(route.query[queryKey] || ""),
|
||||||
String(route.query[viewKey] || "")
|
String(route.query[viewKey] || "")
|
||||||
] as const,
|
] as const,
|
||||||
([nextId, nextView]) => {
|
([path, nextId, nextView]) => {
|
||||||
if (!isWide.value) {
|
if (!isWide.value || path !== options.path) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user