itable 添加禁用某行选中的功能

This commit is contained in:
leonine 2017-02-20 11:17:47 +08:00
parent 8a0b17498f
commit 0dcc948256
6 changed files with 33 additions and 5 deletions

View file

@ -19,7 +19,9 @@
:column="column"
:natural-index="index"
:index="row._index"
:checked="rowChecked(row._index)"></Cell>
:checked="rowChecked(row._index)"
:disabled="rowDisabled(row._index)"
></Cell>
</td>
</tr>
</tbody>
@ -51,13 +53,17 @@
this.rowClsName(_index),
{
[`${this.prefixCls}-row-highlight`]: this.objData[_index] && this.objData[_index]._isHighlight,
[`${this.prefixCls}-row-hover`]: this.objData[_index] && this.objData[_index]._isHover
[`${this.prefixCls}-row-hover`]: this.objData[_index] && this.objData[_index]._isHover,
[`${this.prefixCls}-row-disabled`]: this.objData[_index] && this.objData[_index]._isDisabled
}
];
},
rowChecked (_index) {
return this.objData[_index] && this.objData[_index]._isChecked;
},
rowDisabled(_index){
return this.objData[_index] && this.objData[_index]._isDisabled;
},
rowClsName (_index) {
return this.$parent.rowClassName(this.objData[_index], _index);
},