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.3.0 to 1.3.2

2

dist/vxe-ajax.js
/*!
* vxe-ajax.js v1.3.0
* vxe-ajax.js v1.3.2
* (c) 2017-2018 Xu Liangzhan

@@ -4,0 +4,0 @@ * ISC License.

/*!
* vxe-ajax.js v1.3.0
* vxe-ajax.js v1.3.2
* (c) 2017-2018 Xu Liangzhan

@@ -4,0 +4,0 @@ * ISC License.

{
"name": "vxe-ajax",
"version": "1.3.0",
"version": "1.3.2",
"description": "VXEAjax 用于Vue全局安装 xe-ajax",

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

# VXEAjax 用于Vue全局安装 xe-ajax
安装完成后自动挂载在vue实例 this.$ajax(XHR请求函数)
安装完成后自动挂载在vue实例 this.$ajax

@@ -15,3 +15,3 @@ ### 直接引用 script 全局安装,VXEAjax 会定义为全局变量

// ...vue代码省略
this.$ajax.doGet('services/user/list', {id: 1})
this.$ajax.getJSON('/api/user/list', {id: 1})
```

@@ -39,3 +39,3 @@

// ...vue代码省略
this.$ajax.doGet('services/user/list', {id: 1})
this.$ajax.getJSON('/api/user/list', {id: 1})
})

@@ -58,6 +58,4 @@ ```

// 通过vue实例的调用方式
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})
this.$ajax.getJSON ('/api/user/list', {id: 1})
this.$ajax.postJSON ('/api/user/save', {id: 1})
```

@@ -68,3 +66,3 @@

``` shell
export function custom1 () {
export function get1 () {
console.log('自定义的函数')

@@ -78,3 +76,2 @@ }

import VXEAjax from 'vxe-ajax'
import customs from './customs'

@@ -86,3 +83,3 @@

// 调用自定义扩展函数
this.$ajax.custom1()
this.$ajax.get1()
```

@@ -110,4 +107,3 @@

init () {
this.$ajax.getJSON('services/user/list', {id: 123})
.then(data => {
this.$ajax.getJSON('/api/user/list', {id: 123}).then(data => {
this.list = data

@@ -114,0 +110,0 @@ }).catch(data => {

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