2019.10.4 ---- request data transfer component values, data rendering
1 Home construction is a circular structure (tab + content), content here is the parent component (as well as the public assembly), content also includes carousel map, classification grids, product list three common sub-assemblies. As its structure, it is to be rendered according to the corresponding request data.
Inside the homepage index file created inside Axios period backend interface data request, the request was to save the data component of the data property. Inside the binding property index content request to get the data.
2, to get the value of parent components pass through the attribute value of parent element props
After 3, to get the value of the parent element subassembly pass over the necessary need to process the data into a format convenient value rendered
Because that can render data function return, of course, be a function of the v-for
4, navigation routes pass the senate program has achieved category category click to jump to the Product List goodslist inside and goodsbuy purchase details Click goodslist components can jump to the Product List
category category
Binding events, the transmission parameters programmed navigation
Jump to request goodslist components inside when data is requested with parameters, in order to request and want to render the corresponding data fields to the correct page
goodslist Product List
Binding events, the transmission parameters programmed navigation
Jump to request goodsbuy components inside when data is requested with parameters, in order to request and want to render the corresponding data fields to the correct page
For complex data request, it may do some simple processing, eleven attributes stored data inside. Ensure that the data needed to accurately get
5, in order to reduce duplication of data with the transmission request, the routing view inside with keep-alive Cache
But for Product Details list, you need to click on when to re-send the request, but can not use the cache, click New are the basic commodities