Skip to content

Commit ef1801f

Browse files
author
chouchoui
committed
Web App 顶部状态栏兼容
1 parent e36694b commit ef1801f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

chavy.box.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ function printHtml(data, curapp = null, curview = 'app') {
708708
<title>BoxJs</title>
709709
<meta charset="utf-8" />
710710
<meta name="apple-mobile-web-app-capable" content="yes">
711+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
711712
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover" />
712713
<link rel="Bookmark" href="https://raw.githubusercontent.com/chavyleung/scripts/master/BOXJS.png" />
713714
<link rel="shortcut icon" href="https://raw.githubusercontent.com/chavyleung/scripts/master/BOXJS.png" />
@@ -719,6 +720,18 @@ function printHtml(data, curapp = null, curview = 'app') {
719720
[v-cloak]{
720721
display: none
721722
}
723+
body{
724+
padding-top: constant(safe-area-inset-top) !important;
725+
padding-top: env(safe-area-inset-top);
726+
}
727+
.v-app-bar, .v-navigation-drawer__content{
728+
box-sizing: content-box;
729+
padding-top: constant(safe-area-inset-top);
730+
padding-top: env(safe-area-inset-top);
731+
}
732+
.v-app-bar .v-autocomplete{
733+
box-sizing: border-box;
734+
}
722735
.v-bottom-navigation,
723736
.v-bottom-sheet {
724737
padding-bottom: constant(safe-area-inset-bottom);
@@ -756,7 +769,7 @@ function printHtml(data, curapp = null, curview = 'app') {
756769
<body>
757770
<div id="app">
758771
<v-app v-scroll="onScroll" v-cloak>
759-
<v-app-bar app dense>
772+
<v-app-bar app dense :color="darkMode ? undefined : '#F7BB0E'">
760773
<v-menu bottom left v-if="['app', 'home', 'log', 'sub'].includes(ui.curview) && box.syscfgs.env !== ''">
761774
<template v-slot:activator="{ on }">
762775
<v-btn icon v-on="on">

0 commit comments

Comments
 (0)