久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      vue-resource怎么安裝

      安裝方法:1、打開cmd命令窗口,執(zhí)行“cd 項(xiàng)目目錄”和“npm i vue vue-resource –save-dev”命令;2、配置入口文件“main.js”,使用import命令導(dǎo)入vue-resource即可。

      vue-resource怎么安裝

      本教程操作環(huán)境:windows7系統(tǒng)、vue2.9.6版,DELL G3電腦。

      vue-resource是vue中使用的請(qǐng)求網(wǎng)絡(luò)數(shù)據(jù)的插件,這個(gè)插件是依賴于vue的,簡(jiǎn)單說就是用來調(diào)接口的。

      安裝

      cd 項(xiàng)目目錄 npm i vue vue-resource --save-dev

      在入口文件main.js中配置

      import VueResource from 'vue-resource'Vue.use(VueResource)

      vue-resource怎么安裝

      這樣就可以直接使用了:

      get請(qǐng)求:

      this.$http.get('地址',{params: {參數(shù)}}).then(function(res) {         console.log(res)        // 響應(yīng)成功回調(diào)     },function(res) {         console.log(res)        // 響應(yīng)錯(cuò)誤回調(diào)     })

      post請(qǐng)求:

      this.$http.post('地址',{參數(shù)},{emulateJSON:true}).then( function(res) {       console.log(res.data)     })

      jsonp請(qǐng)求:

      this.$http.jsonp("地址",{params:{參數(shù)}}).then( function(res){       console.log(res.data.s)     })

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)