Add logical treatment to 'accordion'
This commit is contained in:
parent
3e3fba0ec2
commit
a163daa07a
4 changed files with 38 additions and 5 deletions
|
@ -228,6 +228,16 @@ export function findComponentsUpward (context, componentName) {
|
|||
}
|
||||
}
|
||||
|
||||
// Find brothers components
|
||||
export function findBrothersComponents (context, componentName) {
|
||||
let res = context.$parent.$children.filter(item => {
|
||||
return item.$options.name === componentName;
|
||||
});
|
||||
let index = res.indexOf(context);
|
||||
res.splice(index, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
const trim = function(string) {
|
||||
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue