• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yantianqi
V2EX  ›  程序员

vuex 的一个问题

  •  
  •   yantianqi · Jun 30, 2017 · 2893 views
    This topic created in 3422 days ago, the information mentioned may be changed or developed.

    vuex 中
    this.$store.dispatch 和 this.$store.commit 有什么区别
    谢谢

    4 replies  •  2017-06-30 13:22:46 +08:00
    371657110
    371657110
    Jun 30, 2017
    2
    看文档啊..老铁
    fl0at
    fl0at
    Jun 30, 2017
    3
    1.X 和 2.X 的区别
    Zhongwei
    Zhongwei
    Jun 30, 2017
    4
    - dispatch 是调用 action
    - commit 是调用 mutation

    老铁,action 与 mutation 的关系及不同使用场景,你需要看一下官方文档
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2385 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 00:20 · PVG 08:20 · LAX 16:20 · JFK 19:20
    ♥ Do have faith in what you're doing.