Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m34s
现象:图库 4 列排布时最右一列被窗口裁掉(用户截图)。 原因:renderGrid 用 wrap.clientWidth(面板全宽)当可用宽度,而实际滚动容器右侧还有滚动条与内边距, 列宽按全宽均分后总宽超出可视区,最右一列被裁。 改动(plugins/gallery/main.js): - 新增 usableW():沿 scrollerOf() 找到真正滚动的容器,取其 clientWidth 减去左右 padding 与 4px 余量 - renderGrid / measure 都改用 usableW(),并且每次都采用实测值(不再因为差值 ≤1 而沿旧值) - colW 改为 floor,避免四舍五入后 n 列总宽超出容器
20 lines
526 B
JSON
20 lines
526 B
JSON
{
|
|
"id": "gallery",
|
|
"name": "图库",
|
|
"version": "1.8.2",
|
|
"apiVersion": 1,
|
|
"main": "main.js",
|
|
"style": "styles.css",
|
|
"description": "右栏图片墙:筛选/多选/双击预览/插入画布/下载/删除(数据由客户端提供)",
|
|
"author": "official",
|
|
"icon": "🖼️",
|
|
"tags": [
|
|
"资源",
|
|
"图库"
|
|
],
|
|
"files": {
|
|
"main.js": "eb178baa9d1c8d3148e93e38513bd35754d720e8af8f02c53c041d7e1322dac3",
|
|
"styles.css": "14d374b5d0e1461cb1ca2b125865e9c27df7c3bd79c11caa0afc52152c7d0aef"
|
|
}
|
|
}
|