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

36
tabs.js Normal file
View File

@@ -0,0 +1,36 @@
// @ts-nocheck
// 逐页签量测:node tabs.js 生成一段 JS,在页面内点第 N 个页签后量测
const TAB = Number(process.argv[2] || 0)
const SELS = process.argv[3]
? process.argv[3].split(',')
: [
'.project-detail__tabs',
'.project-files__list',
'.project-files__item',
'.project-finance__title',
'.project-finance__plans',
'.project-finance__plan',
'.project-finance__files',
'.project-finance__file',
'.project-after-sales__banner',
'.project-after-sales__title',
'.project-after-sales__field',
'.project-after-sales__readonly',
'.project-after-sales__actions',
'.project-after-sales__btn',
]
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)); }
const o = {};
for (const s of ${JSON.stringify(SELS)}) {
const list = document.querySelectorAll(s);
o[s] = list.length === 0 ? null : Array.from(list).slice(0, 3).map(e => {
const r = e.getBoundingClientRect();
return [+r.x.toFixed(1), +r.y.toFixed(1), +r.width.toFixed(1), +r.height.toFixed(1)];
});
}
return JSON.stringify(o);
})()`
console.log(js)