2016-09-21 18:44:07 +08:00
|
|
|
<template>
|
2016-09-22 13:42:59 +08:00
|
|
|
<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>
|
|
|
|
</div>
|
2016-09-21 18:44:07 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2016-09-22 13:42:59 +08:00
|
|
|
import { Tag, LoadingBar, Button } from 'iview';
|
2016-09-21 18:44:07 +08:00
|
|
|
export default {
|
|
|
|
components: {
|
2016-09-22 13:42:59 +08:00
|
|
|
Tag,
|
|
|
|
Button
|
2016-09-21 18:44:07 +08:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
2016-09-22 13:42:59 +08:00
|
|
|
start () {
|
|
|
|
LoadingBar.start();
|
|
|
|
},
|
|
|
|
destroy () {
|
|
|
|
LoadingBar.destroy();
|
|
|
|
},
|
|
|
|
finish () {
|
|
|
|
LoadingBar.finish();
|
|
|
|
},
|
|
|
|
error () {
|
|
|
|
LoadingBar.error();
|
|
|
|
},
|
|
|
|
update () {
|
|
|
|
LoadingBar.update(50);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
ready () {
|
|
|
|
LoadingBar.start();
|
|
|
|
setTimeout(function () {
|
|
|
|
LoadingBar.finish();
|
|
|
|
}, 2000)
|
2016-09-21 18:44:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|