本文介绍了使用自定义主题后,角度材质动画无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是角钢版本7和角钢版本7在我更改为自定义主题之后似乎所有作品都接受了动画垫进度条停止了应有的运动
I'm using angular material version 7 and angular version 7After i change to custom themeIt seems like all work accept the animationsThe mat-progress-bar stopped move like it should
这是我的进度栏
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
这是自定义主题
$my-primary: (
50: #34495e,
100: #34495e,
200: #34495e,
300: #34495e,
400: #34495e,
500: #34495e,
600: #34495e,
700: #34495e,
800: #34495e,
900: #34495e,
A100: #34495e,
A200: #34495e,
A400: #34495e,
A700: #34495e,
contrast: (
50: white,
100: white,
200: white,
300: white,
400: white,
500: white,
600: white,
700: white,
800: white,
900: white,
A100: white,
A200: white,
A400: white,
A700: white
)
);
$my-secondary: (
// like above
);
// custom theme
@include mat-core();
$app-primary: mat-palette($my-primary);
$app-accent: mat-palette($my-secondary);
$app-warn: mat-palette($mat-red);
$app-theme: mat-light-theme($app-primary, $app-accent, $app-warn);
@include angular-material-theme($app-theme);
推荐答案
我解决了.我将原色50100200300400更改为较浅的颜色
I solved it. i changed the primary color 50 100 200 300 400 to lighter color
这篇关于使用自定义主题后,角度材质动画无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!