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文件里面有一個(gè)getList方法 現(xiàn)在我想在vuex的action.js中使用這個(gè)getList方法應(yīng)該怎么辦呢?現(xiàn)在這樣提示 "export 'getList' was not found in '../api/index.js'
添加回答
舉報(bào)
0/150
提交
取消