feat: 手术管理列表点击行高亮 (highlight-current-row)
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="surgeryList" row-key="id" :row-class-name="getRowClassName">
|
<el-table v-loading="loading" :data="surgeryList" row-key="id" :row-class-name="getRowClassName" highlight-current-row @current-change="handleCurrentChange">
|
||||||
<!-- 申请日期:datetime - 2025-09-19 14:15:00 - 不可操作 -->
|
<!-- 申请日期:datetime - 2025-09-19 14:15:00 - 不可操作 -->
|
||||||
<el-table-column label="申请日期" align="center" prop="createTime" width="160">
|
<el-table-column label="申请日期" align="center" prop="createTime" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -1405,6 +1405,12 @@ function getRowClassName({ row }) {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 当前选中行(高亮)
|
||||||
|
const currentRow = ref(null)
|
||||||
|
function handleCurrentChange(row) {
|
||||||
|
currentRow.value = row
|
||||||
|
}
|
||||||
|
|
||||||
// 时间格式化函数
|
// 时间格式化函数
|
||||||
function parseTime(time, pattern) {
|
function parseTime(time, pattern) {
|
||||||
if (!time) return ''
|
if (!time) return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user