vue项目实战

Posted fgxwan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue项目实战相关的知识,希望对你有一定的参考价值。

本文实战为主,没有基础,真正的基础是要从实战开始:::

安集vue集成环境:

npm install -g vue-cli

 

执行vue检查安装情况:


Options:
-V, --version output the version number
-h, --help output usage information

Commands:
init generate a new project from a template
list list available official templates
build prototype a new project
create (for v3 warning only)
help [cmd] display help for [cmd]

查看安装包:vue list

★ browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
★ browserify-simple - A simple Browserify + vueify setup for quick prototyping.
★ pwa - PWA template for vue-cli based on the webpack template
★ simple - The simplest possible Vue setup in a single html file
★ webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
★ webpack-simple

说明默认使用了webpack打包

使用webpack模板

执行    vue init webpack sell

会提示安装好多 环境:


C:UsersAdministrator>vue init webpack sell

? Project name sell
? Project description sell app
? Author xsy
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests Yes
? Pick a test runner jest
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm

vue-cli · Generated "sell".

 

进入目录   

cd sell

执行安装npm  install

安装好后  npm  run  dev   运行项目

提示下面这个的时候表示,能启用了

 

NE Compiled successfully in 109695ms 09:58:00

I Your application is running here: http://localhost:8080

 

























以上是关于vue项目实战的主要内容,如果未能解决你的问题,请参考以下文章

vue项目实战

Vue2+Cli3实战项目-饿了么

Vue项目实战-vue2(移动端)

VUE商城实战项目,一小时快速提高新段位

vue项目实战1

VUE项目实战3项目初始化