Getting router params into Vuex actions

后端 未结 3 490
眼角桃花
眼角桃花 2021-02-07 12:08

I would like to pass router params into Vuex actions, without having to fetch them for every single action in a large form like so:

edit_sport_type({ rootState,          


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-02-07 12:56

    Not sure to understand well your question, but :
    This plugin keeps your router' state and your store in sync :
    https://github.com/vuejs/vuex-router-sync

    and it sounds like what you are looking for.

提交回复
热议问题