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.2.0 to 1.3.0

dist/vxe-ajax.js

2

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

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

@@ -5,5 +5,41 @@ # VXEAjax 用于Vue全局安装 xe-ajax

## 通过NPM安装最新版本
### 直接引用 script 全局安装,VXEAjax 会定义为全局变量
``` shell
<script src="./dist/xe-ajax.min.js" type="text/javascript"></script>
<script src="./dist/vxe-ajax.min.js" type="text/javascript"></script>
// ./main.js 安装
Vue.use(VXEAjax, XEAjax)
// ./app.js 通过vue实例的调用方式
// ...vue代码省略
this.$ajax.doGet('services/user/list', {id: 1})
```
### AMD 安装, 以 require.js 为例
``` shell
// require 配置
require.config({
paths: {
// ...,
'xe-ajax': './dist/xe-ajax.min',
'vxe-ajax': './dist/vxe-ajax.min'
}
})
// ./main.js 安装
define(['vue', 'xe-ajax', 'vxe-ajax'], function (Vue, XEAjax, VXEAjax) {
Vue.use(VXEAjax, XEAjax)
})
// ./app.js 调用
define([], function () {
// 通过vue实例的调用方式
// ...vue代码省略
this.$ajax.doGet('services/user/list', {id: 1})
})
```
### ES6 Module 安装方式
``` shell
npm install vxe-ajax --save

@@ -10,0 +46,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