Blame view

src/components/split/trigger.vue 866 Bytes
8979c734   zhigang.li   add split components
1
2
3
4
5
6
7
8
9
10
  <template>
    <div :class="classes">
      <div :class="barConClasses">
        <i :class="`${prefix}-bar`" v-once v-for="i in 8" :key="`trigger-${i}`"></i>
      </div>
    </div>
  </template>
  
  <script>
  export default {
77376451   梁灏   fixed #3568
11
12
13
      name: 'Trigger',
      props: {
          mode: String
8979c734   zhigang.li   add split components
14
      },
77376451   梁灏   fixed #3568
15
16
17
18
19
      data () {
          return {
              prefix: 'ivu-split-trigger',
              initOffset: 0
          };
8979c734   zhigang.li   add split components
20
      },
77376451   梁灏   fixed #3568
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
      computed: {
          isVertical () {
              return this.mode === 'vertical';
          },
          classes () {
              return [
                  this.prefix,
                  this.isVertical ? `${this.prefix}-vertical` : `${this.prefix}-horizontal`
              ];
          },
          barConClasses () {
              return [
                  `${this.prefix}-bar-con`,
                  this.isVertical ? 'vertical' : 'horizontal'
              ];
          }
8979c734   zhigang.li   add split components
37
      }
77376451   梁灏   fixed #3568
38
  };
8979c734   zhigang.li   add split components
39
  </script>