index.jsimport { post, get } from './axios.js'let getList = function index (params) { return get('http://localhost/blog/public/index.php/api/home', params)
}export default {getList}actions.jsimport { getList } from '../api/index.js'getLists (val) {
getList.then(res => { console.log(res)
})
}api文件里面有一个getList方法 现在我想在vuex的action.js中使用这个getList方法应该怎么办呢?现在这样提示 "export 'getList' was not found in '../api/index.js'
添加回答
举报
0/150
提交
取消