mirror of https://github.com/ElemeFE/element
parent
107af480cd
commit
74e6dac47c
|
@ -675,6 +675,7 @@
|
||||||
<template>
|
<template>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData3"
|
:data="tableData3"
|
||||||
|
border
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
## Tooltips 文字提示
|
|
||||||
|
## Tooltip 文字提示
|
||||||
|
|
||||||
常用于展示鼠标 hover 时的提示信息。
|
常用于展示鼠标 hover 时的提示信息。
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ export default {
|
||||||
{
|
{
|
||||||
this._l(this.columns, (column, cellIndex) =>
|
this._l(this.columns, (column, cellIndex) =>
|
||||||
<td
|
<td
|
||||||
style={ this.getColumnWhiteSpaceStyle(column) }
|
|
||||||
class={ [column.id, column.align, this.isCellHidden(cellIndex) ? 'hidden' : '' ] }
|
class={ [column.id, column.align, this.isCellHidden(cellIndex) ? 'hidden' : '' ] }
|
||||||
on-mouseenter={ ($event) => this.handleCellMouseEnter($event, row) }
|
on-mouseenter={ ($event) => this.handleCellMouseEnter($event, row) }
|
||||||
on-mouseleave={ this.handleCellMouseLeave }>
|
on-mouseleave={ this.handleCellMouseLeave }>
|
||||||
|
@ -118,10 +117,6 @@ export default {
|
||||||
return classes.join(' ');
|
return classes.join(' ');
|
||||||
},
|
},
|
||||||
|
|
||||||
getColumnWhiteSpaceStyle(column) {
|
|
||||||
return column.showTooltipWhenOverflow ? { 'white-space': 'nowrap' } : {};
|
|
||||||
},
|
|
||||||
|
|
||||||
handleCellMouseEnter(event, row) {
|
handleCellMouseEnter(event, row) {
|
||||||
const table = this.$parent;
|
const table = this.$parent;
|
||||||
const cell = getCell(event);
|
const cell = getCell(event);
|
||||||
|
|
|
@ -39,8 +39,16 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-tooltip {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.el-tooltip__rel {
|
.el-tooltip__rel {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
.cell > * {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@e empty-block {
|
@e empty-block {
|
||||||
|
|
Loading…
Reference in New Issue