Home > front end > Vue parent component with condom components submitted to the Uncaught ReferenceError: always access
Vue parent component with condom components submitted to the Uncaught ReferenceError: always access
Time:09-24
Use the components in the vue set set of components, has been shown not to come out, remove the child components, immediately showed that tried several methods is still so, each great god give advice or comments please! The code is
I am the parent component, I will give the son's {{message}}
<script> Let temp={ The template: '# son', Data () { Return { The message: 'house' } }, Components: { Tem: tem } } Let tem={ The template: '& lt; Div> I am a child components & lt;/div> '
} New Vue ({ El: '# app, Components: { Temp } })
</script>
CodePudding user response:
Child component name dozen quotes, written "tem" : tem or write tem
CodePudding user response:
1/f, said is wrong, mainly is js execution order problems, tem is written in the temp underneath, temp component instantiation for tem, did not find, lead to mistakes, on the above,