Skip to content
On this page

getStyle ​

获取一个dom的样式

使用 ​

js
import { getStyle } from '@pinos-ui/utils'

代码示例 ​

参数说明 ​

参数名说明类型必传默认值
el目标元素HTMLElement是-
styleNamestyle 属性keyof CSSStyleDeclaration是-

类型声明 ​

js
export declare const getStyle: (el: HTMLElement, styleName: keyof CSSStyleDeclaration) => string | number | CSSRule | ((index: number) => string) | ((property: string, value: string | null, priority?: string | undefined) => void) | null | undefined