Props

You use props to allow a component to receive input from its parent. Props are immutable in the child component and are defined as part of the component definition object as shown in the following code:

<script>
export default {
name: 'Child',
props: {
greet: String,
},

}
</script>

In the preceding code, the Child component expects an input from its parent, specifically, a prop named greet of the type String.

Props support more definitions, such as default values and validation.
You can read more about it here: https://vuejs.org/v2/guide/components-props.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.14.93