mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-17 20:54:30 +08:00
refactor: 优化ui控制器
This commit is contained in:
1 parent
669ad11c82
commit
9a97a470f1
2 files changed
+8
-21
No files matched your search
@@ -64,32 +64,19 @@ fixedUi.register(
|
||||
);
|
||||
|
||||
hook.once('mounted', () => {
|
||||
const ui = document.getElementById('ui-main')!;
|
||||
const fixed = document.getElementById('ui-fixed')!;
|
||||
|
||||
mainUi.on('start', () => {
|
||||
const ui = document.getElementById('ui-main');
|
||||
if (ui) {
|
||||
ui.style.display = 'flex';
|
||||
}
|
||||
ui.style.display = 'flex';
|
||||
});
|
||||
mainUi.on('end', () => {
|
||||
const ui = document.getElementById('ui-main');
|
||||
if (ui) {
|
||||
ui.style.display = 'none';
|
||||
}
|
||||
ui.style.display = 'none';
|
||||
});
|
||||
fixedUi.on('start', () => {
|
||||
console.log(1);
|
||||
const ui = document.getElementById('ui-fixed');
|
||||
if (ui) {
|
||||
ui.style.display = 'block';
|
||||
}
|
||||
fixed.style.display = 'block';
|
||||
});
|
||||
fixedUi.on('end', () => {
|
||||
console.log(1);
|
||||
const ui = document.getElementById('ui-fixed');
|
||||
if (ui) {
|
||||
ui.style.display = 'none';
|
||||
}
|
||||
fixed.style.display = 'none';
|
||||
});
|
||||
|
||||
mainUi.focusByNum(fixedUi.open('start'));
|
||||
});
|
||||
Reference in new issue
Block a user