All Projects → lzxb → vue-methods-promise

lzxb / vue-methods-promise

Licence: other
Let Vue methods support return Promise

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-methods-promise

Blog Front
blog-front @nuxt
Stars: ✭ 305 (+771.43%)
Mutual labels:  axios, vue2, vue-demo
Vue Api Request
Control your API calls by using an amazing component which supports axios and vue-resource
Stars: ✭ 116 (+231.43%)
Mutual labels:  ajax, axios, request
Vue Touch Ripple
👆 Touch ripple component for @vuejs
Stars: ✭ 443 (+1165.71%)
Mutual labels:  vue2, vue-plugin, vue-demo
vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (+262.86%)
Mutual labels:  vue2, vue-plugin, vue-demo
Redux Requests
Declarative AJAX requests and automatic network state management for single-page applications
Stars: ✭ 330 (+842.86%)
Mutual labels:  fetch, ajax, axios
miniprogram-network
Redefine the Network API of Wechat MiniProgram (小程序网络库)
Stars: ✭ 93 (+165.71%)
Mutual labels:  fetch, axios, request
Github Ranking
🔍GitHub不同语言热门项目排行,Vue.js做页面展示
Stars: ✭ 160 (+357.14%)
Mutual labels:  axios, request, vue2
Code-VueWapDemo
“Vue教程--Wap端项目搭建从0到1”的源码
Stars: ✭ 19 (-45.71%)
Mutual labels:  fetch, axios, vue2
Thwack
A tiny modern data fetching solution
Stars: ✭ 268 (+665.71%)
Mutual labels:  fetch, ajax, axios
electron-request
Zero-dependency, Lightweight HTTP request client for Electron or Node.js
Stars: ✭ 45 (+28.57%)
Mutual labels:  fetch, ajax, request
Frisbee
🐕 Modern fetch-based alternative to axios/superagent/request. Great for React Native.
Stars: ✭ 1,038 (+2865.71%)
Mutual labels:  fetch, axios, request
Wretch Middlewares
Collection of middlewares for the Wretch library. 🎁
Stars: ✭ 42 (+20%)
Mutual labels:  fetch, ajax, request
Wretch
A tiny wrapper built around fetch with an intuitive syntax. 🍬
Stars: ✭ 2,285 (+6428.57%)
Mutual labels:  fetch, ajax, request
vue-webpack-boilerplate
A webpack boilerplate with vue-loader, axios, vue-router and vuex
Stars: ✭ 51 (+45.71%)
Mutual labels:  axios, vue2
Vue-CAMP
VueJS
Stars: ✭ 16 (-54.29%)
Mutual labels:  axios, vue2
AjaxHandler
ASimple PHP Class to help handling Ajax Requests easily
Stars: ✭ 30 (-14.29%)
Mutual labels:  ajax, request
react-sync
A declarative approach to fetching data via a React higher order component
Stars: ✭ 18 (-48.57%)
Mutual labels:  fetch, ajax
gists
Methods for working with the GitHub Gist API. Node.js/JavaScript
Stars: ✭ 96 (+174.29%)
Mutual labels:  axios, request
github-base
Simple, opinionated node.js interface for creating basic apps with the GitHub API.
Stars: ✭ 58 (+65.71%)
Mutual labels:  axios, request
vue-typescript-admin
Vue typescript 开发的基础模板,多页面支持,基础整合完毕。
Stars: ✭ 26 (-25.71%)
Mutual labels:  axios, vue2

Build Status dependencies Status devDependencies Status Known Vulnerabilities npm npm

vue-methods-promise

Let Vue methods support promise

Usage

npm install --save vue-methods-promise
// Installation
import Vue from 'vue'
import vueMethodsPromise from 'vue-methods-promise'

Vue.use(vueMethodsPromise, {
  hookName: '$promise', // Component default hook name
  promise: (mp) => { // Promise callback
    mp
      .then((function (res) {
        console.log(res)
      })
      .catch(function (err) {
        console.log(err.msg) // Test error
      })
  }
})

// Usage
export default {
  mounted () {
    this.test()
  },
  methods: { // All return Promise type, will be dealt with
    test () {
      return Promise.reject(new Error({ msg: 'Test error' }))
    }
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].