@rc-component/trigger 2.2.6 → 2.2.7

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.
@@ -111,8 +111,6 @@ export default function useAlign(open, popupEle, target, placement, builtinPlace
111
111
  var doc = popupElement.ownerDocument;
112
112
  var win = getWin(popupElement);
113
113
  var _win$getComputedStyle = win.getComputedStyle(popupElement),
114
- width = _win$getComputedStyle.width,
115
- height = _win$getComputedStyle.height,
116
114
  popupPosition = _win$getComputedStyle.position;
117
115
  var originLeft = popupElement.style.left;
118
116
  var originTop = popupElement.style.top;
@@ -161,6 +159,9 @@ export default function useAlign(open, popupEle, target, placement, builtinPlace
161
159
  };
162
160
  }
163
161
  var popupRect = popupElement.getBoundingClientRect();
162
+ var _win$getComputedStyle2 = win.getComputedStyle(popupElement),
163
+ height = _win$getComputedStyle2.height,
164
+ width = _win$getComputedStyle2.width;
164
165
  popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left;
165
166
  popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;
166
167
  var _doc$documentElement = doc.documentElement,
@@ -119,8 +119,6 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
119
119
  var doc = popupElement.ownerDocument;
120
120
  var win = (0, _util.getWin)(popupElement);
121
121
  var _win$getComputedStyle = win.getComputedStyle(popupElement),
122
- width = _win$getComputedStyle.width,
123
- height = _win$getComputedStyle.height,
124
122
  popupPosition = _win$getComputedStyle.position;
125
123
  var originLeft = popupElement.style.left;
126
124
  var originTop = popupElement.style.top;
@@ -169,6 +167,9 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
169
167
  };
170
168
  }
171
169
  var popupRect = popupElement.getBoundingClientRect();
170
+ var _win$getComputedStyle2 = win.getComputedStyle(popupElement),
171
+ height = _win$getComputedStyle2.height,
172
+ width = _win$getComputedStyle2.width;
172
173
  popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left;
173
174
  popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;
174
175
  var _doc$documentElement = doc.documentElement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/trigger",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "base abstract trigger component for react",
5
5
  "engines": {
6
6
  "node": ">=8.x"
@@ -33,7 +33,7 @@
33
33
  "start": "dumi dev",
34
34
  "build": "dumi build",
35
35
  "compile": "father build && lessc assets/index.less assets/index.css",
36
- "prepublishOnly": "npm run compile && np --yolo --no-publish",
36
+ "prepublishOnly": "npm run compile && np --yolo --no-publish --branch antd-v5",
37
37
  "lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
38
38
  "test": "rc-test",
39
39
  "prettier": "prettier --write .",