index.js
import { 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.js
import { 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'
犯罪嫌疑人X
相关分类