Blame view

src/components/menu/mixin.js 341 Bytes
a21e798b   zhigang.li   udpate
1
  import { hasParentSubmenu, findComponentUpward, findComponentsUpward } from '../../utils/assist';
acba45fe   zhigang.li   move computed val...
2
3
  export default {
      computed: {
a21e798b   zhigang.li   udpate
4
5
6
          hasParentSubmenu () {
              return findComponentUpward(this, 'Submenu');
          },
acba45fe   zhigang.li   move computed val...
7
8
9
10
11
          parentSubmenuNum () {
              return findComponentsUpward(this, 'Submenu').length;
          }
      }
  }