wiseyu
一个默默无闻的搬运工

1、安装route 用于路由管理

npm install vue-router --save

用法:

import VueRouter from 'vue-router'
Vue.use(VueRouter)

2、安装 element-ui 用于组件开发

npm i element-ui -S

用法:

import ElementUI from 'element-ui'
Vue.use(ElementUI)

3、qs 用于Get/Post请求时转换参数使用

npm install qs --save-dev

用法:import qs from 'qs'

let postData = qs.stringify({
        certificationAccount: that.certificationAccount,
        balance: that.balance
})

4、axios 用于接口请求

npm install axios

用法:

// Make a request for a user with a given ID
axios.get('/user?ID=12345')
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });

// Optionally the request above could also be done as
axios.get('/user', {
    params: {
      ID: 12345
    }
  })
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });

 

posted on 2020-03-14 16:08  wiseyu  阅读(560)  评论(0编辑  收藏  举报

Top