iview/local/routers/tag.vue

79 lines
2 KiB
Vue
Raw Normal View History

2016-09-21 18:44:07 +08:00
<template>
<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>
2016-09-22 16:24:20 +08:00
<br><br>
2016-09-23 10:57:56 +08:00
<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>
</div>
2016-09-21 18:44:07 +08:00
</template>
<script>
2016-09-23 10:57:56 +08:00
import { Tag, LoadingBar, Button, Progress, Icon, Timeline, Page } from 'iview';
2016-09-22 16:24:20 +08:00
const ButtonGroup = Button.Group;
2016-09-22 17:10:01 +08:00
const TimelineItem = Timeline.Item;
2016-09-21 18:44:07 +08:00
export default {
components: {
Tag,
2016-09-22 16:24:20 +08:00
Button,
Progress,
ButtonGroup,
2016-09-22 17:10:01 +08:00
Timeline,
TimelineItem,
2016-09-23 10:57:56 +08:00
Icon,
Page
2016-09-21 18:44:07 +08:00
},
props: {
},
data () {
return {
2016-09-22 16:24:20 +08:00
percent: 0
2016-09-21 18:44:07 +08:00
}
},
computed: {
},
methods: {
start () {
LoadingBar.start();
},
destroy () {
LoadingBar.destroy();
},
finish () {
LoadingBar.finish();
},
error () {
LoadingBar.error();
},
update () {
LoadingBar.update(50);
2016-09-22 16:24:20 +08:00
},
add () {
if (this.percent >= 100) {
return false;
}
this.percent += 10;
},
minus () {
if (this.percent <= 0) {
return false;
}
this.percent -= 10;
}
2016-09-21 18:44:07 +08:00
}
}
</script>