在更新Intellij Idea 2022.1.3 :: ng-deep被弃用之后

发布于 2025-02-10 09:40:41 字数 562 浏览 1 评论 0原文

正如标题所说,我更新了Intellij的版本,现在Angular Material Selector :: D-Deep显示了我的弃用。

示例:

<mat-form-field class="register-custom-select">
 <mat-select formControlName="gender" required>
   <mat-option class="register-custom-option" *ngFor="let gender of genders 
   [value]="gender.genderValue">
    {{ gender.genderValue }}
   </mat-option>
  </mat-select>
 </mat-form-field>

::ng-deep .register-custom-select .mat-form-field-underline {
  background-color: #838383;
}

我需要更改什么才能使选择器不再弃用并且仍然具有风格?

As the headline says, I updated the version of IntelliJ and now the angular material selector ::ng-deep is showing me as deprecated.

Example:

<mat-form-field class="register-custom-select">
 <mat-select formControlName="gender" required>
   <mat-option class="register-custom-option" *ngFor="let gender of genders 
   [value]="gender.genderValue">
    {{ gender.genderValue }}
   </mat-option>
  </mat-select>
 </mat-form-field>

::ng-deep .register-custom-select .mat-form-field-underline {
  background-color: #838383;
}

What do I need to change to make the selector no longer deprecated and still have the style?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅唱々樱花落 2025-02-17 09:40:41

对我来说,使用Globale样式

以您的样式解决此问题。cssyu可以添加

.register-custom-select .mat-form-field-underline { 
background-color: #838383!important; 
}

For me using globale style resolve this

In your style.css yu can add

.register-custom-select .mat-form-field-underline { 
background-color: #838383!important; 
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文