1.0.6 • Published 5 years ago
vue-list-animation v1.0.6
vue-list-animation
#简介 用于快速地使用列表的过渡效果。
安装
npm i vue-list-animation -S
import ListAnimation from 'vue-list-animation'
可传递参数
参数名 | 类型 | 说明 |
---|---|---|
x | String | x方向上初始的位置,默认为0 |
y | String | y方向锁初始的位置,默认为0 |
s | String | 初始的大小,默认为0 |
beforeEnter | Function | before-enter |
enter | Function | enter |
afterEnter | Function | afterEnter |
演示
<template>
<div id="app">
<list-animation>
<div v-for="(item, index) in lists" data-delay="index*50" :key="index"> {{item}}</div>
</list-animation>
</div>
</template>
<script>
import ListAnimation from 'vue-list-animation'
export default {
name: 'app',
components: { ListAnimation },
data () {
return {
lists: []
}
},
mounted() {
setTimeout(() => {
this.lists = [1,2,3,4,5,6];
}, 300)
}
}
</script>
<style>
</style>