Add custom buttons and other custom displays to the table header in element-ui

You can use: render-header method

 Add a button as follows:

renderHeader (h) {

      return (

        <div>

          <span>Operation</span>

          <el-button

            type="primary"

            style="margin-left:90px"

            size="small"

            icon="el-icon-plus"

            //Add click event ---------

            onClick={()=>this.addClose()}

            //---------------------

          >添加</el-button></div>

      )

    },

Guess you like

Origin blog.csdn.net/weixin_43703816/article/details/131208698