vuex中的getter监听变量

...mapGetters('robot', {
      getRobot: 'getRobot',
    }),
这种是直接拿模块里的,第一个是模块名,第2个是对应的getter
 
computed: {
    ...mapGetters('robot', {
      getRobot: 'getRobot',
    }),
  },
  watch: {
    getRobot: function(robot) { //li就是改变后的wifiList值
      // 顶级关键词
      // alert("change")
      // alert(robot)
      // showHotQuestion = robot;
      return robot;
    }
  },
监听getRobot
<inputpanel class="inputpanel" :showHotQuestion="getRobot"></inputpanel>
原文地址:https://www.cnblogs.com/chuanmin/p/14914138.html