Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vxe-ajax

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vxe-ajax - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

20

dist/vxe-ajax.common.js

@@ -8,9 +8,15 @@ "use strict";

function VXEAjax(Vue, XEAjax) {
Object.defineProperty(Vue.prototype, '$ajax', {
get: function get() {
XEAjax.$context = this;
return XEAjax;
}
});
function VXEAjax(app, XEAjax) {
var isV3 = typeof app !== 'function';
if (isV3) {
app.config.globalProperties.$ajax = XEAjax;
} else {
Object.defineProperty(app.prototype, '$ajax', {
get: function get() {
XEAjax.$context = this;
return XEAjax;
}
});
}
}

@@ -17,0 +23,0 @@

@@ -21,9 +21,15 @@ (function (global, factory) {

function VXEAjax(Vue, XEAjax) {
Object.defineProperty(Vue.prototype, '$ajax', {
get: function get() {
XEAjax.$context = this;
return XEAjax;
}
});
function VXEAjax(app, XEAjax) {
var isV3 = typeof app !== 'function';
if (isV3) {
app.config.globalProperties.$ajax = XEAjax;
} else {
Object.defineProperty(app.prototype, '$ajax', {
get: function get() {
XEAjax.$context = this;
return XEAjax;
}
});
}
}

@@ -30,0 +36,0 @@

@@ -1,1 +0,1 @@

!function(e,t){if("function"==typeof define&&define.amd)define("vxe-ajax",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var f={exports:{}};t(f.exports),e.VXEAjax=f.exports.default}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;function t(e,t){Object.defineProperty(e.prototype,"$ajax",{get:function(){return t.$context=this,t}})}e.default=t});
!function(e,t){if("function"==typeof define&&define.amd)define("vxe-ajax",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var o={exports:{}};t(o.exports),e.VXEAjax=o.exports.default}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;function t(e,t){"function"!=typeof e?e.config.globalProperties.$ajax=t:Object.defineProperty(e.prototype,"$ajax",{get:function(){return t.$context=this,t}})}e.default=t});

@@ -1,10 +0,15 @@

function VXEAjax (Vue, XEAjax) {
Object.defineProperty(Vue.prototype, '$ajax', {
get: function () {
XEAjax.$context = this
return XEAjax
}
})
function VXEAjax (app, XEAjax) {
var isV3 = typeof app !== 'function'
if (isV3) {
app.config.globalProperties.$ajax = XEAjax
} else {
Object.defineProperty(app.prototype, '$ajax', {
get: function () {
XEAjax.$context = this
return XEAjax
}
})
}
}
export default VXEAjax
{
"name": "vxe-ajax",
"version": "2.0.1",
"version": "2.1.0",
"description": "用于 Vue 全局安装 xe-ajax",

@@ -20,3 +20,2 @@ "main": "dist/index.common.js",

"peerDependencies": {
"vue": ">=2.6.10",
"xe-ajax": ">=4.0.0"

@@ -23,0 +22,0 @@ },

@@ -33,3 +33,10 @@ # vxe-ajax

// use:
Vue.use(VXEAjax, XEAjax)
// vue2.x:
// Vue.prototype.$ajax = XEAjax
// vue3.x:
// app.config.globalProperties.$ajax = XEAjax
```

@@ -54,4 +61,4 @@

created () {
this.$ajax.get('/api/user/list').then(list => {
this.list = data
this.$ajax.get('/api/user/list').then(data => {
this.list = data
})

@@ -58,0 +65,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc