refactor(core): adjust directory structure:

This commit is contained in:
qingwei.li 2017-02-16 23:37:39 +08:00 • committed by cinwell.li
commit aad62b65f5
20 changed files with 381 additions and 93 deletions

12
src/core/render/dom.js Normal file
View file

@ -0,0 +1,12 @@
const cacheNode = {}
export function getCacheNode (el) {
if (typeof el === 'string') {
const selector = el
el = cacheNode[el] || document.querySelector(el)
if (!el) console.error('Cannot find element:', selector)
}
return el
}