解决有更新行高亮的问题

This commit is contained in:
haiyangcui
2020-10-17 14:12:24 +02:00
parent 98b019be5f
commit dc8bdb29dc
2 changed files with 7 additions and 8 deletions

View File

@@ -226,6 +226,9 @@
height: 50px;
border-bottom: 1px solid;
}
.el-table .highlight{
color: var(--highlight-color) !important;
}
}
}
}

View File

@@ -12,7 +12,7 @@
:data="list"
height="100%"
row-key="id"
:row-style="highlightHasUpdate"
:cell-class-name="checkUpdate"
@row-click="detailEvent"
style="width: 100%">
<el-table-column
@@ -177,13 +177,10 @@ export default {
info: e
}
},
highlightHasUpdate (e) {
const stylejson = {}
stylejson.backgroundColor = 'var(--highlight-color)'
if (e.hasUpdate) {
return stylejson
checkUpdate ({ row, rowIndex }) {
if (this.list[rowIndex].hasUpdate) {
return 'highlight'
}
return ''
},
clearHasUpdateFlag (e) {
star.find({ id: e.id }).then(res => {
@@ -215,7 +212,6 @@ export default {
msg = `同步"${e.name}"成功, 检查到更新。`
this.$message.success(msg)
}
this.highlightHasUpdate(e)
star.update(e.id, doc)
this.getFavorites()
})