Skip to content

Commit

Permalink
feat: 添加支持暗夜模式
Browse files Browse the repository at this point in the history
  • Loading branch information
mhpei committed May 17, 2024
1 parent 47ca0ca commit 6ef23e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/taro-ui-docs/components/sidebar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}

.darkbox {
// background-color: #434242;
background-color: #23272f;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/taro-ui-docs/lib/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ $black-100 : #C0C6CE;
$black-200 : #96A0AD;
$black-300 : #6B798C;
$black-400 : #4C5D73;
$black-500 : #5a2c36;
$black-500 : #2C405A;;
$black-600 : #273A52;
$black-700 : #213248;
$black-800 : #1B2A3F;
$black-900 : #101C2E;

$text-color : #3F536E;
$title-color : #5a2c45;
$title-color : #2C405A;;

$border-color-gray : #CCC;
$border-color-base : #C5D9E8;
Expand Down
9 changes: 4 additions & 5 deletions packages/taro-ui-docs/pages/docs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class Docs extends React.Component {
}

UNSAFE_componentWillReceiveProps(nextProps) {
// if (nextProps.location.pathname !== this.props.location.pathname) {
// this.refs.atMarkdown.scrollTo(0, 0)
// }
if (nextProps.location.pathname !== this.props.location.pathname) {
this.refs.atMarkdown.scrollTo(0, 0)
}
}

changeMode() {
Expand All @@ -47,8 +47,7 @@ class Docs extends React.Component {
render() {
const data = navsConfig.components
const { fixed, mode } = this.state
// const pathname = this.props.location.pathname
const pathname = '/docs/introduction'
const pathname = this.props.location.pathname
const reg = /\/\S+\/(\S+)/
const result = pathname.match(reg)
const curDemoPath = pathMap[result[1]] || ''
Expand Down

0 comments on commit 6ef23e3

Please sign in to comment.