更改历史
* 2018-10-29 高天阳 初始化文档
npm install vue-fullpage --save
import VueFullpage from 'vue-fullpage'
Vue.use(VueFullpage)
var vueFullpage = require('vue-fullpage')
Vue.use(vueFullpage)
<div class="page-container">
<div v-page="opts" class="page-wp">
<div class="page page1">
<p class="part part1" v-animate="'slideIn'">
vue-fullpage
</p>
</div>
<div class="page page2">
<p class="part part2" v-animate="'slideIn'">
vue-fullpage
</p>
</div>
<div class="page page3">
<p class="part part3" v-animate="'slideIn'">
vue-fullpage
</p>
</div>
<div class="page page4">
<p class="part part4" v-animate="'fadeIn'">
vue-fullpage
</p>
</div>
</div>
</div>
<script>
export default {
data () {
return {
opts: {
start: 0,
dir: 'v',
loop: false,
duration: 500,
stopPageScroll: true,
beforeChange: function (prev, next) {
},
afterChange: function (prev, next) {
}
}
}
}
}
</script>
<style>
.page-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
</style>