JavaScript/typescript/error:修订间差异
来自康健生活
| 第86行: | 第86行: | ||
(document.getElementsByClassName('section_content_icon_box_style') as HTMLCollectionOf<HTMLElement>)[0].style.background = `conic-gradient(#4D4D57 ${45*index}deg, transparent ${45*index}deg ${180 - 45*index}deg, transparent 180deg)`; | (document.getElementsByClassName('section_content_icon_box_style') as HTMLCollectionOf<HTMLElement>)[0].style.background = `conic-gradient(#4D4D57 ${45*index}deg, transparent ${45*index}deg ${180 - 45*index}deg, transparent 180deg)`; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Type 'undefined' is not assignable to type | |||
: 加类型断言 | |||