


How to use parent component to pass value to child component in vue-prop
Jun 02, 2018 pm 02:25 PMBelow I will share with you an article on how to pass values from a vue-prop parent component to a child component. It has a good reference value and I hope it will be helpful to everyone.
vue-prop is used by parent components to pass data to child components.
For example, the subcomponent is
child.vue
template: '<p>msg: {{msg}}</p>' props: ['msg'],
We specify a data name in the subcomponent called msg
Write
<child msg="hello, vue.js!"></child>
in the parent component so that we can see msg in the child component: hello, vue.js!
The above is what I compiled for everyone, I hope It will be helpful to everyone in the future.
Related articles:
A kind of angular method-level cache annotation (decorator)
Solves the problem of vue routing change page data not being Refresh problem
Solve the problem of vue single page using keep-alive page to return without refreshing
The above is the detailed content of How to use parent component to pass value to child component in vue-prop. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What software is crystaldiskmark? -How to use crystaldiskmark?

How to download foobar2000? -How to use foobar2000

How to use Xiaoai Speaker How to connect Xiaoai Speaker to mobile phone

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange?
