nd-autosize-elementui 2.15.21 → 2.15.22

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.
@@ -136,11 +136,12 @@ exports.default = {
136
136
  if (reference.top / scaleY + reference.height / scaleY + popper.height * popperScaleY > parseInt(document.body.style.height, 10)) {
137
137
  _options.placement = 'start-top';
138
138
  }
139
- var _left = Math.round(reference.left / scaleX + reference.width / scaleX / 2 - popper.width * popperScaleX / 2) + 'px';
139
+ var _left = Math.round(reference.left / scaleX + reference.width / scaleX / 2 - popper.width * popperScaleX / 2)
140
140
  if (parseInt(_left, 10) + popper.width * popperScaleX > parseInt(document.body.style.width, 10)) {
141
- _left = Math.round(parseInt(document.body.style.width, 10) - popper.width * popperScaleX - 15) + 'px';
141
+ _left = Math.round(parseInt(document.body.style.width, 10) - popper.width * popperScaleX - 15)
142
142
  }
143
- _popper.style['left'] = _left;
143
+ _left=_left<10?10:_left;
144
+ _popper.style['left'] = _left + 'px';
144
145
  if (_options.placement === 'start-top' || _options.placement === 'top' || _options.placement === 'end-top') {
145
146
  _popper.style['top'] = Math.round(reference.top / scaleY - popper.height * popperScaleY) + 'px';
146
147
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nd-autosize-elementui",
3
- "version": "2.15.21",
3
+ "version": "2.15.22",
4
4
  "description": "解决element-ui_2.15版本,transform:scale后tip出现位置偏差、颜色选择器出现无法选择问题进行修复",
5
5
  "main": "lib/element-ui.common.js",
6
6
  "files": [