猿问

[vuex] unknown action type: getFarmInfo

题目描述

[vuex] unknown action type: getFarmInfo

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

<div class="p-3 text-center">        <img :src="$utils.getImage(farmInfo.org_images, 80)" alt="" class="account-img">
        <h5 class="account-name">{{farmInfo.farm_name}}</h5>
        <p class="text-muted" v-show="farmInfo.tax_no">
          <small>税务号:{{farmInfo.tax_no}}</small>
        </p>
      </div>
      
      computed: {
      farmInfo() { return this.$store.getters.farmInfo }
    },
      
      created() {      this.$store.dispatch('getFarmInfo')
    },

你期待的结果是什么?实际看到的错误信息又是什么?

报这种错[vuex] unknown action type: getFarmInfo


一只斗牛犬
浏览 2414回答 1
1回答

神不在的星期二

你的&nbsp;actions&nbsp;里面有这个&nbsp;getFarmInfo&nbsp;方法吗?
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答