Skip to content

Commit f100f0d

Browse files
committed
fix site subnav
1 parent a2d818f commit f100f0d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

site/components/demo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
currentSubMenu.forEach(({ cnTitle, usTitle, id }) => {
4141
const title = isCN ? cnTitle : usTitle
4242
const className = window.location.hash === `#${id}` ? 'current' : ''
43-
lis.push(<li title={title} key={id}><a href={`#${id}`} class={className}>{title}</a></li>)
43+
lis.push(<li title={title}><a href={`#${id}`} class={className}>{title}</a></li>)
4444
})
4545
return (
4646
<a-affix>

site/components/demoBox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ export default {
5353
`not have usTitle`,
5454
)
5555
}
56-
let id = ['components', name.replace('-cn', ''), 'demo', ...usTitle.split(' ')].join('-').toLowerCase()
56+
const id = ['components', name.replace('-cn', ''), 'demo', ...usTitle.split(' ')].join('-').toLowerCase()
5757
5858
if (this._store.store) {
5959
const { currentSubMenu } = this._store.store.getState()
60-
id = `${id}-${currentSubMenu.length + 1}`
60+
// id = `${id}-${currentSubMenu.length + 1}`
6161
this._store.store.setState({ currentSubMenu: [...currentSubMenu, { cnTitle, usTitle, id }] })
6262
}
6363
return {

0 commit comments

Comments
 (0)