ElementUI bug集合

一、表格移上去会有白色背景,如下图:

 解决方法:

<style lang="scss" scoped>
/deep/.el-table--enable-row-hover .el-table__body tr:hover>td{
  background: none !important;
}

//有时候上面的方法不管用,试试下面的方法

/deep/.el-table__body tr:hover>td {
background-color: #134087 !important;
}


</style>

注意:不能放在 /deep/.el-table{ }里面,经测试不行,而放在上面的位置可以,记录一下。

<style lang="scss" scoped></style> 注意必须加上scope!!

 

二、升级ElementUI版本到2.13.0,会导致el-table内容不显示,有内容但是显示空白

参考官网更新内容:

 理解:更新之后的版本,定义 row-style 设计上支持的是Object或返回ObjectFunction,因此原issue返回string不支持。

 解决办法:

<el-table
    :row-style="showRow"
  >
</el-table>

showRow: function(row) {
  const show = row.row.parent
    ? row.row.parent._expanded && row.row.parent._show
    : true;
  row.row._show = show;
  return show
    ? {'display':'table-row'}
    : {'display':'none'};
},
          

 三、

 

 问题:明明有值,但是一直显示加载中,原因:

 

 原因:有这个加载中的属性,导致值显示不出来

posted @ 2020-04-23 14:07  有梦想的前端er  阅读(525)  评论(0)    收藏  举报