반응형
이슈
should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`
원인
컴포넌트 참조 시 shallowRef 사용하지 않아서 발생
해결 방법
컴포넌트 참고를 shallowRef 사용하여 해결
import { shallowRef } from "vue";
import TodoPast from './TodoPast.vue';
...
...
export default{
setup()
{
const prov_compt = shallowRef(TodoPast);
...
...
...
}
}
<template>
<keep-alive>
<component :is="prov_compt"/>
</keep-alive>
</template>
반응형
'소프트웨어 개발 > Vue' 카테고리의 다른 글
vue vite, yarn - alias 경로(path) 설정 (0) | 2023.04.09 |
---|---|
윈도우 10/11 vue - yarn으로 vite 프로젝트 설정 (0) | 2023.04.09 |
[vuejs]비트 vite - Error [ERR_REQUIRE_ESM]: Must use import to load ES Module (0) | 2023.02.08 |
댓글