@rc-component/trigger 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/hooks/useAlign.js +4 -2
- package/lib/hooks/useAlign.js +4 -2
- package/package.json +1 -1
package/es/hooks/useAlign.js
CHANGED
|
@@ -100,8 +100,6 @@ export default function useAlign(open, popupEle, target, placement, builtinPlace
|
|
|
100
100
|
const doc = popupElement.ownerDocument;
|
|
101
101
|
const win = getWin(popupElement);
|
|
102
102
|
const {
|
|
103
|
-
width,
|
|
104
|
-
height,
|
|
105
103
|
position: popupPosition
|
|
106
104
|
} = win.getComputedStyle(popupElement);
|
|
107
105
|
const originLeft = popupElement.style.left;
|
|
@@ -153,6 +151,10 @@ export default function useAlign(open, popupEle, target, placement, builtinPlace
|
|
|
153
151
|
};
|
|
154
152
|
}
|
|
155
153
|
const popupRect = popupElement.getBoundingClientRect();
|
|
154
|
+
const {
|
|
155
|
+
height,
|
|
156
|
+
width
|
|
157
|
+
} = win.getComputedStyle(popupElement);
|
|
156
158
|
popupRect.x = popupRect.x ?? popupRect.left;
|
|
157
159
|
popupRect.y = popupRect.y ?? popupRect.top;
|
|
158
160
|
const {
|
package/lib/hooks/useAlign.js
CHANGED
|
@@ -109,8 +109,6 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
109
109
|
const doc = popupElement.ownerDocument;
|
|
110
110
|
const win = (0, _util.getWin)(popupElement);
|
|
111
111
|
const {
|
|
112
|
-
width,
|
|
113
|
-
height,
|
|
114
112
|
position: popupPosition
|
|
115
113
|
} = win.getComputedStyle(popupElement);
|
|
116
114
|
const originLeft = popupElement.style.left;
|
|
@@ -162,6 +160,10 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
162
160
|
};
|
|
163
161
|
}
|
|
164
162
|
const popupRect = popupElement.getBoundingClientRect();
|
|
163
|
+
const {
|
|
164
|
+
height,
|
|
165
|
+
width
|
|
166
|
+
} = win.getComputedStyle(popupElement);
|
|
165
167
|
popupRect.x = popupRect.x ?? popupRect.left;
|
|
166
168
|
popupRect.y = popupRect.y ?? popupRect.top;
|
|
167
169
|
const {
|