feat: 新增 config-provider 夜间模式偏好配置
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
<li>
|
||||
<h3>1.0.2 <span class="layui-badge-rim">2022-04-07</span></h3>
|
||||
<ul>
|
||||
<li>[新增] config-provider 组件 dark-partial 属性, 夜间主题偏好配置。(by @就眠儀式)</li>
|
||||
<li>[修复] page 组件 pages 属性为单数时, 页码计算错误。(by @就眠儀式)</li>
|
||||
<li>[修复] dark 模式 step 组件线条不显示。(by @莫名点)</li>
|
||||
</ul>
|
||||
|
||||
@@ -17,4 +17,40 @@
|
||||
<script setup>
|
||||
const theme = ref('dark')
|
||||
</script>
|
||||
```
|
||||
```
|
||||
|
||||
::: title 偏好设置
|
||||
:::
|
||||
|
||||
::: describe 当内置的夜间样式不满足要求时, 我们提供 dark-partial 配置偏好。
|
||||
:::
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<lay-config-provider :theme="theme" :dark-partial="darkPartial">
|
||||
<App />
|
||||
</lay-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const theme = ref('dark')
|
||||
|
||||
const darkPartial = {
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
grayscale: 0,
|
||||
darkSchemeBackgroundColor: "black";
|
||||
darkSchemeTextColor: "white";
|
||||
}
|
||||
</script>
|
||||
```
|
||||
::: describe brightness: 亮度
|
||||
:::
|
||||
::: describe contrast: 对比度
|
||||
:::
|
||||
::: describe grayscale: 灰度值
|
||||
:::
|
||||
::: describe darkSchemeBackgroundColor: 背景颜色
|
||||
:::
|
||||
::: describe darkSchemeTextColor: 文字颜色
|
||||
:::
|
||||
Reference in New Issue
Block a user