You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
376 B

  1. // 导入所有接口
  2. import api from './api'
  3. const install = Vue => {
  4. if (install.installed)
  5. return;
  6. install.installed = true;
  7. Object.defineProperties(Vue.prototype, {
  8. // 注意,此处挂载在 Vue 原型的 $api 对象上
  9. $api: {
  10. get() {
  11. return api
  12. }
  13. }
  14. })
  15. }
  16. export default install