📜  全局变量 vuejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:25.098000             🧑  作者: Mango

代码示例2
import Axios from 'axios'

// set global axios like this
Vue.prototype.$axios = Axios;

// call axios like this
this.$axios.get('https://jsonplaceholder.typicode.com/todos/1')