mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
fix: table row index error
This commit is contained in:
@@ -105,14 +105,14 @@
|
||||
<template #header>
|
||||
<span :title="col.label">{{ col.label }}</span>
|
||||
</template>
|
||||
<template v-if="col.formatter && typeof col.formatter !== 'function'" v-slot:default="{row, column, index}">
|
||||
<template v-if="col.formatter && typeof col.formatter !== 'function'" v-slot:default="{row, column, $index}">
|
||||
<div
|
||||
:is="col.formatter"
|
||||
:key="row.id"
|
||||
:cell-value="row[col.prop]"
|
||||
:col="col"
|
||||
:column="column"
|
||||
:index="index"
|
||||
:index="$index"
|
||||
:reload="getList"
|
||||
:row="row"
|
||||
:table-data="data"
|
||||
|
||||
@@ -74,7 +74,8 @@ export default {
|
||||
return this.formatterArgs.getTitle({
|
||||
col: this.col,
|
||||
row: this.row,
|
||||
cellValue: this.cellValue
|
||||
cellValue: this.cellValue,
|
||||
index: this.index
|
||||
})
|
||||
},
|
||||
disabled() {
|
||||
|
||||
@@ -54,7 +54,7 @@ export default {
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
can: this.$hasPerm('assets.view_asset'),
|
||||
getTitle: ({ row }) => { return row.id },
|
||||
getTitle: ({ row, col, cellValue, index }) => { return index + 1 },
|
||||
getRoute: ({ row }) => {
|
||||
return {
|
||||
name: 'SessionDetail',
|
||||
|
||||
Reference in New Issue
Block a user