Skip to content

Commit 397c883

Browse files
authored
docs: 修复黑暗模式下demo页面样式异常
* docs: 修复黑暗模式下demo页面样式异常 * fix: 🐛 修复深色主题下文本颜色对比度规范问题 * fix: 🐛 修复深色主题下文本颜色对比度问题
1 parent 43e4f2b commit 397c883

3 files changed

Lines changed: 75 additions & 69 deletions

File tree

‎src/pages.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,9 +1331,10 @@
13311331
}
13321332
],
13331333
"tabBar": {
1334-
"color": "#7a7e83",
1335-
"selectedColor": "#1C64FD",
1336-
"backgroundColor": "#ffffff",
1334+
"color": "@color",
1335+
"selectedColor": "@selectedColor",
1336+
"backgroundColor": "@backgroundColor",
1337+
"borderStyle": "@borderStyle",
13371338
"list": [
13381339
{
13391340
"pagePath": "pages/index/Index",

‎src/pages/about/Index.vue‎

Lines changed: 61 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,71 @@
11
<template>
2-
<view class="page">
3-
<view class="page__hd">
4-
<view class="page__title">{{ $t('guanYuWoMen') }}</view>
5-
<view class="page__desc">
6-
{{ $t('woShiBuRuMoYuQuYiGeQianDuanDaGongZiWoHeWoDeXiaoHuoBanMenZhengZaiZhiLiYuKaiFaQingLiangGaoXiaoDeUniappZuJianKu') }}
2+
<page-wraper :use-wx-ad="false" :use-reward-fab="true">
3+
<view class="page">
4+
<view class="page__hd">
5+
<view class="page__title">{{ $t('guanYuWoMen') }}</view>
6+
<view class="page__desc">
7+
{{ $t('woShiBuRuMoYuQuYiGeQianDuanDaGongZiWoHeWoDeXiaoHuoBanMenZhengZaiZhiLiYuKaiFaQingLiangGaoXiaoDeUniappZuJianKu') }}
8+
</view>
79
</view>
8-
</view>
9-
<view class="page__bd">
10-
<view class="core-team">
11-
<view class="core-team__title">{{ $t('heXinTuanDui') }}</view>
12-
<view class="core-team__list">
13-
<view v-for="(collaborator, index) in githubData.collaborators" :key="index" class="core-team__member">
14-
<image :src="collaborator.avatar_url" class="core-team__avatar" />
15-
<view class="core-team__name" :title="collaborator.login">{{ collaborator.login }}</view>
10+
<view class="page__bd">
11+
<view class="core-team">
12+
<view class="core-team__title">{{ $t('heXinTuanDui') }}</view>
13+
<view class="core-team__list">
14+
<view v-for="(collaborator, index) in githubData.collaborators" :key="index" class="core-team__member">
15+
<image :src="collaborator.avatar_url" class="core-team__avatar" />
16+
<view class="core-team__name" :title="collaborator.login">{{ collaborator.login }}</view>
17+
</view>
1618
</view>
1719
</view>
18-
</view>
1920

20-
<view class="additional-links">
21-
<view class="additional-links__title">{{ $t('gengDuoXinXi') }}</view>
22-
<wd-cell-group border>
23-
<wd-cell
24-
:title="$t('yuYanQieHuan')"
25-
title-width="200px"
26-
:label="$t('dangQianYuYan') + ': ' + (currentLang === 'zh-CN' ? '中文' : 'English')"
27-
is-link
28-
@click="showLanguageSwitch = true"
29-
></wd-cell>
30-
<!-- #ifndef MP-ALIPAY -->
31-
32-
<wd-cell
33-
:title="$t('guanZhuGongZhongHao')"
34-
title-width="200px"
35-
:label="$t('uniappJiaoChengZuJianKuXunXiYiShouZhangWo')"
36-
@click="openWeChat"
37-
is-link
38-
></wd-cell>
39-
<wd-cell
40-
:title="$t('juanZeng')"
41-
title-width="200px"
42-
:label="$t('meiYiFenJuanZengDuShiDuiWoMenMoDaDeGuLi')"
43-
@click="donate"
44-
is-link
45-
></wd-cell>
46-
<!-- #ifdef MP-WEIXIN -->
47-
<wd-cell
48-
:title="$t('guanKanJiLiGuangGao')"
49-
title-width="200px"
50-
:label="$t('meiCiGuanKanDuShiDuiWoMenDeZhiChiXieXie')"
51-
@click="watchAd"
52-
is-link
53-
></wd-cell>
54-
<!-- #endif -->
55-
<!-- #endif -->
56-
</wd-cell-group>
21+
<view class="additional-links">
22+
<view class="additional-links__title">{{ $t('gengDuoXinXi') }}</view>
23+
<wd-cell-group border>
24+
<wd-cell
25+
:title="$t('yuYanQieHuan')"
26+
title-width="200px"
27+
:label="$t('dangQianYuYan') + ': ' + (currentLang === 'zh-CN' ? '中文' : 'English')"
28+
is-link
29+
@click="showLanguageSwitch = true"
30+
></wd-cell>
31+
<!-- #ifndef MP-ALIPAY -->
32+
33+
<wd-cell
34+
:title="$t('guanZhuGongZhongHao')"
35+
title-width="200px"
36+
:label="$t('uniappJiaoChengZuJianKuXunXiYiShouZhangWo')"
37+
@click="openWeChat"
38+
is-link
39+
></wd-cell>
40+
<wd-cell
41+
:title="$t('juanZeng')"
42+
title-width="200px"
43+
:label="$t('meiYiFenJuanZengDuShiDuiWoMenMoDaDeGuLi')"
44+
@click="donate"
45+
is-link
46+
></wd-cell>
47+
<!-- #ifdef MP-WEIXIN -->
48+
<wd-cell
49+
:title="$t('guanKanJiLiGuangGao')"
50+
title-width="200px"
51+
:label="$t('meiCiGuanKanDuShiDuiWoMenDeZhiChiXieXie')"
52+
@click="watchAd"
53+
is-link
54+
></wd-cell>
55+
<!-- #endif -->
56+
<!-- #endif -->
57+
</wd-cell-group>
58+
</view>
5759
</view>
60+
<wd-action-sheet
61+
v-model="showLanguageSwitch"
62+
:actions="languageActions"
63+
:cancel-text="$t('qu-xiao')"
64+
:title="$t('yuYanQieHuan')"
65+
@select="handleLanguageSelect"
66+
/>
5867
</view>
59-
<wd-action-sheet
60-
v-model="showLanguageSwitch"
61-
:actions="languageActions"
62-
:cancel-text="$t('qu-xiao')"
63-
:title="$t('yuYanQieHuan')"
64-
@select="handleLanguageSelect"
65-
/>
66-
</view>
68+
</page-wraper>
6769
</template>
6870

6971
<script lang="ts" setup>
@@ -175,15 +177,13 @@ const watchAd = () => {
175177
176178
.page__intro {
177179
margin-top: 10px;
178-
color: #333;
179180
text-align: left;
180181
font-size: 14px;
181182
}
182183
183184
.page__bd {
184185
padding: 0 15px 30px 20px;
185186
user-select: none;
186-
background: #f9f9f9;
187187
border-radius: 10px;
188188
}
189189
@@ -195,7 +195,6 @@ const watchAd = () => {
195195
font-size: 18px;
196196
font-weight: bold;
197197
margin-bottom: 10px;
198-
color: #333;
199198
}
200199
201200
.core-team__list {
@@ -232,7 +231,6 @@ const watchAd = () => {
232231
overflow: hidden;
233232
text-overflow: ellipsis;
234233
margin: 0 auto;
235-
color: #333;
236234
}
237235
238236
// 移除了不再需要的language-switch相关样式
@@ -245,7 +243,6 @@ const watchAd = () => {
245243
font-size: 18px;
246244
font-weight: bold;
247245
margin-bottom: 10px;
248-
color: #333;
249246
}
250247
251248
.additional-links__icon {

‎src/theme.json‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@
55
"bgColor": "#000",
66
"bgTxtStyle": "light",
77
"bgColorTop": "#000",
8-
"bgColorBottom": "#000"
8+
"bgColorBottom": "#000",
9+
"color": "#C0C0C0",
10+
"selectedColor": "#4D80F0",
11+
"borderStyle": "white",
12+
"backgroundColor": "#1A1A1A"
913
},
1014
"light": {
1115
"navBgColor": "#FFF",
1216
"navTxtStyle": "black",
1317
"bgColor": "#F8F8F8",
1418
"bgTxtStyle": "dark",
1519
"bgColorTop": "#F8F8F8",
16-
"bgColorBottom": "#F8F8F8"
20+
"bgColorBottom": "#F8F8F8",
21+
"color": "#7a7e83",
22+
"selectedColor": "#1C64FD",
23+
"borderStyle": "black",
24+
"backgroundColor": "#ffffff"
1725
}
1826
}

0 commit comments

Comments
 (0)