Skip to content

Commit

Permalink
fix(useElementSize): add as prop for component usage (#3274)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghany committed Aug 25, 2023
1 parent 9337253 commit 791f7b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useElementSize/component.ts
Expand Up @@ -6,7 +6,7 @@ import type { UseResizeObserverOptions } from '../useResizeObserver'

export const UseElementSize = /*#__PURE__*/ defineComponent<ElementSize & UseResizeObserverOptions & RenderableComponent>({
name: 'UseElementSize',
props: ['width', 'height', 'box'] as unknown as undefined,
props: ['width', 'height', 'box', 'as'] as unknown as undefined,
setup(props, { slots }) {
const target = ref()
const data = reactive(useElementSize(target, { width: props.width, height: props.height }, { box: props.box }))
Expand Down

0 comments on commit 791f7b1

Please sign in to comment.