Table Column add indexMethod

This commit is contained in:
梁灏 2018-06-29 10:04:02 +08:00
parent fc3e16cf01
commit d9d1dbbd5a
2 changed files with 11 additions and 10 deletions

View file

@ -1,6 +1,6 @@
<template>
<div :class="classes" ref="cell">
<template v-if="renderType === 'index'"><span>{{naturalIndex + 1}}</span></template>
<template v-if="renderType === 'index'"><span>{{ column.indexMethod ? column.indexMethod(row) : (naturalIndex + 1) }}</span></template>
<template v-if="renderType === 'selection'">
<Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox>
</template>