Element UI version
2.15.7
OS/Browsers version
window11/Chrome 96.0.4664.45
Vue version
2.6.14
Reproduction Link
https://codepen.io/ileirui/pen/NWaqPLq
Steps to reproduce
table绑定cell-mouse-leave和cell-mouse-enter方法,在鼠标移入行与移出行时,姓名列显示不同的值
What is Expected?
鼠标移入行,姓名列显示日期,移出行,姓名列显示姓名
What is actually happening?
已预定义了show=false的数据(前三行数据),鼠标移入行,姓名列显示日期,移出行,姓名列显示姓名
未预定义show=false的数据(最后一行数据),鼠标移入行,姓名列依旧显示姓名,移出行,姓名列显示姓名
2.15.6版本不需要在源数据中提前预定义字段show=false尽可以对表格行数据进行创建字段等操作,2.15.7版本必须在源数据声明show=false在能进行正常操作,若不提前在源数据声明,后续通过别的方式在row中添加show字段在对其进行操作,无法达到预期效果
1条答案
按热度按时间dldeef671#
Translation of this issue:
Element UI version
2.15.7
OS/Browsers version
window11/Chrome 96.0.4664.45
Vue version
2.6.14
Reproduction Link
https://codepen.io/ileirui/pen/NWaqPLq
Steps to reproduce
Table is bound with cell mouse leave and cell mouse enter methods. When the mouse moves into and out of a row, the name column displays different values
What is Expected?
Move the mouse into the row, the name column displays the date, move the travel, and the name column displays the name
What is actually happening?
The data with show = false (the first three rows of data) has been predefined. Move the mouse into the row, the name column displays the date, move the trip, and the name column displays the name
The data with show = false (the last row of data) is not predefined. Move the mouse to the row, and the name column still displays the name. Move the row, and the name column displays the name
In version 2.15.6, it is not necessary to predefine the field show = false in the source data in advance. You can create fields for table row data as much as possible. In version 2.15.7, you must declare show = false in the source data to operate normally. If you do not declare in the source data in advance, you can add the show field in the row in other ways to operate it, which cannot achieve the expected effect