Nuxt/examples/custom-loading/components/loading.vue

38 lines
512 B
Vue
Raw Normal View History

2016-11-11 14:30:11 +00:00
<template lang="html">
<div class="loading-page" v-if="loading">
<p>Loading...</p>
</div>
</template>
<script>
export default {
data: () => ({
loading: false
}),
methods: {
start () {
this.loading = true
},
finish () {
this.loading = false
}
}
}
</script>
<style lang="css">
.loading-page {
width: 100%;
height: 100%;
background: white;
position: fixed;
top: 0;
left: 0;
text-align: center;
}
p {
margin-top: 200px;
font-size: 30px;
}
</style>