Blame view

examples/routers/progress.vue 1.25 KB
5d08ddf2   梁灏   support Progress ...
1
2
  <template>
      <div>
8ac8d1ed   梁灏   修复警告
3
          <i-progress :percent="percent"></i-progress>
5d08ddf2   梁灏   support Progress ...
4
5
6
7
          <Button-group size="large">
              <Button icon="ios-plus-empty" @click.native="add"></Button>
              <Button icon="ios-minus-empty" @click.native="minus"></Button>
          </Button-group>
8ac8d1ed   梁灏   修复警告
8
9
          <i-progress :percent="25" :stroke-width="5"></i-progress>
          <i-progress :percent="100">
5d08ddf2   梁灏   support Progress ...
10
11
              <Icon type="checkmark-circled"></Icon>
              <span>成功</span>
8ac8d1ed   梁灏   修复警告
12
          </i-progress>
48921bf5   Rijn   add vertical prog...
13
14
15
16
17
          <i-progress :percent="percent"></i-progress>
          <div style="height: 150px">
              <i-progress vertical :percent="percent" :stroke-width="20" hide-info></i-progress>
              <i-progress vertical :percent="percent"></i-progress>
          </div>
5d08ddf2   梁灏   support Progress ...
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
      </div>
  </template>
  <script>
      export default {
          data () {
              return {
                  percent: 0
              }
          },
          methods: {
              add () {
                  if (this.percent >= 100) {
                      return false;
                  }
                  this.percent += 10;
              },
              minus () {
                  if (this.percent <= 0) {
                      return false;
                  }
                  this.percent -= 10;
              }
          }
      }
  </script>