nd-autosize-elementui 2.15.20 → 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.
package/lib/tooltip.js CHANGED
@@ -302,7 +302,10 @@ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
302
302
  var scaleX = Number(position[0]);
303
303
  var scaleY = Number(position[1]);
304
304
  // 参照_getOffsets方法,还原reference的位置数据重新计算
305
- _popper.style['left'] = Math.round(reference.left / scaleX + reference.width / scaleX / 2 - popper.width / 2) + 'px';
305
+ _left = Math.round(reference.left / scaleX + reference.width / scaleX / 2 - popper.width / 2)
306
+ _left = _left<5?5:_left;
307
+ _popper.style['left'] = _left + 'px';
308
+
306
309
  _popper.style['top'] = Math.round(reference.top / scaleY - popper.height) + 'px';
307
310
  },
308
311
  show: function show() {
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "name": "nd-autosize-elementui",
3
- "version": "2.15.20",
4
- "description": "A Component Library for Vue.js.",
3
+ "version": "2.15.22",
4
+ "description": "解决element-ui_2.15版本,transform:scale后tip出现位置偏差、颜色选择器出现无法选择问题进行修复",
5
5
  "main": "lib/element-ui.common.js",
6
6
  "files": [
7
7
  "lib",