问答详情
源自:-

为什么报错

import { userStore } from "vuex";


export default defineComponent({

  name: "Home",

  components: {

    navhead,

    navmain,

    navfoot,

  },

  setup() {

     let store = userStore();这一句为什么会报错

 

    let list = computed(() => {

      return store.state.list;

    });

    return {

       list

    };

  },


提问者:慕田峪2325002 2022-02-24 16:04

个回答

  • o泡菜坛子o
    2022-03-02 22:04:00

    userStore --> useStore