Merge branch '2.0' into anchor
This commit is contained in:
commit
754eedf571
156 changed files with 61134 additions and 18815 deletions
|
@ -233,12 +233,12 @@ export function findComponentsUpward (context, componentName) {
|
|||
}
|
||||
|
||||
// Find brothers components
|
||||
export function findBrothersComponents (context, componentName) {
|
||||
export function findBrothersComponents (context, componentName, exceptMe = true) {
|
||||
let res = context.$parent.$children.filter(item => {
|
||||
return item.$options.name === componentName;
|
||||
});
|
||||
let index = res.indexOf(context);
|
||||
res.splice(index, 1);
|
||||
let index = res.findIndex(item => item._uid === context._uid);
|
||||
if (exceptMe) res.splice(index, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue