bump: 2.2.1

This commit is contained in:
qingwei.li 2017-02-11 09:39:10 +08:00
commit 41e4cb1b04
6 changed files with 22 additions and 9 deletions

View file

@ -80,6 +80,7 @@ var genIndex = function (path, content) {
slug = ("#/" + path + "#" + id).replace(/\/+/, '/');
INDEXS[slug] = { slug: slug, title: text, body: '' };
} else {
if (!slug) { return }
// other html tag
if (!INDEXS[slug]) {
INDEXS[slug] = {};
@ -127,9 +128,11 @@ SearchComponent.prototype.render = function render (dom) {
SearchComponent.prototype.bindEvent = function bindEvent () {
var this$1 = this;
var input = document.querySelector('.search input');
var panel = document.querySelector('.results-panel');
var search = document.querySelector('.search');
var input = search.querySelector('.search input');
var panel = search.querySelector('.results-panel');
search.addEventListener('click', function (e) { return e.target.tagName !== 'A' && e.stopPropagation(); });
input.addEventListener('input', function (e) {
var target = e.target;

File diff suppressed because one or more lines are too long