Commit 7ec32642 authored by wangdanlei's avatar wangdanlei

增加findByNameVnode方法

parent 9ca0287c
......@@ -1620,6 +1620,14 @@ export function loadThirdJs(path) {
}
})
}
export function findByNameVnode(obj, targetName) {
if (obj && obj.$vnode && obj.$vnode.tag && obj.$vnode.tag.includes(targetName)) {
return obj
} else {
return findByNameVnode(obj.$parent, targetName)
}
}
export default {
treeSetProp,
treeFindBackArray,
......@@ -1706,5 +1714,6 @@ export default {
setUserRoleInfo,
getUserRoleInfo,
loadThirdJs,
utilsList
utilsList,
findByNameVnode
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment