UNPKG

yw-common-list

Version:

基于vxe-table封装的自定义可配置表格

41 lines (36 loc) 913 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VueAxios = void 0; var VueAxios = { vm: {}, // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars install: function install(Vue) { var router = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var instance = arguments.length > 2 ? arguments[2] : undefined; if (this.installed) { return; } this.installed = true; if (!instance) { // eslint-disable-next-line no-console console.error('You have to install axios'); return; } Vue.axios = instance; Object.defineProperties(Vue.prototype, { axios: { get: function get() { return instance; } }, $http: { get: function get() { return instance; } } }); } }; exports.VueAxios = VueAxios;