mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[improvement] Sidebar: use relation mixin
This commit is contained in:
@@ -5,6 +5,10 @@ export function ChildrenMixin(parent) {
|
||||
computed: {
|
||||
parent() {
|
||||
return this[parent];
|
||||
},
|
||||
|
||||
index() {
|
||||
return this.parent.children.indexOf(this);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user