Skip to content

Home > @jview/hooks > UseElementContentRectOption

UseElementContentRectOption interface

useElementContentRect 选项

Signature:

typescript
export interface UseElementContentRectOption

Properties

Property

Modifiers

Type

Description

autoCalcOnActivated

boolean

是否在onActivated钩子中自动计算 ContentRect

autoCalcOnMounted

boolean

是否在onMounted钩子中自动计算 ContentRect

autoCalcOnWinResize

boolean

是否在窗口 resize 时自动计算 ContentRect

getElement

GeneralFunction<Element>

函数,返回一个Element

immediate

boolean

是否立即计算 ContentRect

observe

boolean

是否启用 useResizeObserver,启用则会实时观察计算 ContentRect

observeOptions

Exclude<Partial<UseResizeObserverOption>, 'getElement'>

对应 UseResizeObserverOption