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)
})
}
There is a getList method in the api file. Now I want to use this getList method in vuex"s action.js. Now prompt "export "getList" was not found in". / api/index.js"