Commit f60d2298ca9f0d940e2900dec47fa8213d8de33c

Authored by cky
1 parent 75abb3bb

delete: collapse组件不需要的代码

Showing 1 changed file with 1 additions and 8 deletions   Show diff stats
src/components/collapse/collapse.vue
@@ -36,15 +36,8 @@ @@ -36,15 +36,8 @@
36 36
37 this.$children.forEach((child, index) => { 37 this.$children.forEach((child, index) => {
38 const name = child.name || index.toString(); 38 const name = child.name || index.toString();
39 - let isActive = false;  
40 39
41 - if (self.accordion) {  
42 - isActive = activeKey === name;  
43 - } else {  
44 - isActive = activeKey.indexOf(name) > -1;  
45 - }  
46 -  
47 - child.isActive = isActive; 40 + child.isActive = activeKey.indexOf(name) > -1;
48 child.index = index; 41 child.index = index;
49 }); 42 });
50 }, 43 },