Blame view

test/routers/step.vue 3.59 KB
b8273bfc   jingsam   add a nav for tes...
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  <style>
  
  </style>
  <template>
      <Steps :current="1" size="small">
          <Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
          <Step title="进行中" content="这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息"></Step>
      </Steps>
      <br>
      <Steps :current="2">
          <Step title="已完成"></Step>
          <Step title="进行中"></Step>
          <Step title="待进行"></Step>
          <Step title="待进行"></Step>
      </Steps>
      <br>
      <Steps :current="1" size="small">
          <Step title="已完成"></Step>
          <Step title="进行中"></Step>
          <Step title="待进行"></Step>
          <Step title="待进行"></Step>
      </Steps>
      <br>
      <Steps :current="1" direction="vertical" size="small">
          <Step title="注册" icon="person-add"></Step>
          <Step title="上传头像" icon="camera" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
          <Step title="验证邮箱" icon="email"></Step>
      </Steps>
      <Steps :current="1" direction="vertical">
          <Step title="注册" icon="person-add"></Step>
          <Step title="上传头像" icon="camera" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
          <Step title="验证邮箱" icon="email"></Step>
      </Steps>
      <br>
      <p>当前正在进行第 {{ current + 1 }} 步</p>
      <Steps :current="current">
          <Step title="步骤1"></Step>
          <Step title="步骤2"></Step>
          <Step title="步骤3"></Step>
          <Step title="步骤4"></Step>
      </Steps>
      <i-button type="primary" @click="next">下一步</i-button>
      <br><br>
      <Steps :current="1" direction="vertical" size="small">
          <Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
          <Step title="进行中" content="这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息"></Step>
      </Steps>
      <br><br>
      <Steps :current="1" status="error">
          <Step title="已完成" content="这里是该步骤的描述信息"></Step>
          <Step title="进行中" content="这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息"></Step>
      </Steps>
  </template>
  <script>
e1134de2   jingsam   not bundle vue in...
61
      import { Page, Steps, iButton } from 'iview';
b8273bfc   jingsam   add a nav for tes...
62
63
64
65
66
67
68
69
  
      const Step = Steps.Step;
  
      export default {
          components: {
              Page,
              Steps,
              Step,
e1134de2   jingsam   not bundle vue in...
70
              iButton
b8273bfc   jingsam   add a nav for tes...
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
          },
          props: {
  
          },
          data () {
              return {
                  total: 512,
                  current: 0
              }
          },
          computed: {
  
          },
          methods: {
              setPage (page) {
                  console.log(page)
              },
              next () {
                  if (this.current == 3) {
                      this.current = 0;
                  } else {
                      this.current += 1;
                  }
              }
          }
      }
  </script>