Ask the question of the element-ui header render-header: how can index in my list get it in this function

The

page has a list

<template v-for="(list, index) in lists">
    <el-table>
     <el-table-column
        ...
      width="200">
    </el-table-column>
<!--  -->
<el-table-column
  :render-header="renderLastHeader"
  width="200">
</el-table-column>
    </el-table>
</template>

  methods: {
    renderLastHeader (h, { column, $index }) {
      // 
      return (
        <div>
          <el-button type="text" size="small">
            <i class="el-icon-plus" onClick={this.addColOption}></i>
          </el-button>
          <el-button type="text" size="small">
            <i class="el-icon-plus" onClick={this.addColOptions}></i>
          </el-button>
        </div>
      )
    },
    addColOption () {
        // list 
    },
    addColOptions () {}

element: the function render-header does not allow arguments. How can index in my list get

in this function?
Jun.14,2021

you can pass parameters

:render-header="(h,obj) => renderLastHeader(h,obj,index)"

renderLastHeader (h, { column, $index },index) {
    console.log(index)    //listindex
}

has not been written like this, but your method renderLastHeader (h, {column, $index}) has got the index. You can assign the index to an intermediate value.
change onClick to @ click and see if you can pass parameters


.

may I ask return (

)
    <el-radio-group v-model={status} onChange={this.loadNote} size="mini">
      <el-radio-button label="1"></el-radio-button>
      <el-radio-button label="2"></el-radio-button>
    </el-radio-group>
  )
  
  v-model 

how to solve the problem of passing parameters

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea7e8b-46bd6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea7e8b-46bd6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?