小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

成功ReferenceError: axios is not defined解決

 北方天空A 2020-08-03

(1)npm install --save axios vue-axios

(2)import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'

如上,先安裝npm,然后引入3個文件就可以了。下面是個例子

<template>

  <div class="app-container">

    <el-button type="text" @click="ee();">文字按鈕</el-button>

  </div>

</template>

<script>

import Vue from 'vue'

import axios from 'axios'

import VueAxios from 'vue-axios'

export default {

  methods: {

    ee() {

      axios({

        url: "http://rap2api./app/mock/121145/post",

        method: "post",

        data: {

          name: "小月",

        },

      }).then((res=> {

        console.log("請求結(jié)果:"res);

      });

    },

  },

};

</script>

    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多