Comparing version 1.4.6 to 1.4.7
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "vxe-ajax", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "A small wrapper for integrating xe-ajax to Vuejs.", | ||
"main": "index.js", | ||
"unpkg": "dist/vxe-ajax.js", | ||
"jsdelivr": "dist/vxe-ajax.js", | ||
"typings": "types/index.d.ts", | ||
@@ -16,9 +18,12 @@ "scripts": { | ||
], | ||
"dependencies": { | ||
"vue": "^2.5.22", | ||
"xe-ajax": "^3.5.3" | ||
}, | ||
"devDependencies": { | ||
"vue": "^2.5.17", | ||
"eslint": "^5.9.0", | ||
"eslint": "^5.15.1", | ||
"eslint-config-standard": "^12.0.0", | ||
"eslint-friendly-formatter": "^4.0.1", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-node": "^8.0.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-node": "^8.0.1", | ||
"eslint-plugin-promise": "^4.0.1", | ||
@@ -33,7 +38,4 @@ "eslint-plugin-standard": "^4.0.0", | ||
"keywords": [ | ||
"ajax.js", | ||
"vue-ajax", | ||
"xe-ajax", | ||
"vxe-ajax", | ||
"XEAjax" | ||
"xe-ajax" | ||
], | ||
@@ -40,0 +42,0 @@ "author": { |
@@ -1,2 +0,2 @@ | ||
# 用于 Vue 全局安装 xe-ajax | ||
# vxe-ajax | ||
@@ -6,2 +6,3 @@ [![npm version](https://img.shields.io/npm/v/vxe-ajax.svg?style=flat-square)](https://www.npmjs.org/package/vxe-ajax) | ||
[![npm downloads](https://img.shields.io/npm/dm/vxe-ajax.svg?style=flat-square)](http://npm-stat.com/charts.html?package=vxe-ajax) | ||
[![gzip size: JS](http://img.badgesize.io/https://unpkg.com/vxe-ajax/dist/vxe-ajax.min.js?compression=gzip&label=gzip%20size:%20JS)](http://img.badgesize.io/https://unpkg.com/vxe-ajax/lib/index.umd.min.js?compression=gzip&label=gzip%20size:%20JS) | ||
[![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/xuliangzhan/vxe-ajax/blob/master/LICENSE) | ||
@@ -11,19 +12,12 @@ | ||
```JavaScript | ||
```shell | ||
npm install xe-ajax vxe-ajax --save | ||
``` | ||
```JavaScript | ||
// require 配置 | ||
require.config({ | ||
paths: { | ||
// ..., | ||
'xe-ajax': './dist/xe-ajax.min', | ||
'vxe-ajax': './dist/vxe-ajax.min' | ||
} | ||
}) | ||
define(['vue', 'xe-ajax', 'vxe-ajax'], function (Vue, XEAjax, VXEAjax) { | ||
// ES5 环境中可以设置 {context: true} 模拟箭头函数 | ||
Vue.use(VXEAjax, XEAjax, {context: true}) | ||
}) | ||
Get on [unpkg](https://unpkg.com/vxe-ajax/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-ajax/) | ||
```javascript | ||
<script src="https://cdn.jsdelivr.net/npm/vue"></script> | ||
<script src="https://unpkg.com/xe-ajax/dist/xe-ajax.min.js"></script> | ||
<script src="https://unpkg.com/vxe-ajax/dist/vxe-ajax.min.js"></script> | ||
``` | ||
@@ -33,3 +27,3 @@ | ||
```JavaScript | ||
```javascript | ||
import Vue from 'vue' | ||
@@ -45,3 +39,3 @@ import XEAjax from 'xe-ajax' | ||
<ul> | ||
<li v-for="(item, index) in list" :key="index">{{ item.name }}</li> | ||
<li v-for="item in list" :key="item.id">{{ item.name }}</li> | ||
</ul> | ||
@@ -54,4 +48,3 @@ </template> | ||
export default { | ||
name: 'App', | ||
data: { | ||
data () { | ||
return { | ||
@@ -62,6 +55,4 @@ list: [] | ||
created () { | ||
this.$ajax.fetch('/api/user/list').then(response => { | ||
response.json().then(data => { | ||
this.list = data | ||
}) | ||
this.$ajax.getJSON('/api/user/list').then(list => { | ||
this.list = data | ||
}) | ||
@@ -68,0 +59,0 @@ } |
@@ -5,7 +5,3 @@ import Vue from 'vue' | ||
/** | ||
* 用于 Vue 全局安装 xe-ajax | ||
* @example | ||
```javascript | ||
Vue.use(VXEAjax, XEAjax) | ||
``` | ||
* A small wrapper for integrating xe-ajax to Vuejs. | ||
*/ | ||
@@ -12,0 +8,0 @@ declare var VXEAjax; |
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
8726
8
2
108
60
+ Addedvue@^2.5.22
+ Addedxe-ajax@^3.5.3
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Added@vue/compiler-sfc@2.7.16(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.49(transitive)
+ Addedprettier@2.8.8(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedvue@2.7.16(transitive)
+ Addedxe-ajax@3.8.4(transitive)