mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-07 04:33:29 +08:00
解决有更新行高亮的问题
This commit is contained in:
@@ -226,6 +226,9 @@
|
||||
height: 50px;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
.el-table .highlight{
|
||||
color: var(--highlight-color) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user