feat ui设计稿bug修复

This commit is contained in:
Ironsp
2026-10-01 10:53:13 +08:00
parent 9ab6253c81
commit 1601bdd82c
89 changed files with 4741 additions and 3652 deletions

19
diag.js Normal file
View File

@@ -0,0 +1,19 @@
// @ts-nocheck
// 诊断:点页签后输出祖先链几何,定位额外间距来源
const TAB = Number(process.argv[2] || 2)
const TARGET = process.argv[3] || '.project-files__list'
const js = `(async function(){
const tabs = document.querySelectorAll(".project-detail__tab");
if (${TAB} > 0 && tabs[${TAB} - 1]) { tabs[${TAB} - 1].click(); await new Promise(r => setTimeout(r, 900)); }
let el = document.querySelector(${JSON.stringify(TARGET)});
const chain = [];
while (el && chain.length < 6) {
const r = el.getBoundingClientRect();
const cs = getComputedStyle(el);
chain.push({ cls: (el.className || '').toString().slice(0, 40), y: +r.y.toFixed(1), h: +r.height.toFixed(1), mt: cs.marginTop, pt: cs.paddingTop, pb: cs.paddingBottom, gap: cs.gap, rowGap: cs.rowGap });
el = el.parentElement;
}
return JSON.stringify(chain, null, 0);
})()`
console.log(js)