fix(dom): Disable the dom cache when vue is present, fixed #119

This commit is contained in:
qingwei.li 2017-03-10 11:58:27 +08:00
parent 0fddd1ced4
commit b9a7275c8f

View File

@ -10,6 +10,9 @@ const cacheNode = {}
*/
export function getNode (el, noCache = false) {
if (typeof el === 'string') {
if (typeof window.Vue !== 'undefined') {
return find(el)
}
el = noCache ? find(el) : (cacheNode[el] || (cacheNode[el] = find(el)))
}