設定する
src/main.js
import Vue from 'vue';
import axios from 'axios';
.
.
.
Vue.prototype.$http = axios.create(
  { baseURL: process.env.VUE_APP_API_URI, withCredentials: true },
);
呼び出す
.
.
.
  methods: {
    fetchItemList() {
      return new Promise((resolve) => {
        this.$http.get('/api/v1/items').then((response) => {
          this.itemList = response.data.index;
          resolve();
        }).catch(省略);
      });
    },
  },
.
.
.
みたいな感じで this.$http で呼び出せます
おしまい
