1๐
โ
i just found it out, the answer was just in the picture
{{props.row.vgt_id}}
2๐
You can get column name using props.column
. props.column
will give you full column object so you can get index from it. props.column.field
will give you column name title.
- You can check index with
props.column.originalIndex
- The original row object can be accessed via
props.row
- The currently displayed table row index can be accessed via
props.index
. - The
original row index
can be accessed viaprops.row.originalIndex
. - You can then access the original row object by using
rows[props.row.originalIndex]
. - The column object can be accessed via
props.column
- You can access the formatted row data (for example โ formatted date) via
props.formattedRow
For example :
<vue-good-table
:columns="columns"
:rows="rows">
<template slot="table-row" slot-scope="props">
<span v-if="props.column.field == 'age'">
<span style="font-weight: bold; color: blue;">{{props.row.age}}</span>
</span>
<span v-else>
{{props.formattedRow[props.column.field]}}
</span>
</template>
</vue-good-table>
0๐
try this:
{{props.row.originalIndex}}
Source:stackexchange.com