vue elementui v-for loop el-table-column the first column of data changes to the last

When this dynamically renders the table table, it is found that the data in the first column of el-table-column has changed to the last one
insert image description here

insert image description here
The serial number is sorted to the back after
the code is modified
insert image description here

insert image description here

insert image description here

<el-table
      :data="tableData"
      tooltip-effect="dark"
      style="width: 100%"
      height="500"
    >
      
        <template v-for="(item, index) in columnList" >
            <el-table-column v-if="!item.children" :prop="item.prop" :label="item.label" :key="index">
            </el-table-column>
            <el-table-column v-else :prop="item.prop" :label="item.label" :key="index">
              <div v-for="(items, indexs) in item.children" :key="indexs">
                <el-table-column :prop="items.prop" :label="items.label">
                </el-table-column>
              </div>
            </el-table-column>
        </template>

Guess you like

Origin blog.csdn.net/wzwzwz555/article/details/132233245