先创建项目( 这儿使用的是yarn 使用npm也可以 )
yarn create @vitejs/app my-vue-app --template vue
cd my-vue-app
yarn
yarn dev
安装完成以后的样子
然后安装swiper
yarn add swiper
下载完swiper要引入 ( 此处是全局引入 )
在components下创建一个swiper.js
先创建项目( 这儿使用的是yarn 使用npm也可以 )
yarn create @vitejs/app my-vue-app --template vue
cd my-vue-app
yarn
yarn dev
安装完成以后的样子
然后安装swiper
yarn add swiper
下载完swiper要引入 ( 此处是全局引入 )
在components下创建一个swiper.js