2 回答

TA貢獻(xiàn)2065條經(jīng)驗(yàn) 獲得超14個(gè)贊
問題出在../view/RegisterForm呈現(xiàn)自身的組件中:
<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>
這會(huì)生成無(wú)限循環(huán),要解決此問題,只需更改導(dǎo)入組件的名稱:
<template>
<RegisterForm1></RegisterForm1>
</template>
<script>
import RegisterForm1 from '@/components/RegisterForm1';
export default {
components: {
RegisterForm1
},
name: "RegisterForm"
}
</script>
<style scoped>
</style>

TA貢獻(xiàn)1833條經(jīng)驗(yàn) 獲得超4個(gè)贊
App.vue 中的更改 =>
<template>
<router-view />
</template>
<template>
<router-view :key="$route.path" />
</template>
添加回答
舉報(bào)