Vue Todo

本项目用于实战开发 Vue,用于学习使用 Vue。

准备工作

环境准备

  • node

node 入门

  • npm

npm

  • vue-cli

vue-cli

配置项目

  [sh]
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
40
41
42
43
44
45
46
47
48
49
50
51
$ vue init webpack vue-todo ? Project name vue-todo ? Project description Todo list implements of vue. ? Author houbb <1060732496@qq.com ? Vue build standalone ? Install vue-router? Yes ? Use ESLint to lint your code? Yes ? Pick an ESLint preset Standard ? Set up unit tests No ? Setup e2e tests with Nightwatch? No ? Should we run `npm install` for you after the project has been created? (recommended) npm vue-cli · Generated "vue-todo". # Installing project dependencies ... # ======================== > fsevents@1.2.4 install /Users/houbinbin/code/_github/vue-todo/node_modules/fsevents > node install [fsevents] Success: "/Users/houbinbin/code/_github/vue-todo/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" is installed via remote > uglifyjs-webpack-plugin@0.4.6 postinstall /Users/houbinbin/code/_github/vue-todo/node_modules/webpack/node_modules/uglifyjs-webpack-plugin > node lib/post_install.js npm notice created a lockfile as package-lock.json. You should commit this file. added 1311 packages from 701 contributors and audited 9284 packages in 36.712s found 1 moderate severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details Running eslint --fix to comply with chosen preset rules... # ======================== > vue-todo@1.0.0 lint /Users/houbinbin/code/_github/vue-todo > eslint --ext .js,.vue src "--fix" # Project initialization finished! # ======================== To get started: cd vue-todo npm run dev Documentation can be found at https://vuejs-templates.github.io/webpack

启动项目

  • 启动命令
  [sh]
1
2
$ cd vue-todo $ npm run dev
  • 启动日志
  [plaintext]
1
2
3
4
5
6
7
8
> vue-todo@1.0.0 dev /Users/houbinbin/code/_github/vue-todo > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js 95% emitting DONE Compiled successfully in 2870ms 15:52:54 I Your application is running here: http://localhost:8080

打开 http://localhost:8080 访问即可。

参考

todomvc

vue-todo