(
element: HTMLElement,
styles: { [K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K] }
)
| 235 | * 应用样式到元素 |
| 236 | */ |
| 237 | export function applyStyles( |
| 238 | element: HTMLElement, |
| 239 | styles: { [K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K] } |
| 240 | ): void { |
| 241 | for (const key in styles) { |
| 242 | const value = styles[key]; |
| 243 | if (value !== undefined) { |
| 244 | element.style[key] = value; |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * 创建图标元素 |
no outgoing calls
no test coverage detected