/** * ProxyPanel 通用JavaScript函数 */ /* 辅助:替换路由模板中的 PLACEHOLDER */ const jsRoute = (template, id) => template.replace(id ? "PLACEHOLDER" : "/PLACEHOLDER", id || ""); /* ----------------------- 小工具 / 辅助函数 ----------------------- */ /** 统一弹窗封装(基于 SweetAlert2) */ function showAlert(options) { // options 直接传给 swal.fire;返回 Promise return swal.fire(options); } /** 将 errors 对象转换为