File tree 1 file changed +2
-1
lines changed
components/vc-resize-observer
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ const VueResizeObserver = defineComponent({
58
58
handleResize ( entries ) {
59
59
const { target } = entries [ 0 ] ;
60
60
const { width, height } = target . getBoundingClientRect ( ) ;
61
+ const { offsetWidth, offsetHeight } = target ;
61
62
/**
62
63
* Resize observer trigger when content size changed.
63
64
* In most case we just care about element size,
@@ -67,7 +68,7 @@ const VueResizeObserver = defineComponent({
67
68
const fixedHeight = Math . floor ( height ) ;
68
69
69
70
if ( this . width !== fixedWidth || this . height !== fixedHeight ) {
70
- const size = { width : fixedWidth , height : fixedHeight } ;
71
+ const size = { width : fixedWidth , height : fixedHeight , offsetWidth , offsetHeight } ;
71
72
this . width = fixedWidth ;
72
73
this . height = fixedHeight ;
73
74
this . __emit ( 'resize' , size ) ;
You can’t perform that action at this time.
0 commit comments