首页 > 使用Angular Material中的tooltip显示多行从数据库取得的数据,结果只能显示出第一条数据

使用Angular Material中的tooltip显示多行从数据库取得的数据,结果只能显示出第一条数据

我想用tooltip来展示管理员操作的历史记录,在tooltip中每一行列出每一次管理员更改用户状态的记录信息,如下图所示:

现在遇到的问题是,鼠标放到Button上时,弹出的tooltip中只展示了一行记录,剩下的记录没有正常显示出来,在chrome浏览器中能看到有剩下的记录的Dom结构。
“历史按钮”的那一部分代码如下:

<md-button class="md-icon-button" data-ng-mouseover="operation_history($event, u.uid)">
  <md-tooltip md-direction="bottom" style="width: 250px;">
  <div data-ng-show="true">
  <div data-ng-repeat="operation_history in operation_historys">
  <span>{{operation_history.create_name}}:      {{operation_history.create_time}}&nbsp;
 {{operation_history.old_status}} -&gt;{{operation_history.new_status}}    </span><br>
  </div>
  </div>
  </md-tooltip>
  <i class="material-icons md-18">history</i>
</md-button>

不知道是不是tooltip本身样式的问题。。。


在stackoverflow上的提问,有朋友给回复了。头一回在stackoverflow上提问,以为别人看不懂我蹩脚的英文描述的,结果看懂了。解决方案如下,加入如下样式:
.md-content.md-show {
height: auto !important;
}

【热门文章】
【热门文章】