Blame view

src/components/menu/mixin.js 491 Bytes
0b9c3d37   zhigang.li   update
1
  import { findComponentUpward, findComponentsUpward } from '../../utils/assist';
acba45fe   zhigang.li   move computed val...
2
  export default {
b2d676bd   zhigang.li   fixed the bug abo...
3
4
5
6
7
      data () {
          return {
              menu: findComponentUpward(this, 'Menu')
          };
      },
acba45fe   zhigang.li   move computed val...
8
      computed: {
a21e798b   zhigang.li   udpate
9
          hasParentSubmenu () {
b71a171d   梁灏   fixed Menu bug in...
10
              return !!findComponentUpward(this, 'Submenu');
a21e798b   zhigang.li   udpate
11
          },
acba45fe   zhigang.li   move computed val...
12
13
          parentSubmenuNum () {
              return findComponentsUpward(this, 'Submenu').length;
b2d676bd   zhigang.li   fixed the bug abo...
14
15
16
          },
          mode () {
              return this.menu.mode;
acba45fe   zhigang.li   move computed val...
17
18
          }
      }
0b9c3d37   zhigang.li   update
19
  };