当前位置: 首页 > news >正文

一、vue介绍

一、介绍

vue式前端框架,是一套用于构建用户界面的渐进式框架

1、安装vue

安装node.js(配置环境变量)
https://nodejs.org/en/download/
更换镜像
npm config set registry https://registry.npm.taobao.org
查看镜像
npm config get registry
安装cnpm
npm install -g cnpm
配置cnpm镜像
cnpm config set registry http://registry.npm.taobao.org
安装vue脚手架
cnpm install -g @vue/cli
查看版本信息
vue --version

问题记录:

vue : 无法加载文件 D:\node-v18.14.2-win-x64\node_global\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com
/fwlink/?LinkID=135170 中的 about_Execution_Policies。解决(修改命令行安全策略):
get-ExecutionPolicy
# 显示Restricted (禁用)
set-ExecutionPolicy RemoteSigned
get-ExecutionPolicy
#显示RemoteSigned

2、创建项目

(1)创建工程

# 项目名称中不可以有大写字母
vue create vue-demoVue CLI v5.0.8
? Please pick a preset: (Use arrow keys)Default ([Vue 3] babel, eslint)       默认3的版本Default ([Vue 2] babel, eslint)       默认2的版本
>  Manually select features			   手动选择
选择手动选择(使用上下切换,使用回车选择)Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
>(*) Babel( ) TypeScript	(*) Progressive Web App (PWA) Support( ) Router	路由(导航)( ) Vuex	数据管理( ) CSS Pre-processors() Linter / Formatter	代码规范化(代码格式严格,取消勾选防止误报)( ) Unit Testing( ) E2E Testing使用空格勾选Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and 
? Check the features needed for your project: Babel, PWA
? Choose a version of Vue.js that you want to start the project with (Use arrow keys)
> 3.x2.x选择版本Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and 
? Check the features needed for your project: Babel, PWA
? Choose a version of Vue.js that you want to start the project with 3.x      
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> In dedicated config filesIn package.json配置存放位置Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and 
? Check the features needed for your project: Babel, PWA
? Choose a version of Vue.js that you want to start the project with 3.x      
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? (y/N) n
是否将选项设置为下次预设Vue CLI v5.0.8
✨  Creating project in E:\vsCode\vue\vue-demo.
⚙️  Installing CLI plugins. This might take a while...added 968 packages in 3m
�🚀  Invoking generators...
�📦  Installing additional dependencies...added 18 packages in 2m
⚓  Running completion hooks...�📄  Generating README.md...�🎉  Successfully created project vue-demo.
�👉  Get started with the following command$ cd vue-demo$ npm run serve
已经创建成功

(2)运行项目

进入目录
cd vue-demo
执行项目
npm run serveDONE  Compiled successfully in 6817ms                                                                                                          22:09:17App running at:- Local:   http://localhost:8080/- Network: http://192.168.1.8:8080/Note that the development build is not optimized.To create a production build, run npm run build.成功运行

二、vscode安装插件

插件插件名称:Vue Language Features (Volar)

http://www.lryc.cn/news/204773.html

相关文章:

  • Linux ARMv8 异常向量表
  • C++基类和派生类的内存分配,多态的实现
  • C/C++基础
  • MySQL基础练习题
  • 【C语言学习笔记 --- 动态内存管理】
  • Nougat来了,能否成为pdf格式转换的新神器?
  • C++文件和流
  • 代码随想录算法训练营第23期day31|贪心算法理论基础、455.分发饼干、376. 摆动序列、53. 最大子序和
  • mdadm命令详解及实验过程
  • 推荐几个程序员必逛的个人技术博客网站
  • Python桌面应用之XX学院水卡报表查询系统(Tkinter+cx_Oracle)
  • ubuntu 中使用Qt连接MMSQl,报错libqsqlodbc.so: undefined symbol: SQLAllocHandle
  • 笔试,猴子吃香蕉,多线程写法
  • 安装docker ,更换docker版本
  • 英语小作文写作模板及步骤(1)
  • 编写hello驱动程序
  • ZYNQ中断例程
  • 常用linux命令 linux_cmd_sheet
  • 【proteus】8086 写一个汇编程序并调试
  • 大数据之LibrA数据库常见术语(四)
  • Docker基础知识
  • swoole 是什么?
  • 我想要一个勋章
  • 微信小程序设计之主体文件app-json-pages
  • C语言-面试题实现有序序列合并
  • Android12 启动页适配
  • 【微服务保护】初识 Sentinel —— 探索微服务雪崩问题的解决方案,Sentinel 的安装部署以及将 Sentinel 集成到微服务项目
  • 20231023 比赛总结
  • Vite创建vue3+ts+pinia+vant项目起步流程
  • JVM 类的加载子系统