Blame view

test/routers/more.vue 3.73 KB
7fa943eb   梁灏   init
1
  <style scoped>
7570318b   梁灏   fixed Tooltip pla...
2
3
4
5
      /*body{*/
          /*padding: 50px;*/
          /*height: 2000px;*/
      /*}*/
7fa943eb   梁灏   init
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
      .example-badge{
          width: 42px;
          height: 42px;
          border-radius: 6px;
          background: #eee;
          display: inline-block;
      }
  </style>
  <template>
  
      <Badge count="10">
          <a class="example-badge"></a>
      </Badge>
  
      <Tag color="green" closable @on-close="closed">管理员</Tag>
      <Progress :percent="50" status="active" :stroke-width="20">
  
      </Progress>
  
      <Circle :percent="p">
          {{p}}%
      </Circle>
      <br><br>
      <Timeline pending>
          <Timeline-item color="red">发布3.0版本</Timeline-item>
          <Timeline-item color="green">
d2203972   梁灏   add gutter to Row...
32
              <Icon type="cloak" slot="dot"></Icon>
7fa943eb   梁灏   init
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
              发布2.0版本
          </Timeline-item>
          <Timeline-item color="#ff6600">发布1.0版本</Timeline-item>
          <Timeline-item>发布里程碑版本</Timeline-item>
      </Timeline>
      <br><br>
      <Affix :offset-top="50" @on-change="affixChange">
          <Button>固定的图钉</Button>
      </Affix>
      <Back-top @on-click="backtop">
  
      </Back-top>
  
      <div style="width: 200px;height: 100px;border:1px solid #b2b2b2;position:relative">
          <!--<Spin size="large" fix>加载中...</Spin>-->
          <Spin size="large" fix v-if="spinShow">加载中...</Spin>
      </div>
      <div @click="spinShow = !spinShow">消失</div>
      <br><br>
  
abedec08   jingsam   simpilfy back-top...
53
54
55
      <i-button @click="nextStep">下一步</i-button>
      <i-button @click="step_status = 'error'">步骤3切换为错误</i-button>
      <i-button @click="step_process = 'error'">切换steps状态为error</i-button>
7fa943eb   梁灏   init
56
57
58
59
60
61
62
63
64
65
66
67
68
69
      <Breadcrumb separator="<b>=></b>">
          <Breadcrumb-item href="/index">首页</Breadcrumb-item>
          <Breadcrumb-item href="/my">我的</Breadcrumb-item>
          <Breadcrumb-item>
              <Icon type="photo"></Icon>照片
          </Breadcrumb-item>
      </Breadcrumb>
      <br>
      <Steps :current="1" status="error">
          <Step title="已完成" content="这里是该步骤的描述信息"></Step>
          <Step title="进行中" content="这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息"></Step>
          <Step title="待进行" content="这里是该步骤的描述信息"></Step>
      </Steps>
e1134de2   jingsam   not bundle vue in...
70
      <i-button @click="testStatus = 'process'">change Status</i-button>
7fa943eb   梁灏   init
71
72
  </template>
  <script>
e1134de2   jingsam   not bundle vue in...
73
      import { Badge, Tag, Progress, Circle, Timeline, Icon, Affix, iButton, BackTop, Spin, Steps, Breadcrumb} from 'iview';
7fa943eb   梁灏   init
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      const TimelineItem = Timeline.Item;
      const Step = Steps.Step;
      const BreadcrumbItem = Breadcrumb.Item;
  
      export default {
          components: {
              Badge,
              Tag,
              Progress,
              Circle,
              Timeline,
              TimelineItem,
              Icon,
              Affix,
e1134de2   jingsam   not bundle vue in...
88
              iButton,
7fa943eb   梁灏   init
89
90
91
92
93
94
95
96
              BackTop,
              Spin,
              Steps,
              Step,
              Breadcrumb,
              BreadcrumbItem
          },
          props: {
e1134de2   jingsam   not bundle vue in...
97
  
7fa943eb   梁灏   init
98
99
100
101
102
103
104
105
106
107
108
109
110
          },
          data () {
              return {
                  total: 512,
                  p: 50,
                  step_current: 0,
                  step_status: 'wait',
                  step_process: 'process',
                  spinShow: true,
                  testStatus: 'wait'
              }
          },
          computed: {
e1134de2   jingsam   not bundle vue in...
111
  
7fa943eb   梁灏   init
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
          },
          methods: {
              closed (e) {
                  console.log(e)
              },
              affixChange (status) {
                  console.log(status)
              },
              backtop () {
                  console.log('toppp')
              },
              nextStep () {
                  this.step_current += 1;
              }
          },
          ready () {
              setTimeout(() => {
                  this.p = 60;
              }, 1000)
          }
      }
e1134de2   jingsam   not bundle vue in...
133
  </script>