Animate.css は非常に便利なアニメーション ライブラリです。vue での使用は非常に簡単です。最初にインストールしてください。
npm install animate.css --save
main.js でグローバルに導入される
「animate.css」からアニメーションをインポート
Vue.use(アニメーション)
ただし、パッケージ化後に dist パッケージを実行すると、エラーが報告されます。
理由: Vue.use (プラグイン) はこのプラグイン ファイルのインストール メソッドをトリガーします。animate.css は CSS ファイルであり、
Vue.use は CSS ファイルを渡すことができません
解決策: main.js の Vue.use(animated) をコメントアウトし、「animate.css/animate.css」を直接インポートします。
import animated from 'animate.css'
//Vue.use(animated)
または、animated.css に依存パッケージをインストールせずに、HTML ファイルに直接導入します。
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css をローカルに保存することもできます
続いて main.js に導入します