[update] 修改bug87275

This commit is contained in:
lideqin
2024-07-29 16:17:29 +08:00
parent 5841889132
commit e26365fa37
@@ -89,6 +89,7 @@
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:customRow="customRow"
@change="handleTableChange"> @change="handleTableChange">
<!-- 标准编号、标准名称 --> <!-- 标准编号、标准名称 -->
@@ -346,7 +347,8 @@ export default {
list: '/laws/marketStandardDetail/page' list: '/laws/marketStandardDetail/page'
}, },
disableMixinCreated: true, disableMixinCreated: true,
historyVersions: [] // 历史版本数据 historyVersions: [], // 历史版本数据
highlightKey: null
} }
}, },
beforeRouteUpdate (to, from, next) { beforeRouteUpdate (to, from, next) {
@@ -373,6 +375,21 @@ export default {
this.loadData() this.loadData()
}, },
methods: { methods: {
customRow (record) {
return {
style: {
'background-color': this.highlightKey === record.standardNumber ? '#E6F4FF' : 'transparent'
},
on: {
mouseenter: () => {
this.highlightKey = record.standardNumber
},
mouseleave: () => {
this.highlightKey = null
}
}
}
},
initData (ids) { initData (ids) {
// 只有一条数据,需要获取基础信息 // 只有一条数据,需要获取基础信息
if (this.ids.length > 1) { if (this.ids.length > 1) {
@@ -471,4 +488,8 @@ export default {
} }
} }
} }
/deep/ table tbody tr:hover>td {
background-color: transparent !important;
}
</style> </style>