[🛠️ Fix] Issue #32 & #33

1. [/] 为 Revive 元素添加了自定义事件触发, 从而正确处理 Remount 发生时的情况
2. [/] 为 Input 元素添加了正确的 onSubmit 事件处理
This commit is contained in:
Minoricew
2025-06-22 22:24:36 +08:00
parent d5b4c4b61e
commit 2ff4a28b70
7 changed files with 66 additions and 15 deletions

View File

@@ -9,9 +9,10 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
let clickCounter = 0;
let clickTimeout = null;
const onMounted = () => {
const onMounted = (revive = false) => {
if (
!global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod.showEntryIcon
!global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod.showEntryIcon &&
!revive
) {
const rootEl = document.getElementById("root");
rootEl.classList.add("aura-header-icon-hidden");
@@ -19,7 +20,8 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
if (
global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod
.fallbackAccessMethods.hotkey
.fallbackAccessMethods.hotkey &&
!revive
) {
document.addEventListener("keydown", (event) => {
if (event.ctrlKey && event.shiftKey && event.key === "A") {
@@ -53,4 +55,11 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
};
onMounted();
document.addEventListener(
"onLoaderElRevive:Aura.UI.Assistant.HeaderEntry",
() => {
onMounted(true);
}
);
})();