783
个编辑
无编辑摘要 |
无编辑摘要 |
||
第31行: | 第31行: | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
:css('max-width', '200px') | :css('max-width', '200px') | ||
:css('min-width', '200px') | |||
:attr('border', '1') | :attr('border', '1') | ||
:attr('cellspacing', '0') | :attr('cellspacing', '0') | ||
第73行: | 第73行: | ||
--在这里mainDiv添加样式 | --在这里mainDiv添加样式 | ||
:css('overflow', 'auto') | :css('overflow', 'auto') | ||
:css('max-width', '800px') | :css('max-width', '800px') | ||
--循环处理每一个勋章 | --循环处理每一个勋章 | ||
for i, awardNum in ipairs(awardNums) do | --splitCount为分割的数量 | ||
mainDiv:node(renderAwardDiv(awardNum, args)) | local splitCount = tonumber(args['splitCount']) | ||
if splitCount then | |||
for i, awardNum in ipairs(awardNums) do | |||
mainDiv:node(renderAwardDiv(awardNum, args)) | |||
if i%splitCount==0 then mainDiv:tag('br') end | |||
end | |||
else | |||
for i, awardNum in ipairs(awardNums) do | |||
mainDiv:node(renderAwardDiv(awardNum, args)) | |||
end | |||
end | end | ||