Vue component development meeting

Component registration - global registration

  • component has two parameters, the first parameter is the name of the assembly,

  • The second parameter is regarded as a template object displayed in the Html,

  • Component templates can include the entire contents of a root tag, it can be a template string, namely: ``

  • Component allows multiple use, which have the data attribute, for each component when used alone protect their own data objects

  • Render as follows:

  • Of course property in the template template can be more than just property, there are many other attributes, then use a detailed explanation

Component registration - parts Sign up

  • Local name suggests is for topical use only, can only register its Vue examples use

  • Rendering follows

.

Guess you like

Origin www.cnblogs.com/chenchaoliang/p/12664130.html