@douyinfe/semi-ui 2.36.1-alpha.0 → 2.36.1-alpha.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/dist/umd/semi-ui.js +7 -0
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/modal/confirm.d.ts +3 -3
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/modal/confirm.d.ts +3 -3
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -18667,6 +18667,7 @@ class foundation_Tooltip extends foundation {
|
|
|
18667
18667
|
return null;
|
|
18668
18668
|
}
|
|
18669
18669
|
calcPosStyle(props) {
|
|
18670
|
+
var _a, _b;
|
|
18670
18671
|
const {
|
|
18671
18672
|
spacing,
|
|
18672
18673
|
isOverFlow
|
|
@@ -18827,6 +18828,12 @@ class foundation_Tooltip extends foundation {
|
|
|
18827
18828
|
// Calculate container positioning relative to window
|
|
18828
18829
|
left = left - containerRect.left;
|
|
18829
18830
|
top = top - containerRect.top;
|
|
18831
|
+
if (Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - ((_a = this._adapter.getContainer()) === null || _a === void 0 ? void 0 : _a.clientWidth)) > 1) {
|
|
18832
|
+
left /= wrapperRect.width / this._adapter.getContainer().clientWidth;
|
|
18833
|
+
}
|
|
18834
|
+
if (Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.height) - ((_b = this._adapter.getContainer()) === null || _b === void 0 ? void 0 : _b.clientHeight)) > 1) {
|
|
18835
|
+
top /= wrapperRect.height / this._adapter.getContainer().clientHeight;
|
|
18836
|
+
}
|
|
18830
18837
|
/**
|
|
18831
18838
|
* container为body时,如果position不为relative或absolute,这时trigger计算出的top/left会根据html定位(initial containing block)
|
|
18832
18839
|
* 此时如果body有margin,则计算出的位置相对于body会有问题 fix issue #1368
|