Vue actual recording (2)

2019.10.2 ---- routing components, static layout

1, continue to use vant to complete the portion of the page layout as well as a handwritten page layout, the need for vant registered globally now main.js inside

 

 2, the need for repeated multiple pages in a separate part to public assembly, after the establishment of good components globally registered in main.js inside, then there would need to use where. Sign up global components as follows

 

 3, nesting route, when one of the following routing component also <router-view>, route list created is to be noted that one or two, which is to be present in the <router-view> in 

For example Product Details ons I've created is part of a <router-view> inside, then router.js inside route map list will need in the next level, this point is simple, but still have to pay attention to what

4, understand the point is that in fact the whole process is very simple static layout

Routing component placed under the views file (index.vue automatically found), the common components in the document components (both registered in the global component, may also be registered as a partial assembly), which Router to establish a routing list, mapped to a corresponding routing component routing, routing component jump which can <router-link> can also be programmed navigation.

 

Guess you like

Origin www.cnblogs.com/zyl0123/p/11617786.html