mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
fix: 无法解析中文编码的hash
This commit is contained in:
parent
b77c044003
commit
74118a5447
@ -329,7 +329,7 @@ function router() {
|
||||
|
||||
if (sectionId) {
|
||||
$('html, body').animate({
|
||||
scrollTop: ($('#' + sectionId).offset().top)
|
||||
scrollTop: ($('#' + decodeURI(sectionId)).offset().top)
|
||||
}, 300);
|
||||
} else {
|
||||
if (location.hash !== '' || Boolean(perc)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user