Can you tell me how to add an event to the render-header of the element-ui header?

requirement: add a button in the header to refresh

clipboard.png

:

clipboard.png

initList
:

clipboard.png

Aug.27,2021

your this, was already lost when it was rendered. Maybe you should use the arrow function to bring this to click


on: {

            click: () => {
              this.initList();
            }
          }

on: {

click: this.initList

}

calling in this way will not report an error without parentheses

Menu