亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - vue parent-child component passes data
高洛峰
高洛峰 2017-06-26 10:57:44
0
4
1125

The parent component passes an array to the child component. This data needs to be called in the child component. How to pass it?

1. The child component uses props to receive the data of the parent component and cannot be used in js.
2. Use the wacth method to monitor and not execute it at all.

Please answer from the master. Thank you!

高洛峰
高洛峰

擁有18年軟件開發(fā)和IT教學經(jīng)驗。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項目經(jīng)理、高級軟件工程師等職務。 網(wǎng)絡人氣名人講師,...

reply all(4)
小葫蘆

Props cannot be used in js? How do you use it

扔個三星炸死你

Post the code and see how you use it?

代言

You should be talking about the child component modifying the data passed by the parent component.

vue2 now has a one-way data flow, and child components are not allowed to modify the data of the parent component. Please see the documentation for details.
Link: https://cn.vuejs.org/v2/guide... After clicking the link, search for One-way data flow
The document also has detailed instructions on how to handle the situation when a child component wants to operate the data of the parent component.

洪濤

On vueX

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template