“Vue项目搭建”的版本间的差异

来自小能手俱乐部
跳到导航 跳到搜索
第1行: 第1行:
== 项目搭建步骤 ==
== 项目搭建步骤 ==


=== '''1. vue环境搭建''' ===
== '''1. vue环境搭建''' ==
参考https://www.cnblogs.com/liuqiyun/p/8133904.html  
参考https://www.cnblogs.com/liuqiyun/p/8133904.html  


=== '''2. 安装webpack''' ===
== '''2. 安装webpack''' ==
npm install webpack –g
npm install webpack –g






'''3. 安装vue脚手架(旧版本)'''
== '''3. 安装vue脚手架(旧版本)''' ==
 
npm install vue-cli -g
npm install vue-cli -g



2021年11月12日 (五) 06:46的版本

项目搭建步骤

1. vue环境搭建

参考https://www.cnblogs.com/liuqiyun/p/8133904.html

2. 安装webpack

npm install webpack –g


3. 安装vue脚手架(旧版本)

npm install vue-cli -g


Vue CLI >= 3 和旧版使用了相同的 vue 命令,所以 Vue CLI 2 (vue-cli) 被覆盖了。如果你仍然需要使用旧版本的 vue init 功能,你可以全局安装一个桥接工具:

npm i -g @vue/cli-init


vue init webpack test_web


Cd test_web

Npm run dev


浏览器访问

http://localhost:8080/


4.安装vue脚手架(新版本)

npm install -g @vue/cli


Vue create my_text


三种配置选择一种回车


Cd my_test

Npm run serve


访问 http://localhost:8081/



项目所在位置


参考资料

Node.js入门:http://www.runoob.com/nodejs/nodejs-tutorial.html

Npm命令:http://www.runoob.com/nodejs/nodejs-npm.html

Vue官网:https://cn.vuejs.org/

Vue CLI:https://cli.vuejs.org/zh/guide/

Es6常用语法:https://blog.csdn.net/itzhongzi/article/details/73330681

Element前端框架 https://element.faas.ele.me/#/zh-CN/component/installation