# 行样式
<template>
<div
class="GeneralRowStyle"
style="margin: auto; max-width: 1600px; height: 600px; position: relative"
>
<!-- 实际开发中需要传入request方法 -->
<oce-general
ref="xnyGeneral"
:option="generalOption"
:urlInfo="urlInfo"
>
</oce-general>
</div>
</template>
<script>
export default {
name: 'GeneralRowStyle',
data() {
return {
urlInfo: {
optionUrl: {
url: '/system/webTable/tableInfo',
method: 'post',
webTableName: 'testTable',
},
dataUrl: {
url: '/system/webTable/tableData',
method: 'post',
},
},
generalOption: {
tableOption: {
// 行样式
rowStyle: (scope) => {
console.log('行数据',scope.row)
if ([2, 3, 5].includes(scope.rowIndex)) {
return {
backgroundColor: 'red',
color: '#ffffff'
}
}
},
}
},
}
},
methods: {},
created() {
},
}
</script>
Expand Copy Copy