Comparing version 1.2.0 to 1.3.0
{ | ||
"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 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
5230
6
31
120
0