订单页面增加隔行换色效果; 其他页面保持不变;

This commit is contained in:
terrfly 2021-11-18 12:44:58 +08:00
parent 8dda8992f0
commit bb1ba49186
8 changed files with 22 additions and 2 deletions

View File

@ -16,6 +16,12 @@
:row-selection="rowSelection"
:rowKey="rowKey"
:scroll="{ x: scrollX }"
:customRow="(record, index) => {
if(!tableRowCrossColor){
return {};
}
return { style: { 'background-color': index % 2 == 0 ? '#FCFCFC' : '#FFFFFF'} }
}"
>
<!-- 自定义列插槽 参考https://github.com/feseed/admin-antd-vue/blob/master/src/components/ShTable.vue -->
<!-- eslint-disable-next-line -->
@ -41,7 +47,8 @@ export default {
pageSize: { type: Number, default: 10 }, //
rowSelection: Object, // checkbox
rowKey: { type: [String, Function] }, // rowKey checkbox
scrollX: { type: Number, default: 800 } //
scrollX: { type: Number, default: 800 }, //
tableRowCrossColor: { type: Boolean, default: false } //
},
data () {

View File

@ -74,6 +74,7 @@
:searchData="searchData"
rowKey="payOrderId"
:scrollX="1350"
:tableRowCrossColor="true"
>
<template slot="amountSlot" slot-scope="{record}"><b>{{ record.amount/100 }}</b></template> <!-- 自定义插槽 -->
<template slot="refundAmountSlot" slot-scope="{record}">{{ record.refundAmount/100 }}</template> <!-- 自定义插槽 -->

View File

@ -57,6 +57,7 @@
:rowSelection="rowSelection"
rowKey="refundOrderId"
:scrollX="1350"
:tableRowCrossColor="true"
>
<template slot="payAmountSlot" slot-scope="{record}"><b>{{ record.payAmount/100 }}</b></template> <!-- 自定义插槽 -->
<template slot="refundAmountSlot" slot-scope="{record}"><b>{{ record.refundAmount/100 }}</b></template> <!-- 自定义插槽 -->

View File

@ -47,6 +47,7 @@
:searchData="searchData"
rowKey="transferId"
:scrollX="1350"
:tableRowCrossColor="true"
>
<template slot="transferAmountSlot" slot-scope="{record}"><b>{{ record.amount/100 }}</b></template> <!-- 自定义插槽 -->
<template slot="stateSlot" slot-scope="{record}">

View File

@ -16,6 +16,12 @@
:row-selection="rowSelection"
:rowKey="rowKey"
:scroll="{ x: scrollX }"
:customRow="(record, index) => {
if(!tableRowCrossColor){
return {};
}
return { style: { 'background-color': index % 2 == 0 ? '#FCFCFC' : '#FFFFFF'} }
}"
>
<!-- 自定义列插槽 参考https://github.com/feseed/admin-antd-vue/blob/master/src/components/ShTable.vue -->
<!-- eslint-disable-next-line -->
@ -41,7 +47,8 @@ export default {
pageSize: { type: Number, default: 10 }, //
rowSelection: Object, // checkbox
rowKey: { type: [String, Function] }, // rowKey checkbox
scrollX: { type: Number, default: 980 } //
scrollX: { type: Number, default: 980 }, //
tableRowCrossColor: { type: Boolean, default: false } //
},
data () {

View File

@ -68,6 +68,7 @@
:searchData="searchData"
rowKey="payOrderId"
:scrollX="1000"
:tableRowCrossColor="true"
>
<template slot="amountSlot" slot-scope="{record}"><b>{{ record.amount/100 }}</b></template> <!-- 自定义插槽 -->
<template slot="refundAmountSlot" slot-scope="{record}">{{ record.refundAmount/100 }}</template> <!-- 自定义插槽 -->

View File

@ -49,6 +49,7 @@
:tableColumns="tableColumns"
rowKey="refundOrderId"
:scrollX="1300"
:tableRowCrossColor="true"
>
<template slot="payAmountSlot" slot-scope="{record}"><b>{{ record.payAmount/100 }}</b></template> <!-- 自定义插槽 -->
<template slot="refundAmountSlot" slot-scope="{record}"><b>{{ record.refundAmount/100 }}</b></template> <!-- 自定义插槽 -->

View File

@ -46,6 +46,7 @@
:searchData="searchData"
rowKey="transferId"
:scrollX="1350"
:tableRowCrossColor="true"
>
<template slot="transferAmountSlot" slot-scope="{record}"><b>{{ record.amount/100 }}</b></template> <!-- 自定义插槽 -->
<template slot="stateSlot" slot-scope="{record}">