mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
doc(config-provider): use os theme
This commit is contained in:
parent
df093103a9
commit
a457b75e0e
@ -6,6 +6,7 @@ theme
|
||||
namespace
|
||||
inherit-theme
|
||||
theme-environment
|
||||
os-theme
|
||||
language
|
||||
transparent
|
||||
```
|
||||
|
@ -0,0 +1,9 @@
|
||||
# Use OS Theme
|
||||
Naive-ui provides `$NOs.theme` property to get the current theme of your OS.
|
||||
```html
|
||||
<n-config-provider :theme="$NOs.theme">
|
||||
<n-card>
|
||||
Your current system theme is {{ JSON.stringify($NOs.theme) }}.
|
||||
</n-card>
|
||||
</n-config-provider>
|
||||
```
|
@ -6,6 +6,7 @@ theme
|
||||
namespace
|
||||
inherit-theme
|
||||
theme-environment
|
||||
os-theme
|
||||
language
|
||||
transparent
|
||||
```
|
||||
|
@ -0,0 +1,9 @@
|
||||
# 使用操作系统主题
|
||||
Naive-ui 提供 `$NOs.theme` 属性来获取当前操作系统的主题。
|
||||
```html
|
||||
<n-config-provider :theme="$NOs.theme">
|
||||
<n-card>
|
||||
当前操作系统的主题是 {{ JSON.stringify($NOs.theme) }}。
|
||||
</n-card>
|
||||
</n-config-provider>
|
||||
```
|
Loading…
Reference in New Issue
Block a user