编程知识 cdmana.com

The Vue family

 Vue Family bucket :vue + vue - router + vuex +axios

 Vue Is a progressive framework for building user interfaces , and React, They all claim to focus only on the view layer

  Introduce... In the file vue

    Such as : <script  src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.cjs.js"></script>

    Can be found in  https://www.bootcdn.cn/vue  Find the relevant version of js

  Take a look at a Demo:

 

 

 

 

 

  here , If the page shows Hello Vue!, It's normal operation .

 Vue - router:

    function :

  • Nested routing / View table
  • Modular 、 Component based routing configuration
  • Routing parameters 、 Inquire about 、 wildcard
  • be based on Vue.js Transition system view transition effect
  • Fine grained navigation control
  • With automatic activation CSS class Link to
  • HTML5 Historical patterns or hash Pattern , stay IE9 Auto downgrade in
  • Custom scrollbar behavior

 

  Vuex:

  Like React Yes Redux equally ,Vuex Is a special for Vue.js State management mode of application development , Suitable for developing large single page applications .

 

 

 

 axios:

 axios It's based on Promise For browsers and node.js Of HTTP client , It can help you :

  • Created from the browser XMLHttpRequest
  • from node.js issue http request
  • Support Promise API
  • Intercept requests and responses
  • Transform the request and response data
  • Cancel the request
  • Automatic conversion JSON data
  • Client support prevents CSRF/XSRF
When creating a project , To put axios On the installation , Installation command   cnpm init axios --save
 1. stay main.js Global configuration

 

 

 2. stay vue The operation

 

 

 
 
 

 

版权声明
本文为[Little rabbit_ Good boy]所创,转载请带上原文链接,感谢

Tags vue family
Scroll to Top