Vue Error in mounted hook: "TypeError: this.getAction is not a function"错误


 mounted() {
    this.init();
  },
  methods: {
    init() {
      this.getDataList();
    },
    loadData(){},
    getDataList() {
      this.loading = true;
      this.getAction(this.url.todoList,this.searchForm).then(res => {
        this.loading = false;
        if (res.success) {
          this.data = res.result||[];
          this.total = this.data.leading;
        }
      });
    },

这是我的部分代码,mounted钩子刚执行我的函数就报错

img


有没有人知道这是什么原因造成的?

this.getAction这里写错了,axios你是怎么引用 的

当代码执行到this.getAction(this.url.todoList,this.searchForm).then(res => {的时候再执行就报错了,,,,