Skip to content

Commit 6ef23e3

Browse files
author
mhpei
committed
feat: 添加支持暗夜模式
1 parent 47ca0ca commit 6ef23e3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

packages/taro-ui-docs/components/sidebar/style.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
}
1515

1616
.darkbox {
17-
// background-color: #434242;
1817
background-color: #23272f;
1918
}
2019

packages/taro-ui-docs/lib/default.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ $black-100 : #C0C6CE;
9191
$black-200 : #96A0AD;
9292
$black-300 : #6B798C;
9393
$black-400 : #4C5D73;
94-
$black-500 : #5a2c36;
94+
$black-500 : #2C405A;;
9595
$black-600 : #273A52;
9696
$black-700 : #213248;
9797
$black-800 : #1B2A3F;
9898
$black-900 : #101C2E;
9999

100100
$text-color : #3F536E;
101-
$title-color : #5a2c45;
101+
$title-color : #2C405A;;
102102

103103
$border-color-gray : #CCC;
104104
$border-color-base : #C5D9E8;

packages/taro-ui-docs/pages/docs.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Docs extends React.Component {
2929
}
3030

3131
UNSAFE_componentWillReceiveProps(nextProps) {
32-
// if (nextProps.location.pathname !== this.props.location.pathname) {
33-
// this.refs.atMarkdown.scrollTo(0, 0)
34-
// }
32+
if (nextProps.location.pathname !== this.props.location.pathname) {
33+
this.refs.atMarkdown.scrollTo(0, 0)
34+
}
3535
}
3636

3737
changeMode() {
@@ -47,8 +47,7 @@ class Docs extends React.Component {
4747
render() {
4848
const data = navsConfig.components
4949
const { fixed, mode } = this.state
50-
// const pathname = this.props.location.pathname
51-
const pathname = '/docs/introduction'
50+
const pathname = this.props.location.pathname
5251
const reg = /\/\S+\/(\S+)/
5352
const result = pathname.match(reg)
5453
const curDemoPath = pathMap[result[1]] || ''

0 commit comments

Comments
 (0)