GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — VueCnodeJS/vuexVersion at master · Lory996/VueCnodeJS

Expand file tree

/

vuexVersion

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

vuexVersion

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
build
build
 
 
config
config
 
 
src
src
 
 
static
static
 
 
.babelrc
.babelrc
 
 
README.md
README.md
 
 
index.html
index.html
 
 
package.json
package.json
 
 

README.md

Outline

VueCnodejs(Vuex版)

一个Vue的初/中级练手项目:重构CnodeJS社区

前言


看完Vuex文档之后,对于如何把它应用到实际项目中还是有点茫然。

找了一圈Gayhub,有Vuex的项目不是太大,就是太小,或者就是对Vuex的一些重要概念没有给出实际用例。

贼气。干脆,我把之前的项目用Vuex改造下得了。所以我就把VueCnodeJS给改造了下。

因为这个VueCnodeJS这个项目呢,是初级Vue项目,逻辑不复杂,但也涉及了5个组件,而且有从服务器获取数据的步骤,正好为Vuex的异步actions提供了很好的场景。

所以,如果你看完了Vuex文档,但是对在实际项目中怎么用它不太懂的话,这个项目就是为你准备的!

涉及了Vuex的 State,Getters,Mutations,Actions

PS: 其实没必要把组件里的所有数据都放到state.js里。但是为了练习Vuex嘛,就全从组件里分离出来了。(什么样的数据才应该放到state.js中?看文档 : )

本地运行


git clone https://github.com/shuiRong/VueCnodeJS.git 
cd VueCnodeJS/vuexVersion
npm install
npm run dev

(默认用的是8080端口)

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.