theme.md 1.8 KB
Newer Older
D
DCloud_LXH 已提交
1 2 3 4
## uni.setAppTheme(options) @setapptheme

<!-- UTSAPIJSON.setAppTheme.description -->

DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
5 6
<!-- UTSAPIJSON.setAppTheme.compatibility -->

D
DCloud_LXH 已提交
7 8
<!-- UTSAPIJSON.setAppTheme.param -->

shutao-dc's avatar
shutao-dc 已提交
9 10 11
<!-- UTSAPIJSON.setAppTheme.returnValue -->

<!-- UTSCOMJSON.setAppTheme.example -->
D
DCloud_LXH 已提交
12 13 14 15 16 17 18

<!-- UTSAPIJSON.setAppTheme.tutorial -->

## uni.onOsThemeChange(callback) @onosthemechange

<!-- UTSAPIJSON.onOsThemeChange.description -->

DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
19 20
<!-- UTSAPIJSON.onOsThemeChange.compatibility -->

D
DCloud_LXH 已提交
21 22
<!-- UTSAPIJSON.onOsThemeChange.param -->

shutao-dc's avatar
shutao-dc 已提交
23 24 25
<!-- UTSAPIJSON.onOsThemeChange.returnValue -->

<!-- UTSCOMJSON.onOsThemeChange.example -->
D
DCloud_LXH 已提交
26

shutao-dc's avatar
shutao-dc 已提交
27 28 29 30
<!-- UTSAPIJSON.onOsThemeChange.tutorial -->

**注意:**
+ android 平台 android版本 10 开始支持深色模式主题 `dark`,低于10不支持深色模式主题
D
DCloud_LXH 已提交
31 32 33 34 35

## uni.offOsThemeChange(id) @offosthemechange

<!-- UTSAPIJSON.offOsThemeChange.description -->

DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
36 37
<!-- UTSAPIJSON.offOsThemeChange.compatibility -->

D
DCloud_LXH 已提交
38 39
<!-- UTSAPIJSON.offOsThemeChange.param -->

shutao-dc's avatar
shutao-dc 已提交
40
<!-- UTSAPIJSON.offOsThemeChange.returnValue -->
shutao-dc's avatar
shutao-dc 已提交
41

shutao-dc's avatar
shutao-dc 已提交
42
<!-- UTSCOMJSON.offOsThemeChange.example -->
shutao-dc's avatar
shutao-dc 已提交
43

shutao-dc's avatar
shutao-dc 已提交
44
<!-- UTSAPIJSON.offOsThemeChange.tutorial -->
D
DCloud_LXH 已提交
45 46 47 48 49

## uni.onAppThemeChange(callback) @onappthemechange

<!-- UTSAPIJSON.onAppThemeChange.description -->

DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
50 51
<!-- UTSAPIJSON.onAppThemeChange.compatibility -->

D
DCloud_LXH 已提交
52 53
<!-- UTSAPIJSON.onAppThemeChange.param -->

shutao-dc's avatar
shutao-dc 已提交
54 55 56
<!-- UTSAPIJSON.onAppThemeChange.returnValue -->

<!-- UTSCOMJSON.onAppThemeChange.example -->
D
DCloud_LXH 已提交
57 58 59 60 61 62 63

<!-- UTSAPIJSON.onAppThemeChange.tutorial -->

## uni.offAppThemeChange(id) @offappthemechange

<!-- UTSAPIJSON.offAppThemeChange.description -->

DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
64 65
<!-- UTSAPIJSON.offAppThemeChange.compatibility -->

D
DCloud_LXH 已提交
66 67
<!-- UTSAPIJSON.offAppThemeChange.param -->

shutao-dc's avatar
shutao-dc 已提交
68 69 70
<!-- UTSAPIJSON.offAppThemeChange.returnValue -->

<!-- UTSCOMJSON.offAppThemeChange.example -->
D
DCloud_LXH 已提交
71 72 73 74 75

<!-- UTSAPIJSON.offAppThemeChange.tutorial -->

<!-- UTSAPIJSON.general_type.name -->

DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
76
<!-- UTSAPIJSON.general_type.param -->