主要更新: - 🎯 新增综合分析仪表板,包含关键指标卡片、预算对比、智能洞察等组件 - 📊 增强数据可视化能力,新增标签云分析、时间维度分析等图表 - 📱 优化移动端响应式设计,改进触控交互体验 - 🔧 新增多个API模块(base、budget、tag),完善数据管理 - 🗂️ 重构路由结构,新增贷款、快速添加、设置、统计等独立模块 - 🔄 优化数据导入导出功能,增强数据迁移能力 - 🐛 修复多个已知问题,提升系统稳定性 技术改进: - 使用IndexedDB提升本地存储性能 - 实现模拟API服务,支持离线开发 - 增加自动化测试脚本,确保功能稳定 - 优化打包配置,提升构建效率 文件变更: - 新增42个文件 - 修改55个文件 - 包含测试脚本、配置文件、组件和API模块 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
1.6 KiB
JavaScript
63 lines
1.6 KiB
JavaScript
import { chromium } from 'playwright';
|
||
|
||
(async () => {
|
||
const browser = await chromium.launch({
|
||
headless: false,
|
||
devtools: true, // 打开开发者工具
|
||
});
|
||
|
||
const page = await browser.newPage();
|
||
|
||
// 监听控制台消息
|
||
page.on('console', (msg) => {
|
||
const type = msg.type();
|
||
if (type === 'error' || type === 'warning') {
|
||
console.log(`[${type.toUpperCase()}]`, msg.text());
|
||
}
|
||
});
|
||
|
||
// 监听页面错误
|
||
page.on('pageerror', (error) => {
|
||
console.log('[PAGE ERROR]', error.message);
|
||
});
|
||
|
||
// 监听请求失败
|
||
page.on('requestfailed', (request) => {
|
||
console.log(
|
||
'[REQUEST FAILED]',
|
||
request.url(),
|
||
request.failure()?.errorText,
|
||
);
|
||
});
|
||
|
||
try {
|
||
console.log('访问系统...');
|
||
await page.goto('http://localhost:5667', { waitUntil: 'networkidle' });
|
||
|
||
console.log('等待3秒...');
|
||
await page.waitForTimeout(3000);
|
||
|
||
console.log('访问交易管理页面...');
|
||
await page.goto('http://localhost:5667/finance/transaction', {
|
||
waitUntil: 'networkidle',
|
||
});
|
||
|
||
console.log('等待5秒观察控制台...');
|
||
await page.waitForTimeout(5000);
|
||
|
||
// 检查是否有加载指示器
|
||
const loading = await page.locator('.ant-spin').count();
|
||
console.log(`找到 ${loading} 个加载指示器`);
|
||
|
||
// 截图
|
||
await page.screenshot({ path: 'transaction-loading.png', fullPage: true });
|
||
console.log('截图已保存');
|
||
} catch (error) {
|
||
console.error('错误:', error);
|
||
} finally {
|
||
console.log('保持浏览器打开,按Ctrl+C退出...');
|
||
await page.waitForTimeout(30_000);
|
||
await browser.close();
|
||
}
|
||
})();
|