web123456

Vue Family Bucket

VueFamily bucket

Family Bucket, as the name suggests, is a necessary plug-in and framework for developing a complete medium and large single-page application project.
The core composition of a complete vue project containsvue-routervuexvue-resource/axios, and build toolsvue-cli

1. Vue-router

Vue-router is officialRouter Manager

Function:
1) Nested routes/view tables
2) Modular, component-based routing configuration
3) Routing parameters, query, wildcard characters
4) View transition effect based on transition system
5) Fine-grained navigation control
6) Links with automatic activation of CSS class
7) HTML5 history mode or hash mode will automatically downgrade in IE9
8) Custom scrollbar behavior.

Two, Vuex

Vuex is a specially developed applicationState management mode, it uses centralized storage to manage the state of all components of the application and ensures that the state changes in a predictable way with corresponding rules.

Under what circumstances should I use Vuex?
Vuex can help us manage shared state and comes with more concepts and frameworks. This requires a trade-off between short-term and long-term benefits. If you are not planning to develop large single page applications, using Vuex can be tedious and redundant. It's true - if your application is simple enough, you'd better not use Vuex. A simple store mode is enough for you. However, if you need to build a medium-to-large single-page application, you will most likely consider how to better manage state outside of the component, and Vuex will be a natural choice.

three,Axios

Axios is aHTTP library based on promise, can be used in the browser andmiddle.

characteristic:
1) Create XMLHttpRequests from the browser
2) Create http request from
3) Support Promise API
4) Intercept requests and responses
5) Convert request data and response data
6) Cancel the request
7) Automatically convert JSON data
8) Client supports defense XSRF

The difference between vue-resource and axios (why use axios)
vue-resource is a vue plugin. Mainly used in vue. And axios is an http request library. It can be used in both vue and react. And axios is compatible with the backendnodeThe server can also be used. So at present, axios is the first choice.

Four, Vue-cli

Vue-cli is also known asscaffold, is an officially defined development standard tool.

Features
1) Rich features
For Babel, TypeScript, ESLint, PostCSS, PWA,Unit Testingand End-to-end testing provide out-of-the-box support.
2) Easy to expand
Its plug-in system allows the community to build and share reusable solutions based on common needs.
3) No Eject required
Vue CLI is completely configurable without eject. This way your project can be updated for a long time.
4) Graphical interface above CLI
Create, develop and manage your projects with a supporting graphical interface.
5) Create a prototype immediately
Practice new inspiration instantly with a single Vue file.
6) Looking to the future
Easily produce native ES2015 code for modern browsers, or build your Vue components into native Web Components components.