重构:商店从右侧 Tab 移至工具栏按钮弹窗,新增 2 列网格卡片布局

This commit is contained in:
2026-02-27 16:06:15 +08:00
parent 9c8f7b1a95
commit 8ac540c65b
3 changed files with 537 additions and 17 deletions
@@ -27,18 +27,11 @@
// ── Tab 切换 ──────────────────────────────────────
function switchTab(tab) {
// 所有内容面板(名单/房间/贴图/酷库 用 block,商店用 flex absolute 覆盖)
// 切换名单/房间/贴图/酷库 面板
['users', 'rooms', 'emoji', 'action'].forEach(t => {
document.getElementById('panel-' + t).style.display = t === tab ? 'block' : 'none';
document.getElementById('tab-' + t).classList.toggle('active', t === tab);
});
// 商店面板:absolute 定位覆盖,display flex/none 切换
const shopPanel = document.getElementById('shop-panel');
const shopTab = document.getElementById('tab-shop');
if (shopPanel && shopTab) {
shopPanel.style.display = tab === 'shop' ? 'flex' : 'none';
shopTab.classList.toggle('active', tab === 'shop');
}
// 贴图 Tab 懒加载
if (tab === 'emoji') {
document.querySelectorAll('#panel-emoji img[data-src]').forEach(img => {