fix: 布局切换用 cssText 显式设置 (防止 style='' 残留)
This commit is contained in:
@@ -102,12 +102,12 @@
|
||||
grid.innerHTML = '<div class="card" style="text-align:center;padding:24px;color:var(--text-dim)">加载中...</div>';
|
||||
if (_layoutMode === 'row') {
|
||||
grid.className = 'layout-row';
|
||||
grid.style = '';
|
||||
grid.style.cssText = 'display:flex;flex-direction:column;gap:12px';
|
||||
btn.textContent = '⊞ 网格';
|
||||
btn.className = 'btn btn-sm btn-filled';
|
||||
} else {
|
||||
grid.className = '';
|
||||
grid.style = 'display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px';
|
||||
grid.style.cssText = 'display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px';
|
||||
btn.textContent = '☷ 横版';
|
||||
btn.className = 'btn btn-sm btn-outlined';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user