Blame view

examples/routers/loading-bar.vue 707 Bytes
f97e5bb0   梁灏   support LoadingBar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  <template>
      <div>
          <i-button @click.native="start">Start</i-button>
          <i-button @click.native="finish">Finish</i-button>
          <i-button @click.native="error">Error</i-button>
      </div>
  </template>
  <script>
      export default {
          methods: {
              start () {
                  this.$Loading.start();
              },
              finish () {
                  this.$Loading.finish();
              },
              error () {
                  this.$Loading.error();
              }
          },
          created () {
              this.$Loading.config({
                  color: '#5cb85c',
                  failedColor: '#f0ad4e',
                  height: 5
              });
          }
      }
  </script>