VUE- route (ii) Routing Configuration

router-view area of ​​the component is displayed

router-link to jump Properties -> go path to which

router-link-exact-active point of time who have the class who

router-link-active include this route will have the class 

Such as: Path: / learn / aaa

                 Which contains three paths: / (root), / learn, / learn / aaa

These three paths will have this router-link-active class

router-link to the wording of the three forms can be

Writing path and name of the need to bind ->: to

 

Configuration path:

Where the component on the views folder

A component as an example:

With a good path to write display page: (App.vue)

Then reset the elements of style, you can search in Baidu reset.css

Set styles folder in assets folder, files in the styles set in reset.css

reset.css content:

After the css file written into the main.js

Click bold font settings, set the router-link-exact-active properties, you can change the property name (see the previous code)

Guess you like

Origin www.cnblogs.com/tianya-guoke/p/11488827.html