e40c5352
Aresn
fixed #1195
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<template>
<tr :class="rowClasses(row._index)"><slot></slot></tr>
</template>
<script>
export default {
props: {
row: Object,
prefixCls: String
},
computed: {
objData () {
return this.$parent.objData;
}
},
methods: {
rowClasses (_index) {
return [
`${this.prefixCls}-row`,
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
}
];
},
rowClsName (_index) {
return this.$parent.$parent.rowClassName(this.objData[_index], _index);
},
}
};
</script>
|