Skip to content

Commit 8ae735e

Browse files
author
davidysxue
committed
feat: darkmode
1 parent ed9a5f9 commit 8ae735e

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,13 @@ npm run clean
3737
```
3838
npm run clean-dev
3939
```
40+
41+
## 适配 DarkMode
42+
43+
在根结点(或组件的外层结点)增加属性 `data-weui-theme="dark"`,即把 WeUI 组件切换到 DarkMode 的表现,如:
44+
45+
```html
46+
<view data-weui-theme="dark">
47+
...
48+
</view>
49+
```

package-lock.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/demo/example/cell/cell.wxml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@
2525
</mp-cells>
2626

2727
<mp-cells title="带跳转的列表项">
28-
<mp-cell link hover value="有hover效果" footer="说明文字">
28+
<mp-cell hover value="有hover效果,无跳转URL" footer="说明文字">
2929
<image slot="title" src="{{icon}}" style="margin-right: 16px;vertical-align: middle;width:20px; height: 20px;"></image>
3030
</mp-cell>
31-
<mp-cell link value="无hover效果" footer="说明文字">
32-
<image slot="icon" src="{{icon}}" style="margin-right: 16px;vertical-align: middle;width:20px; height: 20px;"></image>
33-
</mp-cell>
34-
<mp-cell link url="../index" value="无hover效果,带跳转URL" footer="说明文字">
31+
<mp-cell link url="./cell" value="有跳转URL" footer="说明文字">
3532
<image slot="icon" src="{{icon}}" style="margin-right: 16px;vertical-align: middle;width:20px; height: 20px;"></image>
3633
</mp-cell>
3734
</mp-cells>

0 commit comments

Comments
 (0)