encountered such a problem in the vue project:
triggers an event of the child component, in which the emit triggers the custom event of the parent component and sends an array to the parent component.
after getting the array in the custom event in the parent component, it assigns a value to a variable defined in data, and then uses this variable to render a list.
the child component from beginning to end is only emit once in the whole code, that is, the parent component only accepts the array of child components once, and assigns a value to data only once after getting it.
but here comes the problem. I modified the array contents of the child component (push,splice), and the list in the parent component changed, so what happened?
then I wrote a demo, and found that if you pass a numeric value or string and modify it in the child component, the content in the parent component will not change.
is there anyone with this kind of problem? Find the solution