|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="bg-white p-2 table_box" >
|
|
|
|
|
|
- <el-table :data="tableData" border class="mt-4" :header-cell-style="headerStyle" stripe >
|
|
|
+ <el-table :data="tableData" border class="mt-4" :header-cell-style="headerStyle" stripe :row-class-name="tableRowClassName">
|
|
|
<el-table-column v-for="item in tableColData" align="center"
|
|
|
:prop="item.id"
|
|
|
:label="item.name"
|
|
@@ -43,7 +43,7 @@ console.log(key)
|
|
|
|
|
|
|
|
|
const tableData=ref([
|
|
|
-
|
|
|
+{time:'一月',beginremain:'2000'},
|
|
|
{time:'二月',market:'2000',precost:1000,realcost:2000},
|
|
|
{time:'三月',beginremain:'2000'},
|
|
|
{time:'四月',beginremain:'2000'},
|
|
@@ -55,6 +55,7 @@ const tableData=ref([
|
|
|
{time:'十月',beginremain:'2000'},
|
|
|
{time:'十一月',beginremain:'2000'},
|
|
|
{time:'十二月',beginremain:'2000'},
|
|
|
+{time:'总计',beginremain:'2000'},
|
|
|
|
|
|
|
|
|
|
|
@@ -169,7 +170,12 @@ const headerStyle=({ row, column, rowIndex, columnIndex })=>{
|
|
|
|
|
|
return comStyle;
|
|
|
}
|
|
|
-
|
|
|
+ //指定行颜色
|
|
|
+const tableRowClassName=({ row, rowIndex }) =>{
|
|
|
+ if (rowIndex ===12) {
|
|
|
+ return 'warm-row';
|
|
|
+ }
|
|
|
+ }
|
|
|
const costcheck=ref('1')
|
|
|
</script>
|
|
|
|