Blame view

src/components/menu/menu-group.vue 933 Bytes
8778b343   梁灏   init Menu components
1
  <template>
e05d7289   梁灏   update Menu
2
      <li :class="[prefixCls + '-item-group']">
3e3fba0e   zhigang.li   add style for men...
3
          <div :class="[prefixCls + '-item-group-title']" :style="groupStyle">{{ title }}</div>
e05d7289   梁灏   update Menu
4
5
          <ul><slot></slot></ul>
      </li>
8778b343   梁灏   init Menu components
6
7
  </template>
  <script>
3e3fba0e   zhigang.li   add style for men...
8
      import { findComponentUpward, findComponentsUpward } from '../../utils/assist';
6b4e7383   zhigang.li   update menu-group
9
      import mixin from './mixin';
e05d7289   梁灏   update Menu
10
11
      const prefixCls = 'ivu-menu';
  
8778b343   梁灏   init Menu components
12
      export default {
e05d7289   梁灏   update Menu
13
          name: 'MenuGroup',
6b4e7383   zhigang.li   update menu-group
14
          mixins: [ mixin ],
e05d7289   梁灏   update Menu
15
16
17
18
19
20
          props: {
              title: {
                  type: String,
                  default: ''
              }
          },
8778b343   梁灏   init Menu components
21
          data () {
e05d7289   梁灏   update Menu
22
23
              return {
                  prefixCls: prefixCls
b0893113   jingsam   :art: add eslint
24
              };
3e3fba0e   zhigang.li   add style for men...
25
26
          },
          computed: {
3e3fba0e   zhigang.li   add style for men...
27
              groupStyle () {
b2d676bd   zhigang.li   fixed the bug abo...
28
                  return this.hasParentSubmenu && this.mode !== 'horizontal' ? {
3e3fba0e   zhigang.li   add style for men...
29
30
31
                      paddingLeft: 43 + (this.parentSubmenuNum - 1) * 28 + 'px'
                  } : {};
              }
e05d7289   梁灏   update Menu
32
          }
b0893113   jingsam   :art: add eslint
33
34
      };
  </script>