更新模板
This commit is contained in:
@@ -81,7 +81,9 @@ const getTheme = () => {
|
||||
const appInfo = uni.getAppBaseInfo();
|
||||
// @ts-ignore
|
||||
const appTheme = appInfo.appTheme as string;
|
||||
const osTheme = uni.getSystemInfoSync().osTheme!;
|
||||
// Use fallback or specific API for osTheme if possible, otherwise getSystemInfoSync is the only way for osTheme currently
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
const osTheme = sysInfo.osTheme!;
|
||||
|
||||
// 如果 appTheme 为 auto,则跟随系统主题,否则使用 appTheme
|
||||
value = appTheme == "auto" ? osTheme : appTheme;
|
||||
|
||||
Reference in New Issue
Block a user