반응형
Vue 라우터가 View의 하위 구성 요소를 인식하지 못함
라우터가 내 보기 내부의 구성요소를 로드하지 않는 경우...
구조는 다음과 같다.
보기: (테스트 작동, finMain 실행 안 함)
<template>
<div>
<finMain></finMain>
<p>test</p>
</div>
</template>
<script>
export default {
name: 'FinView',
component: {
finMain: () => import("../components/finance/finMain"),
}
};
</script>
라우터:
export default new Router({
routes: [
{
path: "/financial",
name: "financial",
component: () => import("@/views/finView")
}
],
});
말하자면component: () => import("../components/finance/finMain")
내 라우터에서 그것은 작동한다...구성 요소를 뷰에 넣지 않으면...
이것이 내가 얻는 오류다:
Unknown custom element: <finMain> - did you register the component correctly?
For recursive components, make sure to provide the "name" option.
found in
---> <FinView>
<VApp>
<App> at src/App.vue
<Root>
그냥 잘못 쓴 것 같아, 바꿔봐.component: {
로components: {
.
참조URL: https://stackoverflow.com/questions/59502325/vue-router-not-recognizing-child-component-of-view
반응형
'Programing' 카테고리의 다른 글
경고:마운트 해제된 구성 요소에 대해 반응 상태 업데이트를 수행할 수 없음 (0) | 2022.03.29 |
---|---|
ActivitySubject에 가입했을 때 관찰 가능한 약속을 두 번 실행하지 않는 방법 (0) | 2022.03.29 |
vue composition api에서 라우터를 사용하는 방법? (0) | 2022.03.29 |
urllib, urllib2, urllib3 및 요청 모듈의 차이점은 무엇인가? (0) | 2022.03.29 |
어떻게 하면 곡선을 제대로 매끄럽게 할 수 있을까? (0) | 2022.03.29 |