table of Contents
Data processing component localized
routing logic jumps
component parameter passing
from father to son
child transmission parent
component lifecycle hook
route pass argument
family configure custom CSS and js
Summary:
component data localized treatment
regardless of page components or widgets, are likely to was repeatedly multiplexing
reason reusable components, in fact, reuse page structural components, page styles, page logic
but the data on the page needs to distinguish between (the two components of how much data are multiplexed is different), so the components do localized data processing
means may generate a function of the characteristics of local scope, each time multiplexed to produce an independent scope for assembly with
the syntax:
Data () {
return {
// data were
}
}
subassembly
<div class="beat" @click="count += 1">
{{ count }}下