current position:Home>Vue basic syntax

Vue basic syntax

2022-04-29 07:15:06Can't find the carved Yang Guo

One 、 Compute properties

1.1 The nature of computational properties


1.2 Compute properties and method It's the contrast

  • Calculation properties are used , It will only be called once
  • It's cached

Two 、 Event monitoring

2.1 The basic use of event listening

2.2 Parameter problem

  • You can omit parentheses You can also use $event Pass on event object

2.3 Modifier

  • stop
  • prevent
  • enter
  • once
  • native

3、 ... and 、 conditional

3.1 v-if/v-else-if/v-else

3.2 Log in to the small case

3.3 v-show v-if

Four 、 Circulation convenience

4.1 Convenient array

4.2 Convenience object

value key index

4.3 Array which methods are responsive

4.4 Completion of work

5、 ... and 、 Book cases

6、 ... and 、v-model Use ( Two way binding )

6.1 v-model Basic use of

6.2 v-model and radio/checkbox/select Use

6.3 Modifier


7、 ... and 、 Component development

7.1 Understand component-based development

7.2 Basic use of components

7.3 Whole play components and local components

7.4 Parent and child components

7.5 Syntax of component registration

7.6 The classification and writing of templates


7.7 Storage of data

The data of the child component cannot directly access the parent component
Own in subcomponents data It has to be a function
Why is it a function ( After a component is used many times , If only key value pairs are used, they will conflict with each other , The data generated by the method is separated from each other , No interaction )

7.8 Communication between parent and child components

Father's son props
Son father $emit Send

copyright notice
author[Can't find the carved Yang Guo],Please bring the original link to reprint, thank you.

Random recommended