vue3的项目报错[vuex] unknown action type: user/login


    import {
        useStore
    } from "vuex";
    // import {
    //     useRouter
    // } from 'vue-router'

    export default {
        setup() {
            const store = useStore()
            console.log(store)
            // const router = useRouter()
            async function loginToken() {
                store.dispatch('user/login', {
                    loginName: '',
                    username: "",
                    passsword: ""
                })
            }
            return {
                loginToken
            }
        }
    }

img

actions里定义的函数是login,dispatch写的是user/login