Commit 6b4e738352a5ea9a6fdea178f49d228bacd4c838

Authored by zhigang.li
1 parent b4c37946

update menu-group

Showing 1 changed file with 2 additions and 6 deletions   Show diff stats
src/components/menu/menu-group.vue
... ... @@ -6,10 +6,12 @@
6 6 </template>
7 7 <script>
8 8 import { findComponentUpward, findComponentsUpward } from '../../utils/assist';
  9 + import mixin from './mixin';
9 10 const prefixCls = 'ivu-menu';
10 11  
11 12 export default {
12 13 name: 'MenuGroup',
  14 + mixins: [ mixin ],
13 15 props: {
14 16 title: {
15 17 type: String,
... ... @@ -22,12 +24,6 @@
22 24 };
23 25 },
24 26 computed: {
25   - parentSubmenuNum () {
26   - return findComponentsUpward(this, 'Submenu').length;
27   - },
28   - hasParentSubmenu () {
29   - return findComponentUpward(this, 'Submenu');
30   - },
31 27 groupStyle () {
32 28 return this.hasParentSubmenu ? {
33 29 paddingLeft: 43 + (this.parentSubmenuNum - 1) * 28 + 'px'
... ...