Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "vxe-ajax", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "vxe-ajax 用于Vue全局安装xe-ajax", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,25 +17,12 @@ # vxe-ajax 用于Vue全局安装xe-ajax | ||
// 在Vue实例中使用 | ||
this.$ajax.getJSON ('url', {id: 1}).then(data => { | ||
data | ||
// 通过vue实例的调用方式 | ||
this.$ajax.getJSON ('url', {id: 1}) | ||
.then(data => { | ||
// data | ||
}).catch(data => { | ||
data | ||
// data | ||
}) | ||
``` | ||
### 支持自定义扩展 | ||
``` shell | ||
import Vue from 'vue' | ||
import XEAjax from 'xe-ajax' | ||
import VXEAjax from 'vxe-ajax' | ||
import customs from './customs' // ./customs.js export function custom1 () {} | ||
XEAjax.mixin(customs) | ||
Vue.use(VXEAjax, XEAjax) | ||
// 调用自定义扩展函数 | ||
this.$ajax.custom1() | ||
``` | ||
## License | ||
Copyright (c) 2017-present, Xu Liangzhan |
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
2403
27