[Vuejs]-How to insert other values into table column Vue3 Element-plus

0👍

So, I found an answer to my question.I needed to insert default scope template into the header column without prop so i can pass my own value.

<el-table-column prop="patron" label="Patron"></el-table-column>
<el-table-column  label="Sex">
  <template #default="scope">
    <span v-if="scope.row.sex === 1">Male</span>
    <span v-else-if="scope.row.sex === 2">Female</span>
  </template>
</el-table-column>
<el-table-column prop="dept" label="Dept"></el-table-column>

Leave a comment