You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by hu...@apache.org on 2018/07/16 13:12:14 UTC

[incubator-dubbo-website] branch asf-site updated: fix: docs page sidemenu unselected (#52)

This is an automated email from the ASF dual-hosted git repository.

huxing pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new e55a702  fix: docs page sidemenu unselected (#52)
e55a702 is described below

commit e55a7026804c32a3070a55e6a30bd51f5444d5b5
Author: chenliandong <li...@alibaba-inc.com>
AuthorDate: Mon Jul 16 21:12:11 2018 +0800

    fix: docs page sidemenu unselected (#52)
---
 src/components/sidemenu/item.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/sidemenu/item.jsx b/src/components/sidemenu/item.jsx
index 3cc1fdd..e7c0d3b 100644
--- a/src/components/sidemenu/item.jsx
+++ b/src/components/sidemenu/item.jsx
@@ -12,7 +12,7 @@ export default class Item extends React.Component {
     if (hasChildren) {
       if (opened === undefined) {
         // 未配置展开,则是否展开由是否选中决定
-        opened = item.children.find(child => child.link === window.location.hash.split('?')[0].slice(1));
+        opened = item.children.find(child => child.link === window.location.hash.split('?')[0].slice(2));
       }
     } else {
       opened = false;
@@ -45,7 +45,7 @@ export default class Item extends React.Component {
             className={classnames({
               'menu-item': true,
               'menu-item-level-3': true,
-              'menu-item-selected': item.link === window.location.hash.split('?')[0].slice(1),
+              'menu-item-selected': item.link === window.location.hash.split('?')[0].slice(2),
             })}
             key={index}
             onClick={this.onItemClick}
@@ -65,7 +65,7 @@ export default class Item extends React.Component {
     const cls = classnames({
       'menu-item': true,
       'menu-item-level-2': true,
-      'menu-item-selected': item.link === window.location.hash.split('?')[0].slice(1),
+      'menu-item-selected': item.link === window.location.hash.split('?')[0].slice(2),
     });
     const style = {
       height: opened ? 36 * (item.children.length + 1) : 36,