support LoadingBar
support LoadingBar @Jetsly
This commit is contained in:
parent
d978690647
commit
f97e5bb01a
7 changed files with 71 additions and 22 deletions
|
@ -50,6 +50,7 @@ li + li { border-left: solid 1px #bbb; padding-left: 10px; margin-left: 10px; }
|
|||
<li><router-link to="/date">Date</router-link></li>
|
||||
<li><router-link to="/form">Form</router-link></li>
|
||||
<li><router-link to="/table">Table</router-link></li>
|
||||
<li><router-link to="/loading-bar">LoadingBar</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<router-view></router-view>
|
||||
|
|
|
@ -165,6 +165,10 @@ const router = new VueRouter({
|
|||
path: '/table',
|
||||
component: require('./routers/table.vue')
|
||||
},
|
||||
{
|
||||
path: '/loading-bar',
|
||||
component: require('./routers/loading-bar.vue')
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
|
29
examples/routers/loading-bar.vue
Normal file
29
examples/routers/loading-bar.vue
Normal file
|
@ -0,0 +1,29 @@
|
|||
<template>
|
||||
<div>
|
||||
<i-button @click.native="start">Start</i-button>
|
||||
<i-button @click.native="finish">Finish</i-button>
|
||||
<i-button @click.native="error">Error</i-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
start () {
|
||||
this.$Loading.start();
|
||||
},
|
||||
finish () {
|
||||
this.$Loading.finish();
|
||||
},
|
||||
error () {
|
||||
this.$Loading.error();
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.$Loading.config({
|
||||
color: '#5cb85c',
|
||||
failedColor: '#f0ad4e',
|
||||
height: 5
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue