Blame view

local/routers/tag.vue 1.96 KB
4ec205b6   梁灏   add Tag UI
1
  <template>
9dde24b6   梁灏   add LoadingBar co...
2
3
4
5
6
7
      <div>
          <Button @click="start">start</Button>
          <Button @click="destroy">destroy</Button>
          <Button @click="finish">finish</Button>
          <Button @click="error">error</Button>
          <Button @click="update">update</Button>
c1dcac7a   梁灏   add Progress UI
8
          <br><br>
385cfeba   梁灏   add Timeline UI
9
10
          <Timeline>
              <Timeline-item>
c649968a   梁灏   fix Timeline cust...
11
                  <Icon type="close-circled" slot="dot"></Icon>
385cfeba   梁灏   add Timeline UI
12
13
14
15
16
17
18
                  <p class="time">1976年</p>
                  <p class="content">Apple I 问世</p>
              </Timeline-item>
              <Timeline-item>
                  <p class="time">1984年</p>
                  <p class="content">发布 Macintosh</p>
              </Timeline-item>
385cfeba   梁灏   add Timeline UI
19
          </Timeline>
9dde24b6   梁灏   add LoadingBar co...
20
      </div>
4ec205b6   梁灏   add Tag UI
21
22
  </template>
  <script>
385cfeba   梁灏   add Timeline UI
23
      import { Tag, LoadingBar, Button, Progress, Icon, Timeline } from 'iview';
c1dcac7a   梁灏   add Progress UI
24
      const ButtonGroup = Button.Group;
385cfeba   梁灏   add Timeline UI
25
      const TimelineItem = Timeline.Item;
4ec205b6   梁灏   add Tag UI
26
27
      export default {
          components: {
9dde24b6   梁灏   add LoadingBar co...
28
              Tag,
c1dcac7a   梁灏   add Progress UI
29
30
31
              Button,
              Progress,
              ButtonGroup,
385cfeba   梁灏   add Timeline UI
32
              Timeline,
c649968a   梁灏   fix Timeline cust...
33
34
              TimelineItem,
              Icon
4ec205b6   梁灏   add Tag UI
35
36
37
38
39
40
          },
          props: {
          
          },
          data () {
              return {
c1dcac7a   梁灏   add Progress UI
41
                  percent: 0
4ec205b6   梁灏   add Tag UI
42
43
44
45
46
47
              }
          },
          computed: {
          
          },
          methods: {
9dde24b6   梁灏   add LoadingBar co...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
              start () {
                  LoadingBar.start();
              },
              destroy () {
                  LoadingBar.destroy();
              },
              finish () {
                  LoadingBar.finish();
              },
              error () {
                  LoadingBar.error();
              },
              update () {
                  LoadingBar.update(50);
c1dcac7a   梁灏   add Progress UI
62
63
64
65
66
67
68
69
70
71
72
73
              },
              add () {
                  if (this.percent >= 100) {
                      return false;
                  }
                  this.percent += 10;
              },
              minus () {
                  if (this.percent <= 0) {
                      return false;
                  }
                  this.percent -= 10;
9dde24b6   梁灏   add LoadingBar co...
74
              }
4ec205b6   梁灏   add Tag UI
75
76
77
          }
      }
  </script>