Browse Source

消息中心 已读

master
x_ying 3 years ago
parent
commit
dadbb0ec7e
  1. 6
      src/views/system/messageCenter/data1.json
  2. 10
      src/views/system/messageCenter/index.vue

6
src/views/system/messageCenter/data1.json

@ -6,7 +6,7 @@
"pushObj":"全部用户", "pushObj":"全部用户",
"sendRole":"管理员", "sendRole":"管理员",
"sendTime":"", "sendTime":"",
"readType":"未读"
"isRead":false
}, },
{ {
"notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容", "notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
@ -14,7 +14,7 @@
"pushObj":"全部用户", "pushObj":"全部用户",
"sendRole":"管理员", "sendRole":"管理员",
"sendTime":"", "sendTime":"",
"readType":"已读"
"isRead":true
}, },
{ {
"notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容", "notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
@ -22,7 +22,7 @@
"pushObj":"全部用户", "pushObj":"全部用户",
"sendRole":"管理员", "sendRole":"管理员",
"sendTime":"", "sendTime":"",
"readType":"已读"
"isRead":true
} }
] ]
} }

10
src/views/system/messageCenter/index.vue

@ -17,6 +17,7 @@
ref="table" ref="table"
:data="tableData" :data="tableData"
style="width: 100%;" style="width: 100%;"
:row-class-name="cell"
height="calc(100vh - 245px)" height="calc(100vh - 245px)"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@selection-change="selectionChangeHandler" @selection-change="selectionChangeHandler"
@ -60,6 +61,12 @@ export default {
}, },
selectionChangeHandler(val) { selectionChangeHandler(val) {
this.selections = val this.selections = val
},
cell({ row }) {
if (row.isRead) { //
console.log(1)
return 'read-color'
}
} }
} }
} }
@ -75,4 +82,7 @@ export default {
min-height: 0; min-height: 0;
height: calc(100vh - 240px); height: calc(100vh - 240px);
} }
::v-deep .read-color td{
color: #999 !important;
}
</style> </style>
Loading…
Cancel
Save