|
|
@@ -34,6 +34,7 @@ interface Props
|
|
|
loading: boolean
|
|
|
customClass?: boolean
|
|
|
showBorder?: boolean
|
|
|
+ hoverHighlight?: boolean
|
|
|
align?: ColumnAlign
|
|
|
columnMaxWidth?: number
|
|
|
}
|
|
|
@@ -54,6 +55,7 @@ const defaultOptions: Partial<Props> = {
|
|
|
showOverflowTooltip: true,
|
|
|
scrollbarAlwaysOn: true,
|
|
|
showBorder: false,
|
|
|
+ hoverHighlight: true,
|
|
|
customClass: false,
|
|
|
tooltipOptions: {
|
|
|
popperClass: 'max-w-120'
|
|
|
@@ -65,6 +67,7 @@ const bindProps = computed(() => {
|
|
|
data,
|
|
|
customClass: _customClass,
|
|
|
showBorder: _showBorder,
|
|
|
+ hoverHighlight: _hoverHighlight,
|
|
|
align: _align,
|
|
|
columnMaxWidth,
|
|
|
...otherProps
|
|
|
@@ -378,10 +381,13 @@ defineExpose({
|
|
|
<el-table
|
|
|
ref="tableRef"
|
|
|
v-loading="loading"
|
|
|
- :class="{ 'zm-table': !customClass, 'show-border': showBorder }"
|
|
|
+ :class="{
|
|
|
+ 'zm-table': !customClass,
|
|
|
+ 'show-border': showBorder,
|
|
|
+ 'is-hover-highlight-disabled': hoverHighlight === false
|
|
|
+ }"
|
|
|
v-bind="bindProps"
|
|
|
- :data="data"
|
|
|
- >
|
|
|
+ :data="data">
|
|
|
<template v-for="(_, name) in forwardedSlots" #[name]="slotData">
|
|
|
<slot :name="name" v-bind="slotData || {}"></slot>
|
|
|
</template>
|
|
|
@@ -545,13 +551,6 @@ defineExpose({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- tr:hover,
|
|
|
- tr.hover-row {
|
|
|
- .el-table__cell {
|
|
|
- background: var(--zm-table-hover-bg) !important;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
tr.current-row {
|
|
|
.el-table__cell {
|
|
|
// color: var(--el-color-primary);
|
|
|
@@ -560,6 +559,17 @@ defineExpose({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ &:not(.is-hover-highlight-disabled) {
|
|
|
+ .el-table__body {
|
|
|
+ tr:hover,
|
|
|
+ tr.hover-row {
|
|
|
+ .el-table__cell {
|
|
|
+ background: var(--zm-table-hover-bg) !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.el-table__row {
|
|
|
.el-table__cell {
|
|
|
font-weight: var(--zm-table-row-font-weight);
|