Use of .mapState in Vuex computed is not defined

store. MapState using vuex is not defined;
is scaffolding built with vue-cli. Babel plugins all have
what is the problem


 ...mapstate  
Sep.16,2021

is mapGetters not mapState, use needs to introduce
import {mapGetters} from "vuex";


vuex you need to introduce
because you didn't introduce it, so you reported an error

.
import { mapState } from 'vuex';

see the official mapState helper function ide/state.html-sharpmapstate-%E8%BE%85%E5%8A%A9%E5%87%BD%E6%95%B0" rel=" nofollow noreferrer "> link description

for details.
Menu