vue v-forサイクルel-table-column最初のデータが最後のデータに変わります

8251 ワード

<!-- region     -->
	<!-- !!!!!!  :         for       key -->
    <el-table-colum	n v-if="options.mutiSelect" type="selcetion" width="55" key="#1" />
    <el-table-column v-else-if="options.index" type="index" width="55" align="center" key="#1" />
    <!-- endregion -->
    <!-- region     -->
    <!-- <template v-if="columns"> -->
    <el-table-column>1</el-table-column>
    <template v-for="(column, index) in columns">
      <el-table-column
        v-bind="column"
        :label="column.label"
        :prop="column.prop"
        :key="index"
        :show-overflow-tooltip="options.showOverflowTooltip"
      >
        <template slot-scope="scope">
          <template v-if="!column.render">
            <template v-if="column.formatter">
              <span v-html="column.formatter(scope.row, column)" />
            </template>
            <template v-else>
              <span>{{ scope.row[column.prop] }}</span>
            </template>
          </template>
          <template v-else>
            <render-dom :column="column" :row="scope.row" :render="column.render" :index="index" />
          </template>
        </template>
      </el-table-column>
    </template>