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
This commit is contained in:
2026-09-29 09:57:48 +08:00
parent cb672b621a
commit 042e0a8e1f
4 changed files with 18 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
"axios": "^1.6.0",
"element-plus": "^2.5.0",
"pinia": "^2.1.0",
"sortablejs": "^1.15.0",
"spark-md5": "^3.0.2",
"vue": "^3.4.0",
"vue-router": "^4.3.0"