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>
|
93064e3b
梁灏
add Page UI
|
9
10
11
12
13
14
15
16
17
18
19
20
|
<Page :total="100"></Page>
<Page :total="100" show-sizer></Page>
<Page :total="100" show-elevator></Page>
<Page :total="100" show-total></Page>
<br><br>
<Page :current="2" :total="50" simple></Page>
<br>
<Page :total="400" size="small"></Page>
<br>
<Page :total="400" size="small" show-elevator show-sizer></Page>
<br>
<Page :total="400" size="small" show-total></Page>
|
9dde24b6
梁灏
add LoadingBar co...
|
21
|
</div>
|
4ec205b6
梁灏
add Tag UI
|
22
23
|
</template>
<script>
|
93064e3b
梁灏
add Page UI
|
24
|
import { Tag, LoadingBar, Button, Progress, Icon, Timeline, Page } from 'iview';
|
c1dcac7a
梁灏
add Progress UI
|
25
|
const ButtonGroup = Button.Group;
|
385cfeba
梁灏
add Timeline UI
|
26
|
const TimelineItem = Timeline.Item;
|
4ec205b6
梁灏
add Tag UI
|
27
28
|
export default {
components: {
|
9dde24b6
梁灏
add LoadingBar co...
|
29
|
Tag,
|
c1dcac7a
梁灏
add Progress UI
|
30
31
32
|
Button,
Progress,
ButtonGroup,
|
385cfeba
梁灏
add Timeline UI
|
33
|
Timeline,
|
c649968a
梁灏
fix Timeline cust...
|
34
|
TimelineItem,
|
93064e3b
梁灏
add Page UI
|
35
36
|
Icon,
Page
|
4ec205b6
梁灏
add Tag UI
|
37
38
39
40
41
42
|
},
props: {
},
data () {
return {
|
c1dcac7a
梁灏
add Progress UI
|
43
|
percent: 0
|
4ec205b6
梁灏
add Tag UI
|
44
45
46
47
48
49
|
}
},
computed: {
},
methods: {
|
9dde24b6
梁灏
add LoadingBar co...
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
start () {
LoadingBar.start();
},
destroy () {
LoadingBar.destroy();
},
finish () {
LoadingBar.finish();
},
error () {
LoadingBar.error();
},
update () {
LoadingBar.update(50);
|
c1dcac7a
梁灏
add Progress UI
|
64
65
66
67
68
69
70
71
72
73
74
75
|
},
add () {
if (this.percent >= 100) {
return false;
}
this.percent += 10;
},
minus () {
if (this.percent <= 0) {
return false;
}
this.percent -= 10;
|
9dde24b6
梁灏
add LoadingBar co...
|
76
|
}
|
4ec205b6
梁灏
add Tag UI
|
77
78
79
|
}
}
</script>
|