微件:GFLMail
来自OGAS数据中枢
更多操作
<script>document.querySelectorAll('.gfl-item').forEach(item => {
item.addEventListener('click', () => {
const idx = item.getAttribute('data-gfl-index');
const root = item.closest('.gfl-mail');
if (!root) return;
root.querySelectorAll('.gfl-detail').forEach(d => d.classList.remove('is-open'));
const targetDetail = root.querySelector(`#gflDetail-${idx}`);
if (!targetDetail) return;
targetDetail.classList.add('is-open');
root.classList.add('view-detail');
const detailHeight = targetDetail.scrollHeight;
if (detailHeight > 0) {
root.style.height = detailHeight + 'px';
}
});
});
document.querySelectorAll('.gfl-back-btn').forEach(btn => {
btn.addEventListener('click', () => {
const root = btn.closest('.gfl-mail');
if (!root) return;
root.classList.remove('view-detail');
root.querySelectorAll('.gfl-detail').forEach(d => d.classList.remove('is-open'));
root.style.height = ; });
}); </script>