Commit 7ec32642 authored by wangdanlei's avatar wangdanlei

增加findByNameVnode方法

parent 9ca0287c
...@@ -1620,6 +1620,14 @@ export function loadThirdJs(path) { ...@@ -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 { export default {
treeSetProp, treeSetProp,
treeFindBackArray, treeFindBackArray,
...@@ -1706,5 +1714,6 @@ export default { ...@@ -1706,5 +1714,6 @@ export default {
setUserRoleInfo, setUserRoleInfo,
getUserRoleInfo, getUserRoleInfo,
loadThirdJs, 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