This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git
The following commit(s) were added to refs/heads/master by this push: new 0b06c7d fix sidebar scroll 0b06c7d is described below commit 0b06c7dcd6755249f58d1dde98d5c832171357bf Author: plainheart <y...@all-my-life.cn> AuthorDate: Fri Nov 11 18:26:09 2022 +0800 fix sidebar scroll --- components/partials/Sidebar.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/partials/Sidebar.vue b/components/partials/Sidebar.vue index 9fd6017..1bf6e83 100644 --- a/components/partials/Sidebar.vue +++ b/components/partials/Sidebar.vue @@ -106,7 +106,10 @@ export default Vue.extend({ mounted() { const $actived = this.$el.querySelector('.nav-link.nuxt-link-active') as HTMLElement - $actived?.scrollIntoView?.() + $actived?.scrollIntoView?.({ + block: 'nearest', + inline: 'start' + }) // @ts-ignore docsearch({ apiKey: '6ade5f1ff34e94690f9ea38cddcc2f55', --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org