vuejs3.0 从入门到精通——项目创建

项目创建

  完成 Vue CLI 脚手架的安装后,即可快速构建一个全新 Vue.js 项目,包括可初始化项目的整体结构、依赖包、插件等相关工作。

一、命令构建项目

1.1、创建项目:

1
2
3
4
5
6
7
[root@JumperServer:project_vue] # vue create vue3-element-plus-admin
 
Vue CLI v5.0.8
? Please pick a preset: (Use arrow keys)
❯ Default ([Vue 3] babel, eslint)  //默认 Vue3,仅安装 babel 和 eslint
  Default ([Vue 2] babel, eslint)
  Manually select features          //自定义选项安装

选择:Default ([Vue 3] babel, eslint)

1.2、选择包管理工具:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Vue CLI v5.0.8
? Please pick a preset: Default ([Vue 3] babel, eslint)
? Pick the package manager to use when installing dependencies: Yarn
 
Vue CLI v5.0.8
✨  Creating project in /zuoyang/project_vue/vue3-element-plus-admin.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...
 
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
 
success Saved lockfile.
Done in 18.39s.
🚀  Invoking generators...
📦  Installing additional dependencies...
 
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
 
success Saved lockfile.
Done in 4.75s.
⚓  Running completion hooks...
 
📄  Generating README.md...
 
🎉  Successfully created project vue3-element-plus-admin.
👉  Get started with the following commands:
 
 $ cd vue3-element-plus-admin
 $ yarn serve
 
[root@JumperServer:project_vue]

1.3、启动服务:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[root@JumperServer:project_vue] # cd vue3-element-plus-admin/
[root@JumperServer:vue3-element-plus-admin] # yarn serve
yarn run v1.22.19
warning ../../package.json: No license field
$ vue-cli-service serve
 INFO  Starting development server...
 
 
 
 DONE  Compiled successfully in 3545ms                                                                                                                          11:26:54 AM
 
 
  App running at:
  - Local:   http://localhost:8080/
  - Network: http://10.230.192.72:8080/
 
  Note that the development build is not optimized.
  To create a production build, run yarn build.
posted @   左扬  阅读(90)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
levels of contents
点击右上角即可分享
微信分享提示