Skip to content

Commit

Permalink
wip(uts android): 支持 manifestJson defaultAppTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyuWang committed May 22, 2024
1 parent 27bcc92 commit ec3fc6a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/uni-app-uts/src/plugins/android/manifestJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@ export function uniAppManifestPlugin(): Plugin {
const darkModeCode = darkMode
? `override darkmode: boolean = ${darkMode}`
: ''
const hasDefaultAppTheme =
['dark', 'light', 'auto'].indexOf(
manifestJson.app?.defaultAppTheme
) !== -1
const defaultAppThemeCode = hasDefaultAppTheme
? `override defaultAppTheme: string = "${manifestJson.app.defaultAppTheme}"`
: ''

const codes = [
singleThreadCode,
flexDirCode,
splashScreenCode,
darkModeCode,
defaultAppThemeCode,
]
.filter(Boolean)
.join('\n')
Expand Down

0 comments on commit ec3fc6a

Please sign in to comment.