Vue family bucket to achieve a small mobile mall
Learn react for some time, approaching the New Year. Thinking of changing jobs after the New Year, I want to look at the previous VUE again, after all, the current version is fast iteration. Just in time for the upcoming VUE-CLI 3.0 beta, let’s give it a try. Completed a mobile small mall demo, is a novice project.
The warehouse address
The online previewScan the QR code or open the browser on the computer to debug the mobile mode
- The first is global installation
npm install -g @vue/cli
/ / or
yarn global add @vue/cli
Copy the code
- Then, when you build the project, you can see that the directory structure becomes simpler. The build and config directories are gone, and vue-CLI still uses webpack but is configured by default. Only vue-config.js is available when you need to change the default configuration. I didn’t use it.
- Most people use templates and style preprocessing during development. These, too, simply install the corresponding dependencies. I am using puG and Sass to install the corresponding template dependency package, packaging tool has installed almost all loader by default, so directly use the line.
Project preview
Project summary
-
Static resources (previously the static directory of older scaffolds) are now placed
public
Under. -
HTTP requests are still used
axios
Simulate requests for local data, rote graphs and pop-ups using mint-UI. -
Shopping cart data usage
vuex
manage -
A novice project hopes to help you
Give a little star your support at the end