[improvement] Sidebar: use relation mixin

This commit is contained in:
陈嘉涵
2019-05-06 20:37:09 +08:00
parent 8de7a287f6
commit 9c6c10fdcd
3 changed files with 13 additions and 33 deletions

View File

@@ -5,6 +5,10 @@ export function ChildrenMixin(parent) {
computed: {
parent() {
return this[parent];
},
index() {
return this.parent.children.indexOf(this);
}
},