fix(render): support html file

This commit is contained in:
qingwei.li 2017-02-19 00:10:38 +08:00 committed by cinwell.li
commit 7b6a2ac404
7 changed files with 35 additions and 18 deletions

View file

@ -9,7 +9,6 @@ export function scrollActiveSidebar () {
const anchors = dom.findAll('.anchor')
const sidebar = dom.find('.sidebar')
const wrap = dom.find(sidebar, '.sidebar-nav')
const height = sidebar.clientHeight
const nav = {}
const lis = dom.findAll(sidebar, 'li')
@ -54,6 +53,7 @@ export function scrollActiveSidebar () {
// scroll into view
// https://github.com/vuejs/vuejs.org/blob/master/themes/vue/source/js/common.js#L282-L297
if (!hoverOver && dom.body.classList.contains('sticky')) {
const height = sidebar.clientHeight
const curOffset = 0
const cur = active.offsetTop + active.clientHeight + 40
const isInView = (