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.4.1 to 1.4.2

2

dist/vxe-ajax.js
/**
* vxe-ajax.js v1.4.1
* vxe-ajax.js v1.4.2
* (c) 2017-2018 Xu Liangzhan

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

/**
* vxe-ajax.js v1.4.1
* vxe-ajax.js v1.4.2
* (c) 2017-2018 Xu Liangzhan

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

@@ -0,1 +1,4 @@

import Vue from 'vue'
import { XEAjaxMethods } from 'xe-ajax'
/**

@@ -10,2 +13,8 @@ * 用于 Vue 全局安装 xe-ajax

declare module 'vue/types/vue' {
interface Vue {
$ajax: XEAjaxMethods
}
}
export default VXEAjax;
{
"name": "vxe-ajax",
"version": "1.4.1",
"description": "用于 Vue 全局安装 xe-ajax",
"version": "1.4.2",
"description": "A small wrapper for integrating xe-ajax to Vuejs.",
"main": "index.js",
"typing": "index.d.ts",
"scripts": {

@@ -28,3 +29,7 @@ "test": "make test"

},
"homepage": "https://github.com/xuliangzhan/vxe-ajax#readme"
"homepage": "https://github.com/xuliangzhan/vxe-ajax#readme",
"devDependencies": {
"vue": "^2.5.16",
"xe-ajax": "^3.4.12"
}
}

@@ -41,39 +41,10 @@ # 用于 Vue 全局安装 xe-ajax

## 示例
## 使用
./Home.vue
```HTML
<template>
<div>
<ul>
<li v-for="(item, index) in list" :key="index">{{ item.name }}</li>
</ul>
</div>
</template>
<script>
export default {
data () {
return {
loading: false,
list: []
}
},
created () {
this.init()
},
methods: {
init () {
this.loading = true
this.$ajax.getJSON('/api/user/list').then(data => {
this.loading = false
this.list = data
}).catch(e => {
this.loading = false
})
}
}
}
</script>
```JavaScript
this.$ajax.fetch('/api/user/list').then(response => {
response.json().then(data => {
console.log(data)
})
})
```

@@ -80,0 +51,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