Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 218808c

Browse files
committed
fix(TPopupt): 弹出位置显示不正确
1 parent b4496a7 commit 218808c

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

src/TDesign/wwwroot/tdesign-blazor.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { left } from './js/popper/enums.js'
21
import { createPopper } from './js/popper/popper.js'
32

43
let tdesign = {
@@ -67,17 +66,13 @@ let popup = {
6766
options.onFirstUpdate = state => {
6867
optionDotNetReference.invokeMethodAsync("InvokeOnFirstUpdate", { placement: state.placement });
6968
}
70-
71-
let popper = createPopper(trigerElement, popupElement, options);
69+
let popper = createPopper(trigerElement, popupElement, options);;
70+
7271
setTimeout(() => {
73-
document.body.appendChild(popupElement);
7472
popupElement.style.display = "";
75-
76-
window.addEventListener("onclick", () => {
77-
popup.hide(popper, popupElement, options);
78-
});
79-
80-
}, options.timeout)
73+
document.body.appendChild(popupElement);
74+
popper.update();
75+
}, options.timeout);
8176
return popper;
8277
},
8378
hide: function (popper,popupElement, options) {

0 commit comments

Comments
 (0)