반응형
Vue.js 3 속성 '$store'가 'CreateComponentPublicInstance' 유형에 없습니다.
프로젝트에는 vue.js 3, typescript 및 vuex 4를 사용하고 있습니다.그런데 사용하다가 이 에러가 났어요.this.$store
나의 위에.vue
파일
Property '$store' does not exist on type 'CreateComponentPublicInstance<{}, {}, { exchanges: Exchange[]; isValidNodeUrl: boolean; isValidSelectedNetworks: boolean; web3: "" | Web3; privateKey: string; jsonKeystore: string; jsonKeystorePassword: string; ... 24 more ...; botIsRunning: boolean; }, ... 14 more ..., {}>'
추가했습니다.vuex.d.ts
이 문서에 근거하고 있습니다만, 같은 에러(https://next.vuex.vuejs.org/guide/typescript-support.html)가 표시됩니다.
import { Store } from "vuex";
import { ComponentCustomProperties } from "vue";
import { State } from "@/interfaces/bot";
declare module "@vue/runtime-core" {
// Declare your own store states.
interface ComponentCustomProperties {
$store: Store<State>;
}
}
누가 나 좀 도와줄래?
tsconfig.json을 확인합니다.에서 파일을 식별할 수 없습니다.다시 삭제하여 파일을 추가해 주세요.
언급URL : https://stackoverflow.com/questions/67900578/vue-js-3-property-store-does-not-exist-on-type-createcomponentpublicinstance
반응형
'programing' 카테고리의 다른 글
Java 11 패키지 javax.xml.bind가 없습니다. (0) | 2022.06.20 |
---|---|
Vue 2에서 템플릿을 재사용하려면 어떻게 해야 합니까? (0) | 2022.06.20 |
Java에서 clojure 호출 (0) | 2022.06.20 |
Vuej 및 부트스트랩 Vue에서 행 편집 (0) | 2022.06.20 |
Java8에서 람다를 사용하여 null이 아닌 경우에만 값 필터링 (0) | 2022.06.20 |