Vue/Nuxt use Animate.css
npm install vue-animatecss-mixineasy to use animate.css .
sh
# npm
npm install vue-animatecss-mixin --save-dev
`or
`sh
# yarn
yarn add vue-animatecss-mixin --dev
`$3
`js
import AnimateCssMixin from 'vue-animatecss-mixin'
export default {
mixins: [AnimateCssMixin],
}
`Usage
todo: need to improve...#### have to
`html
I'm animate.css demo
``js
beforeDestory() {
this.animateRemoveAllListener(/refs or targets/)
}
`#### use animate.css
`js
mounted() {
//-----------------play--------------------------
const refs = [ref0, ref1]
this.animatePlayground(refs)
}
`or
`js
mounted() {
// ----------------get element-------------------
const target0 = this.animateGetTarget(/ .className /) //-----------------play--------------------------
this.animatePlayground([target0])
}
`or
`js
mounted() {
// ----------------get element-------------------
const target0 = this.animateGetTarget(/ .className /))
// or
const target1 = this.animateGetTarget(/ #id /))
// or
const target2 = this.animateGetTarget(/ ref /)
// const target2 = ref //-----------------play--------------------------
const targets = [target0, target1, taget2]
this.animatePlayground(targets)
}
``