@@ -81,14 +81,16 @@ var _directives2 = _interopRequireDefault(_directives);
8181
8282function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
8383
84+ var ANIMATE_CSS_CDN_LINK = 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css' ;
85+
8486var VAnimateCss = {
8587 install : function install ( Vue ) {
8688 var options = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ;
8789
8890 var animateCSSPath = options . animateCSSPath ;
8991 var link = document . createElement ( 'link' ) ;
9092 link . rel = 'stylesheet' ;
91- link . href = animateCSSPath || 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css' ;
93+ link . href = animateCSSPath || ANIMATE_CSS_CDN_LINK ;
9294 document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( link ) ;
9395
9496 ( 0 , _directives2 . default ) ( Vue ) ;
@@ -116,8 +118,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
116118
117119exports . default = function ( Vue ) {
118120 Vue . directive ( 'animate-css' , {
119- inserted : function inserted ( ) { } ,
120- bind : function bind ( el , binding ) {
121+ mounted : function mounted ( ) { } ,
122+ beforeMount : function beforeMount ( el , binding ) {
121123 var value = binding . value ,
122124 modifiers = binding . modifiers ;
123125
@@ -228,14 +230,14 @@ var animationEnd = exports.animationEnd = function animationEnd(el, value, modif
228230 el . addEventListener ( 'animationend' , function ( ) {
229231 var classes = el . classList ;
230232 _animations2 . default . forEach ( function ( item ) {
231- if ( classes . contains ( item ) ) {
232- el . classList . remove ( item ) ;
233+ if ( classes . contains ( 'animate__' + item ) ) {
234+ el . classList . remove ( 'animate__' + item ) ;
233235 if ( value . removeAfterAnimation ) {
234236 el . parentNode . removeChild ( el ) ;
235237 }
236238 }
237239 } ) ;
238- } , false ) ;
240+ } ) ;
239241} ;
240242
241243var animateNow = exports . animateNow = function animateNow ( el , value , modifiers ) {
@@ -266,7 +268,7 @@ var animateNow = exports.animateNow = function animateNow(el, value, modifiers)
266268 el . style [ 'animation-iteration-count' ] = '' + iteration ;
267269 }
268270
269- el . className = el . classList . value + ' animated ' + classes ;
271+ el . classList . add ( 'animate__animated' , 'animate__' + classes ) ;
270272
271273 animationEnd ( el , value , modifiers ) ;
272274} ;
@@ -275,7 +277,7 @@ var animateNow = exports.animateNow = function animateNow(el, value, modifiers)
275277/* 4 */
276278/***/ ( function ( module , exports ) {
277279
278- module . exports = [ "animated" , "bounce" , "flash" , "pulse" , "rubberBand" , "shake" , "headShake" , "swing" , "tada" , "wobble" , "jello" , "bounceIn" , "bounceInDown" , "bounceInLeft" , "bounceInRight" , "bounceInUp" , "bounceOut" , "bounceOutDown" , "bounceOutLeft" , "bounceOutRight" , "bounceOutUp" , "fadeIn" , "fadeInDown" , "fadeInDownBig" , "fadeInLeft" , "fadeInLeftBig" , "fadeInRight" , "fadeInRightBig" , "fadeInUp" , "fadeInUpBig" , "fadeOut" , "fadeOutDown" , "fadeOutDownBig" , "fadeOutLeft" , "fadeOutLeftBig" , "fadeOutRight" , "fadeOutRightBig" , "fadeOutUp" , "fadeOutUpBig" , "flipInX" , "flipInY" , "flipOutX" , "flipOutY" , "lightSpeedIn" , "lightSpeedOut" , "rotateIn" , "rotateInDownLeft" , "rotateInDownRight" , "rotateInUpLeft" , "rotateInUpRight" , "rotateOut" , "rotateOutDownLeft" , "rotateOutDownRight" , "rotateOutUpLeft" , "rotateOutUpRight" , "hinge" , "jackInTheBox" , "rollIn" , "rollOut" , "zoomIn" , "zoomInDown" , "zoomInLeft" , "zoomInRight" , "zoomInUp" , "zoomOut" , "zoomOutDown" , "zoomOutLeft" , "zoomOutRight" , "zoomOutUp" , "slideInDown" , "slideInLeft" , "slideInRight" , "slideInUp" , "slideOutDown" , "slideOutLeft" , "slideOutRight" , "slideOutUp" ]
280+ module . exports = [ "animated" , "bounce" , "backInDown" , "backInLeft" , "backInRight" , "backInUp" , "backOutDown" , "backOutLeft" , "backOutRight" , "backOutUp" , "bounceIn" , "bounceInDown" , "bounceInLeft" , "bounceInRight" , "bounceInUp" , "bounceOut" , "bounceOutDown" , "bounceOutLeft" , "bounceOutRight" , "bounceOutUp" , "flash" , "fadeIn" , "fadeInDown" , "fadeInDownBig" , "fadeInLeft" , "fadeInLeftBig" , "fadeInRight" , "fadeInRightBig" , "fadeInUp" , "fadeInUpBig" , "fadeInTopLeft" , "fadeInTopRight" , "fadeInBottomLeft" , "fadeInBottomRight" , "fadeOut" , "fadeOutDown" , "fadeOutDownBig" , "fadeOutLeft" , "fadeOutLeftBig" , "fadeOutRight" , "fadeOutRightBig" , "fadeOutUp" , "fadeOutUpBig" , "fadeOutTopLeft" , "fadeOutTopRight" , "fadeOutBottomLeft" , "fadeOutBottomRight" , "flipInX" , "flipInY" , "flipOutX" , "flipOutY" , "headShake" , "heartBeat" , "hinge" , "jello" , "jackInTheBox" , "lightSpeedInRight" , "lightSpeedInLeft" , "lightSpeedOutRight" , "lightSpeedOutLeft" , "pulse" , "rubberBand" , "rotateIn" , "rotateInDownLeft" , "rotateInDownRight" , "rotateInUpLeft" , "rotateInUpRight" , "rotateOut" , "rotateOutDownLeft" , "rotateOutDownRight" , "rotateOutUpLeft" , "rotateOutUpRight" , "rollIn" , "rollOut" , "shakeX" , "shakeY" , "swing" , "slideInDown" , "slideInLeft" , "slideInRight" , "slideInUp" , "slideOutDown" , "slideOutLeft" , "slideOutRight" , "slideOutUp" , "tada" , "wobble" , "zoomIn" , "zoomInDown" , "zoomInLeft" , "zoomInRight" , "zoomInUp" , "zoomOut" , "zoomOutDown" , "zoomOutLeft" , "zoomOutRight" , "zoomOutUp" ]
279281
280282/***/ } ) ,
281283/* 5 */
0 commit comments