小编uro*_*oti的帖子

Angular Material 主题不会更改垫子对话框强调色

我需要根据参数更改应用程序的颜色主题,这应该是一个非常简单的操作。在我的应用程序中,我使用 Fuse 角度材质主题。当我尝试从主要主题切换到次要主题时,对话框组件的强调色不会更改,而其他组件(例如导航栏)会更改。

_主题.scss

@import '~@angular/material/theming';
@import './component-themes';

$primary: mat-palette($mat-fusedark);
$accent: mat-palette($mat-light-blue, 600, 400, 700);
$warn: mat-palette($mat-red);
$white: mat-palette($mat-white);
$black: mat-palette($mat-black);

$first-theme: mat-light-theme($primary, $accent, $warn);

$background: map-get($first-theme, background);
$foreground: map-get($first-theme, foreground);

@include angular-material-theme($first-theme);
@include component-themes($first-theme);

$second-primary: mat-palette($mat-fusedark);
$second-accent: mat-palette($mat-green, 600, 400, 700);
$second-warn: mat-palette($mat-red);

$second-theme: mat-light-theme($second-primary, $second-accent, $second-warn);

.second-theme {
  @include angular-material-theme($second-theme);
  @include component-themes($second-theme);
}
Run Code Online (Sandbox Code Playgroud)

组件主题.scss

@import "../partials/navigation";
@import "../partials/dialog";

@mixin component-themes($theme) {
  @include navigation-theme($theme);
  @include dialog-theme($theme);
}
Run Code Online (Sandbox Code Playgroud)

_dialog.scss

@import '~@angular/material/theming';

    @mixin dialog-theme($theme) {
      $accent: map-get($theme, accent);
    
      .dialog-wrapper {
        .mat-dialog-container …
Run Code Online (Sandbox Code Playgroud)

css sass angular-material angular

4
推荐指数
1
解决办法
2228
查看次数

增加节点大小 vis.js

我的 vis.js 有问题,我无法增加节点的大小及其标签的字体。

nodes.push({id: el, label: currentNode.hostName,font: {color:'#FF9900', face:'courier',size:300}, group: "Domain", color:{background: getColor(currentNode) , border: getColor(currentNode) }, value: 10000, title: label,labelHighlightBold: true, borderWidthSelected: 7 });


Domain: {
                shape: 'triangleDown',
                shapeProperties: {

                      useImageSize: false,

                      size:3333
                    }

            }
Run Code Online (Sandbox Code Playgroud)

谢谢

javascript vis.js

2
推荐指数
1
解决办法
8800
查看次数

标签 统计

angular ×1

angular-material ×1

css ×1

javascript ×1

sass ×1

vis.js ×1