Blame view

src/components/scroll/loading-component.vue 943 Bytes
be01f0b4   Sergio Crisostomo   New component: Sc...
1
2
3
4
  <template lang="html">
      <div :class="wrapperClasses">
          <div :class="spinnerClasses">
              <Spin fix>
509014fb   梁灏   update Icons
5
                  <Icon type="ios-loading" size="18" :class="iconClasses"></Icon>
be01f0b4   Sergio Crisostomo   New component: Sc...
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
                  <div v-if="text" :class="textClasses">{{text}}</div>
              </Spin>
  
          </div>
      </div>
  </template>
  
  <script>
  const prefixCls = 'ivu-scroll';
  
  export default {
      props: ['text', 'active', 'spinnerHeight'],
      computed: {
          wrapperClasses() {
              return [
                  `${prefixCls}-loader-wrapper`,
                  {
                      [`${prefixCls}-loader-wrapper-active`]: this.active
                  }
              ];
          },
          spinnerClasses() {
              return `${prefixCls}-spinner`;
          },
          iconClasses() {
              return `${prefixCls}-spinner-icon`;
          },
          textClasses() {
              return `${prefixCls}-loader-text`;
          }
      }
  };
  </script>