...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>