nust 安装 vue-awesome-swiper

2020-04-23  本文已影响0人  奔跑吧老王

安装awesome-swiper

npm install vue-awesome-swiper --save

创建nuxt-awesome-plugin.js ,添加如下配置

import Vue from 'vue'
import VueAwesomeSwiper from 'vue-awesome-swiper/dist/ssr'

Vue.use(VueAwesomeSwiper)

在nuxt.config.js中添加如下配置:

  css: [
    { src: "swiper/dist/css/swiper.css" }
  ],
 /*
  ** Plugins to load before mounting the App
  */
  plugins: [
    { src: "~/plugins/swiper.js", ssr: false }
  ],
上一篇下一篇

猜你喜欢

热点阅读