Skip to content

Commit

Permalink
fix: attrs.style type
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Jan 29, 2023
1 parent 0496481 commit dfedbd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default defineComponent({
'data-brr': props.ratio,
'ref': wrapperRef,
'style': {
...attrs?.style,
...attrs.style as Record<string, string>,
display: 'inline-block',
verticalAlign: 'top',
textDecoration: 'inherit',
Expand Down

1 comment on commit dfedbd2

@madebyfabian
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use import type { StyleValue } from 'vue' and ...attrs.style as StyleValue to get all the actual style types with descriptions. And style could either be a string, a key-value or an array in vue.

Please sign in to comment.