mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-23 00:54:30 +08:00
1. [/] 为 Revive 元素添加了自定义事件触发, 从而正确处理 Remount 发生时的情况 2. [/] 为 Input 元素添加了正确的 onSubmit 事件处理
This commit is contained in:
@@ -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);
|
||||
}
|
||||
);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user