add LoadingBar component

add LoadingBar component
This commit is contained in:
梁灏 2016-09-22 13:42:59 +08:00
parent 4ec205b68d
commit 9dde24b629
14 changed files with 299 additions and 25 deletions

View file

@ -1,18 +1,18 @@
<template>
<Tag>标签一</Tag>
<Tag>标签二</Tag>
<Tag closable>标签三</Tag>
<Tag closable color="blue">标签一</Tag>
<Tag closable color="green">标签二</Tag>
<Tag closable color="red">标签三</Tag>
<Tag color="red">标签三</Tag>
<Tag closable color="yellow">标签四</Tag>
<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>
</template>
<script>
import { Tag } from 'iview';
import { Tag, LoadingBar, Button } from 'iview';
export default {
components: {
Tag
Tag,
Button
},
props: {
@ -26,7 +26,27 @@
},
methods: {
start () {
LoadingBar.start();
},
destroy () {
LoadingBar.destroy();
},
finish () {
LoadingBar.finish();
},
error () {
LoadingBar.error();
},
update () {
LoadingBar.update(50);
}
},
ready () {
LoadingBar.start();
setTimeout(function () {
LoadingBar.finish();
}, 2000)
}
}
</script>