2 回答
TA贡献2065条经验 获得超14个赞
问题出在../view/RegisterForm呈现自身的组件中:
<template>
<RegisterForm></RegisterForm><!-- this is the component itself not th child one-->
</template>
<script>
import RegisterForm from '@/components/Register-form';
export default {
components: {
RegisterForm
},
name: "RegisterForm"
}
</script>
<style scoped>
</style>
这会生成无限循环,要解决此问题,只需更改导入组件的名称:
<template>
<RegisterForm1></RegisterForm1>
</template>
<script>
import RegisterForm1 from '@/components/RegisterForm1';
export default {
components: {
RegisterForm1
},
name: "RegisterForm"
}
</script>
<style scoped>
</style>
TA贡献1833条经验 获得超4个赞
App.vue 中的更改 =>
<template>
<router-view />
</template>
<template>
<router-view :key="$route.path" />
</template>
添加回答
举报