模块:Db:修订间差异
MJ Hamster(留言 | 贡献) 小无编辑摘要 |
MJ Hamster(留言 | 贡献) 小无编辑摘要 |
||
| 第411行: | 第411行: | ||
local output = {} | local output = {} | ||
-- 检查是否需要禁用宽度设置 | |||
local disableWidths = (#displayFields <= 8) | |||
-- 表格样式 | -- 表格样式 | ||
| 第425行: | 第428行: | ||
local separator = ' ' -- 默认分隔符是空格 | local separator = ' ' -- 默认分隔符是空格 | ||
-- BPM/Key/Duration 字段,固定宽度 6% | if not disableWidths then -- 宽度要求失效检查 | ||
-- BPM/Key/Duration 字段,固定宽度 6% | |||
if field == 'bpm' or field == 'key' or field == 'duration' then | |||
headerStyle = ' style="width: 6%;"' | |||
separator = ' | ' | |||
-- Pack 字段,固定宽度 10% | |||
elseif field == 'pack' then | |||
headerStyle = ' style="width: 10%;"' | |||
separator = ' | ' | |||
elseif mode then -- 谱面难度字段 (3.2% 固定宽度) | |||
headerStyle = ' style="width: 3.2%;"' | |||
separator = ' | ' | |||
elseif string.match(field, '_notes$') then -- NOTES 字段 (4% 固定宽度) | |||
headerStyle = ' style="width: 4%;"' | |||
separator = ' | ' | |||
end | |||
end | end | ||