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:
7
package-lock.json
generated
7
package-lock.json
generated
@@ -14,6 +14,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"
|
||||
@@ -1680,6 +1681,12 @@
|
||||
"node": ">=12.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sortablejs": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
|
||||
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"license": "BSD-3-Clause",
|
||||
|
||||
Reference in New Issue
Block a user