iissnan / hexo-theme-next

Elegant theme for Hexo.
http://notes.iissnan.com
MIT License
15.87k stars 3.62k forks source link

中文目录树 点击无法跳转 #2260

Open ioblog opened 3 years ago

ioblog commented 3 years ago

英文目录树正常,中文的目录树点击报错 post-details.js?v=5.1.4:76 Uncaught TypeError: Cannot read property 'top' of undefined at HTMLAnchorElement. (post-details.js?v=5.1.4:76) at HTMLAnchorElement.dispatch (index.js?v=2.1.3:3) at HTMLAnchorElement.r.handle (index.js?v=2.1.3:3)

DREAM-demo commented 2 years ago

同问,而且按照网上说的改了post-details后本地链接虽然还是乱码,但是可以跳转……

chenwingsing commented 2 years ago

目前我解决了一级标题的跳转,但是二级的中文标题显示不出来。

fge7s-7coin commented 2 years ago

同文,如何解决这个问题 Uncaught TypeError: Cannot read properties of undefined (reading 'top') at HTMLAnchorElement. (post-details.js?v=5.1.4:76) at HTMLAnchorElement.dispatch (index.js?v=2.1.3:3) at HTMLAnchorElement.r.handle (index.js?v=2.1.3:3)

LauArmy commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

Lwenkun commented 5 months ago
image

在 themes/next/source/js/utils.js 里添加这一行:

link.href = decodeURI(link.getAttribute('href'));