Blame view

src/components/split/trigger.vue 1000 Bytes
8979c734   zhigang.li   add split components
1
  <template>
cd397a6f   梁灏   Split code format
2
3
4
5
      <div :class="classes">
          <div :class="barConClasses">
              <i :class="`${prefix}-bar`" v-once v-for="i in 8" :key="`trigger-${i}`"></i>
          </div>
8979c734   zhigang.li   add split components
6
      </div>
8979c734   zhigang.li   add split components
7
8
9
  </template>
  
  <script>
cd397a6f   梁灏   Split code format
10
11
12
13
      export default {
          name: 'Trigger',
          props: {
              mode: String
77376451   梁灏   fixed #3568
14
          },
cd397a6f   梁灏   Split code format
15
16
17
18
19
          data () {
              return {
                  prefix: 'ivu-split-trigger',
                  initOffset: 0
              };
77376451   梁灏   fixed #3568
20
          },
cd397a6f   梁灏   Split code format
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'
                  ];
              }
77376451   梁灏   fixed #3568
37
          }
cd397a6f   梁灏   Split code format
38
      };
8979c734   zhigang.li   add split components
39
  </script>