Files
competition-website/index.html
qubiaobiao 042e0a8e1f feat(frontend): SortableJS 改为本地依赖,移除公网 CDN 运行时依赖(R33)
- package.json: 新增 sortablejs@^1.15.0(dependencies)
- src/main.js: import Sortable + 挂载 window.Sortable
  (保留全局挂载形式 => Admin.vue 的 window.Sortable.* 零改动)
- index.html: 删除 cdn.jsdelivr.net 的 <script>,留注释说明原因
- 原因: 内网/离线部署时 CDN 不可达 => window.Sortable 为 undefined,
  而 Admin.vue:3089/3276 的 `if (!window.Sortable) return` 会静默吞掉
  新闻/轮播的拖拽排序(界面零提示)
- 验证: 真 chromium 16/16 PASS(含整站 0 次 CDN 请求、宿主元素 expando
  Sortable<数字> 探针、news/carousel handle 正确、0 pageerror/0 console.error);
  构建 ✓ built in 18.57s / VITE_EXIT=0; TDZ src 38 + dist 26 全 PASS
2026-09-29 09:57:48 +08:00

59 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<title>卫星通信与导航应用技术创新赛</title>
<!-- 内联 Element Plus 主题色变量,确保 JS 初始化前 CSS 变量已存在 -->
<style>
:root {
--el-color-primary: #1a3a5c;
--el-color-primary-light-3: #4a6a8c;
--el-color-primary-light-5: #7a9abc;
--el-color-primary-light-7: #aacadc;
--el-color-primary-light-8: #c5dae8;
--el-color-primary-light-9: #e0eaf4;
--el-color-primary-dark-2: #152e4a;
--el-color-success: #67c23a;
--el-color-warning: #e6a23c;
--el-color-danger: #f56c6c;
--el-color-error: #f56c6c;
--el-color-info: #909399;
--el-color-white: #ffffff;
--el-color-black: #000000;
--el-bg-color: #ffffff;
--el-bg-color-page: #f5f6f8;
--el-bg-color-overlay: #ffffff;
--el-text-color-primary: #303133;
--el-text-color-regular: #606266;
--el-text-color-secondary: #909399;
--el-text-color-placeholder: #a8abb2;
--el-border-color: #dcdfe6;
--el-border-color-light: #e4e7ed;
--el-border-color-lighter: #ebeef5;
--el-border-color-extra-light: #f2f6fc;
--el-fill-color: #f0f2f5;
--el-fill-color-light: #f5f7fa;
--el-fill-color-blank: #ffffff;
}
</style>
<!-- 抑制 TRAE IDE 内置浏览器 getThemeColors 内部错误 -->
<script>
window.addEventListener('error', function(e) {
if (e.message && e.message.includes('getThemeColors')) {
e.preventDefault();
return false;
}
});
</script>
<!-- SortableJS 已改为 npm 依赖本地打包(见 src/main.js),不再从公网 CDN 引入:
内网/离线部署时 CDN 不可达会让 window.Sortable 缺失,
而 Admin.vue 中的 `if (!window.Sortable) return` 会静默吞掉新闻/轮播的拖拽排序功能。 -->
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>