调整容器大小时,mat-ink-bar的位置不更新 [英] mat-ink-bar location not update when container resizes

查看:62
本文介绍了调整容器大小时,mat-ink-bar的位置不更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用角材料 mat-tab-nav-bar

我在屏幕的右侧有侧边菜单,单击它可以更改侧边菜单的宽度,并且中心屏幕的宽度会根据菜单的宽度进行更改.

I have side menu on the right side of the screen, click on it change the width of the side menu, and the center screen width change according to the menu width.

问题在于垫子墨水棒的左右位置没有改变.

the problem is that the mat-ink-bar right/left position not changed.

有什么主意吗?

推荐答案

您可以通过在mat-tab-group上调用realignInkBar()来强制墨栏重新对齐,请在

You can force the ink bar to re-align by calling realignInkBar() on mat-tab-group,check out this example on StackBlitz

要进一步了解该错误,请查看此线程

To read further on the bug check out this thread

这篇关于调整容器大小时,mat-ink-bar的位置不更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆