fix: tooltip issue about customer follower

change: Grid.export optimized (compression with `deflate`)
feature: ui-tab
feature: Popup.closable
This commit is contained in:
2024-03-12 13:36:54 +08:00
parent f54eb3ac24
commit e07342a257
10 changed files with 160 additions and 43 deletions

View File

@ -172,7 +172,11 @@ export class Popup {
let title = option.title;
if (!(title instanceof HTMLElement)) {
title = createElement('div', t => {
t.className = 'ui-popup-header-title';
if (option.movable === false) {
t.className = 'ui-popup-header-title no-move';
} else {
t.className = 'ui-popup-header-title';
}
t.innerText = title;
});
}
@ -244,15 +248,17 @@ export class Popup {
});
icons.appendChild(collapse);
}
const cancel = createIcon('fa-regular', 'times');
cancel.tabIndex = tabIndex + 3;
cancel.addEventListener('keypress', e => {
if (e.key === ' ' || e.key === 'Enter') {
this.close();
}
});
cancel.addEventListener('click', () => this.close());
icons.appendChild(cancel);
if (option.closable !== false) {
const cancel = createIcon('fa-regular', 'times');
cancel.tabIndex = tabIndex + 3;
cancel.addEventListener('keypress', e => {
if (e.key === ' ' || e.key === 'Enter') {
this.close();
}
});
cancel.addEventListener('click', () => this.close());
icons.appendChild(cancel);
}
});
header.appendChild(icons);
}),