Socket
Socket
Sign inDemoInstall

@xunlei/vuex-action-debounce

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xunlei/vuex-action-debounce


Version published
Maintainers
1
Install size
7.76 kB
Created

Readme

Source

@xunlei/vuex-action-debounce

Vuex action debounce 插件,可以让相同类型及参数的action在单位时间内只有一次,从而避免重复网络请求

用法

安装

npm install @xunlei/vuex-action-debounce -S

使用

import vuexActionDebounce from @xunlei/vuex-action-debounce

const timeout = 0 // 请求完成后的缓存时间
const vuexActionDebouncePlugin = vuexActionDebounce(timeout)

const store = new Vuex.Store({
  state,
  mutations,
  plugins: [ vuexActionDebouncePlugin ]
})

注意

  • action 需要返回promise

Keywords

FAQs

Last updated on 17 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc