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>
添加回答
舉報