mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-09-04 01:17:16 +00:00
fix: 适配 ios safari 浏览器暗黑模式
This commit is contained in:
@@ -29,10 +29,13 @@ export default defineNuxtConfig({
|
||||
|
||||
|
||||
let themeColor = '#fff';
|
||||
let themeStatus = 'default';
|
||||
if (theme === 'dark') {
|
||||
themeColor = '#333';
|
||||
themeStatus = 'black-translucent';
|
||||
} else {
|
||||
themeColor = '#ffffff';
|
||||
themeStatus = 'default';
|
||||
}
|
||||
|
||||
const androidMeta = document.createElement('meta');
|
||||
@@ -41,8 +44,8 @@ export default defineNuxtConfig({
|
||||
|
||||
const iosMeta = document.createElement('meta');
|
||||
iosMeta.name = 'apple-mobile-web-app-status-bar-style';
|
||||
iosMeta.content = themeColor;
|
||||
|
||||
iosMeta.content = themeStatus;
|
||||
|
||||
document.head.appendChild(androidMeta);
|
||||
document.head.appendChild(iosMeta);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user