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 1.0.12 to 1.0.16

2

package.json
{
"name": "vxe-ajax",
"version": "1.0.12",
"version": "1.0.16",
"description": "VXEAjax 用于Vue全局安装xe-ajax",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,11 +18,31 @@ # VXEAjax 用于Vue全局安装xe-ajax

// 通过vue实例的调用方式
this.$ajax.getJSON ('url', {id: 1})
.then(data => {
// data
}).catch(data => {
// data
})
this.$ajax.doGet('services/user/list', {id: 1})
this.$ajax.getJSON ('services/user/list', {id: 1})
this.$ajax.doPost ('services/user/save', {id: 1})
this.$ajax.postJSON ('services/user/save', {id: 1})
```
### 混合函数
#### 文件 ./customs.js
``` shell
export function custom1 () {
console.log('自定义的函数')
}
```
#### 示例
``` shell
import Vue from 'vue'
import XEAjax from 'xe-ajax'
import VXEAjax from 'vxe-ajax'
import customs from './customs'
XEAjax.mixin(customs)
Vue.use(VXEAjax, XEAjax)
// 调用自定义扩展函数
this.$ajax.custom1()
```
## License
Copyright (c) 2017-present, Xu Liangzhan
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