fix: 修复 common.js 缺少全局变量和错误处理导致的按钮无响应问题

Coze-Commit-Type: user
Coze-User-ID: 3722323274763196
Coze-Conversation-ID: 9894087
This commit is contained in:
user9994793890
2026-07-13 16:14:22 +08:00
parent 6a98bb0cfa
commit 7b7ba2d842
2 changed files with 16 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -1,3 +1,19 @@
// 全局错误处理防止JavaScript错误中断执行
window.onerror = function(msg, url, line, col, error) {
console.error('JavaScript错误:', msg, 'at', url, 'line:', line);
return true; // 阻止错误传播
};
let editingConfigId = null;
let allFields = [];
let currentPage = 1;
let pageSize = 10;
let currentEntityType = '';
let currentSearch = '';
let entityPage = 1;
let entityPageSize = 20;
let selectedEntityIds = new Set();
async function loadConfigs() {
try {
const response = await fetch('/api/config');