Mini Program prompts why the component is missing method to handle event,.

method names are all checked correctly, and dead or alive hints that method is missing.

this is an error:

Component "pages/classic" does not have a method "onPrevious" to handle event "right".
//methods  wxml

  methods: {
    onNext: function (event) {
      if (!this.properties.latest) {
        this.triggerEvent("left", {}, {})
      }
    },

    onPrevious: function (event) {
      if (!this.properties.first) {
        this.triggerEvent("right", {}, {})
      }
    }
   }

---------------------------------------------
<view class="container">
  <image bind:tap="onNext" class="icon" src="{{latest?disLeftSrc:leftSrc}}"/>
  <text class="title">{{title}}</text>
  <image bind:tap="onPrevious" class="icon" src="{{first?disRightSrc:rightSrc}}"/>
</view>


page
<navi-cmp bind:left="onNext" bind:right="onPrevious" title="{{classic.title}}" 
first="{{first}}" latest="{{latest}}" class="navi" />
Jan.28,2022

.

OK, the original method in page.js should also be written with the same onNext method

Menu