如何使我的组件占据席子小吃店的整个宽度?

问题描述

我想这有点奇怪,我正在将Angular 10与Angular Materials一起使用。我有一个用.openFromComponent()打开的MatSnackBar,但该组件仅占据了小吃条宽度的一半。

enter image description here

这是相关的代码(我想全部,如果您需要更多,请问一下)。

Component.ts

const snackbar = this.snackbar.openFromComponent(
  SaveSuccessfulPopupComponent,{
    duration: 0,verticalPosition: 'top',}
);

Component.html

<div class="save-success-snackbar-body">
    <span class="left">
        You successfully edited your profile
    </span>

    <span class="right">
        <mat-icon (click)="this.close()">clear</mat-icon>
    </span>
</div>

Component.scss

.save-success-snackbar-body {
    color: BLACK;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 10px;
    border-radius: 4px;
}
.save-success-snackbar-body .left {
    width: 80%;
}

.save-success-snackbar-body .right {
    width: 20%;
    justify-content: right;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...