将我的 Angular 6 项目迁移到 12 后。\n我在终端中收到多个警告
\n如果在 angular.json 中我设置了 optimization: false 配置,那么所有问题都会得到解决,但我不想进行此更改,它应该只是 true 。
\n经过优化:是的,我收到所有这些警告:-
\n早期相同的代码运行良好,没有任何警告。
\nassets/.../variables.scss - Warning: Css Minimizer Plugin: > assets/.../variables.scss:6:0: warning: Unexpected "$"\n 6 \xe2\x94\x82 $color-normal-gray:#8a8a8a;\n \xe2\x95\xb5 ^\n\nassets/.../global.scss - Warning: Css Minimizer Plugin: > \nassets/.../global.scss:285:2: warning: Expected identifier but found "."\n 285 \xe2\x94\x82 .dropdown-menu{\n \xe2\x95\xb5 ^\n\nassets/.../global.scss - Warning: Css Minimizer Plugin: > \nassets/.../global.scss:255:6: warning: Expected identifier but found "*"\n 255 \xe2\x94\x82 *background-color: #d9d9d9;\n \xe2\x95\xb5 ^\n\nassets/.../master.scss - Warning: Css Minimizer Plugin: > \nassets/.../master.scss:567:8: …Run Code Online (Sandbox Code Playgroud) 听说我正在迭代数组,我想每 2 秒运行一次这个循环。
let Array = [1,2,3,4,5,6]
for (i = 0; i < Array.length; i++) {
setTimeout((item)=>{
//business logic
console.log("item", item);
}, 2000 * i, Array[i]);
}
Run Code Online (Sandbox Code Playgroud)
如何在 observable.timer 方法中转换此代码?
我想在 SVG 的特定路径元素上应用亮度。
<svg xmlns="http://www.w3.org/2000/svg" style="top: 20px; left:15px; position: absolute; z-index: 0; background: none; width:528px; height: 418px;"
viewBox="32 0 470 432">
<defs>
<style>
.cls-1H{fill:#ed1c24}.cls-2H{fill:#ff7500; filter: brightness(2)}.cls-3H{fill:#82c341}.cls-4H{fill:#41d3ff}
</style>
</defs>
<path id="Path_139" d="M1314.486 1130.389l-8.164-5.659a257.023 257.023 0 0 0 24.271-43.518l9.1 3.973a267.1 267.1 0 0 1-25.207 45.204z" class="cls-1H" data-name="Path 139" transform="translate(-826.518 -710.46)"/>
<path id="Path_140" d="M1343.569 1075.834l-9.248-3.625a256.932 256.932 0 0 0 14.831-55.424l9.823 1.479a266.837 266.837 0 0 1-15.406 57.57z" class="cls-2H" data-name="Path 140" transform="translate(-826.518 -710.46)"/>
<path id="Path_141" d="M1360.292 1008.228l-9.873-1.1a257.522 257.522 0 0 0 1.591-28.53v-.421a261.5 261.5 0 0 …Run Code Online (Sandbox Code Playgroud)