Blame view

src/components/menu/mixin.js 489 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
10
11
          hasParentSubmenu () {
              return findComponentUpward(this, 'Submenu');
          },
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
  };