第一种利用Vue-CLI 基于脚手架2.0或者脚手架3.0
- nodejs https://nodejs.org/en/
- npm install -g cnpm --registry=https://registry.npm.taobao.org
- vue功能包 cnpm install -g @vue/cli
- 创建项目 vue create ownpage(项目名不能大写)
- 进入到项目根目录:添加iview依赖 cnpm install iview --save
- 运行 npm run serve 打包 npm run build
第二种 Vite 利用vue3新特性
- npm install -g create-vite-app
- create-vite-app projectName
- cd projectName
npm install
npm run dev