this.$store.dispatch()发送多个参数
时间: 2023-10-20 07:34:30 浏览: 191
this.$store.dispatch()方法可以发送多个参数。在调用该方法时,可以传递一个包含多个参数的数组或对象作为第二个参数。这些参数可以用于在Vuex store中的对应action中进行处理。通过在action中使用解构赋值或者通过访问参数数组/对象的属性,可以获取传递的多个参数的值。这样可以实现在一个单一的dispatch调用中发送多个参数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vuex中this.$store.commit和this.$store.dispatch的用法](https://blog.csdn.net/weixin_48123820/article/details/130824725)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [vue项目分析--this.$store.dispatch()&this.$store.commit()&vuex.store()](https://blog.csdn.net/weixin_46045444/article/details/120720528)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文