1- ' use strict' ;
1+ " use strict" ;
22
33var _typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) { return typeof obj ; } : function ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ;
44
55( function ( ) {
66
7- /**
8- * Copied from vue-resource
9- */
10-
11- var slice = [ ] . slice ;
12-
13-
14- function isFunction ( val ) {
15- return typeof val === 'function' ;
16- }
17-
18- var isArray = Array . isArray ;
19-
20- function isPlainObject ( obj ) {
21- return isObject ( obj ) && Object . getPrototypeOf ( obj ) == Object . prototype ;
22- }
23-
24- function isObject ( obj ) {
25- return obj !== null && ( typeof obj === 'undefined' ? 'undefined' : _typeof ( obj ) ) === 'object' ;
26- }
27-
28- function _merge ( target , source , deep ) {
29- for ( var key in source ) {
30- if ( deep && ( isPlainObject ( source [ key ] ) || isArray ( source [ key ] ) ) ) {
31- if ( isPlainObject ( source [ key ] ) && ! isPlainObject ( target [ key ] ) ) {
32- target [ key ] = { } ;
33- }
34- if ( isArray ( source [ key ] ) && ! isArray ( target [ key ] ) ) {
35- target [ key ] = [ ] ;
36- }
37- _merge ( target [ key ] , source [ key ] , deep ) ;
38- } else if ( source [ key ] !== undefined ) {
39- target [ key ] = source [ key ] ;
40- }
41- }
42- }
43-
44- function merge ( target ) {
45-
46- var args = slice . call ( arguments , 1 ) ;
47-
48- args . forEach ( function ( source ) {
49- _merge ( target , source , true ) ;
50- } ) ;
51-
52- return target ;
53- }
54-
55- function options ( fn , obj , opts ) {
56-
57- opts = opts || { } ;
58-
59- if ( isFunction ( opts ) ) {
60- opts = opts . call ( obj ) ;
61- }
62-
63- return merge ( fn . bind ( { $vm : obj , $options : opts } ) , fn , { $options : opts } ) ;
64- }
65-
667 /**
678 * Install plugin
689 * @param Vue
@@ -86,14 +27,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8627
8728 axios : {
8829 get : function get ( ) {
89- return options ( Vue . axios , this , this . $options . axios ) ;
30+ return axios ;
31+ }
32+ } ,
33+
34+ $http : {
35+ get : function get ( ) {
36+ return axios ;
9037 }
9138 }
9239
9340 } ) ;
9441 }
9542
96- if ( ( typeof exports === ' undefined' ? ' undefined' : _typeof ( exports ) ) == "object" ) {
43+ if ( ( typeof exports === " undefined" ? " undefined" : _typeof ( exports ) ) == "object" ) {
9744 module . exports = plugin ;
9845 } else if ( typeof define == "function" && define . amd ) {
9946 define ( [ ] , function ( ) {
0 commit comments