Vuex Action 中 'export type UserActions' 报错的原因及解决方法
'export type UserActions = {
login({ commit }: ActionContext<UserState, RootState>, LoginParm: LoginParm):new Promise
-
缺少类型定义:可能缺少 'UserState' 和 'RootState' 的类型定义,或者缺少 'LoginParm' 和 'Result' 的类型定义。需要确认这些类型在代码的其他位置有正确的定义。
-
引用问题:可能缺少对 'ActionContext' 的正确引用。在 Vue.js 应用中,通常需要从 'vuex' 中引入 'ActionContext'。
需要进一步查看代码和报错信息,才能确定报错的具体原因和解决方法。
原文地址: https://www.cveoy.top/t/topic/njDu 著作权归作者所有。请勿转载和采集!