feat: use rollup to build component

This commit is contained in:
陈嘉涵
2017-08-12 22:33:13 +08:00
parent 6e35dfa177
commit 4555d82c8e
13 changed files with 665 additions and 49 deletions
+22
View File
@@ -0,0 +1,22 @@
/**
* 根据父组件名找到对应`parent`
*/
export default {
methods: {
findParentByComponentName(name) {
if (this.parentGroup) return;
let parent = this.$parent;
while (parent) {
if (parent.$options.name === name) {
this.parentGroup = parent;
break;
} else {
parent = parent.$parent;
}
}
return this.parentGroup;
}
}
};