Blame view

src/components/scroll/loading-component.vue 1.13 KB
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
                  <div v-if="text" :class="textClasses">{{text}}</div>
              </Spin>
  
          </div>
      </div>
  </template>
  
  <script>
f1702c48   梁灏   fix #3391
14
15
      import Spin from '../spin/spin.vue';
      import Icon from '../icon/icon.vue';
be01f0b4   Sergio Crisostomo   New component: Sc...
16
  
f1702c48   梁灏   fix #3391
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
      const prefixCls = 'ivu-scroll';
  
      export default {
          props: ['text', 'active', 'spinnerHeight'],
          components: { Spin, Icon },
          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`;
              }
be01f0b4   Sergio Crisostomo   New component: Sc...
40
          }
f1702c48   梁灏   fix #3391
41
      };
be01f0b4   Sergio Crisostomo   New component: Sc...
42
  </script>