1. Please pay attention to installing node.js : If the version of node is too low, it will not work successfully
2. Based on node.js, use Taobao npm mirror to install related dependencies
Enter directly in cmd: npm install -g cnpm --registry= https://registry.npm.taobao.org , press Enter, wait for installation...
3. Install the global vue-cli scaffolding to help build the required template framework
In cmd 1) Enter: cnpm install -g vue-cli, press Enter, wait for installation...
2). Input: vue, press Enter, if vue information appears, it means success
4. Create a project
Enter in cmd: vue init webpack vue_test (project folder name), press Enter, wait for a while, the items under 'git' will appear in turn, you can operate as shown below
5. Install dependencies
In cmd 1). Enter: cd vue_test (project name), press Enter, enter the specific project folder
2). Input: cnpm install, press Enter, wait for a while
Go back to the project folder, you will find that there is an additional node_modules folder in the project structure (the contents of this file are the dependencies installed before)
The default project structure created based on scaffolding is shown below:
6. Whether the test environment is successfully built
Method 1: Enter in cmd: cnpm run dev
Method 2: Enter in the browser: localhost:8080 (the default port is 8080)
The effect after running is shown in the following figure: