模块:Test:修订间差异
跳到导航
跳到搜索
无编辑摘要 |
无编辑摘要 |
||
第20行: | 第20行: | ||
params["header_color" ] = {' ','#005AB5'} | params["header_color" ] = {' ','#005AB5'} | ||
params["header_bg_color" ] = {' ','#ffffff'} | params["header_bg_color" ] = {' ','#ffffff'} | ||
params["display" ] = {'true', 'true', 'true'} | params["display" ] = {'true', 'true', 'true'} | ||
params["col_width" ] = {'fit-content', 'fit-content', 'fit-content'} | params["col_width" ] = {'fit-content', 'fit-content', 'fit-content'} | ||
params["col_height" ] = {'fit-content', 'fit-content', 'fit-content'} | params["col_height" ] = {'fit-content', 'fit-content', 'fit-content'} | ||
params["bottom" ] = {' ','返回'} | |||
params["bottom_col_width" ] = {'fit-content', 'fit-content', 'fit-content'} | |||
params["bottom_col_height" ] = {'fit-content', 'fit-content', 'fit-content'} | |||
params["bottom_color" ] = {' ','#005AB5'} | |||
params["bottom_bg_color" ] = {' ','#ffffff'} | |||
params["border_color" ] = { | params["border_color" ] = { | ||
第48行: | 第52行: | ||
' ', | ' ', | ||
"1px 1px 1px 1px" | "1px 1px 1px 1px" | ||
} | |||
params["bottom_border_style" ] = { | |||
' ', | |||
"solid solid solid solid" | |||
} | |||
params["bottom_border_width" ] = { | |||
' ', | |||
"1px 1px 1px 1px" | |||
} | |||
params["bottom_border_color" ] = { | |||
' ', | |||
'#878787 #878787 #878787 #878787' | |||
} | } | ||
第70行: | 第89行: | ||
"header_color" , | "header_color" , | ||
"header_bg_color" , | "header_bg_color" , | ||
"display" , | "display" , | ||
"col_width" , | "col_width" , | ||
第81行: | 第99行: | ||
"header_border_width" , | "header_border_width" , | ||
"text" , | "text" , | ||
"bottom_text" , | |||
"bottom_color" , | |||
"bottom_bg_color" , | |||
"bottom_col_width" , | |||
"bottom_col_height" , | |||
"bottom_border_color" , | |||
"bottom_border_style" , | |||
} | } | ||
--Header | --Header | ||
第86行: | 第111行: | ||
local row = tbl:tag('tr') | local row = tbl:tag('tr') | ||
for i=1,3 do | for i=1,3 do | ||
if params["display"][i] == "true" then | if params["display"][i] == "true" then | ||
local header_th = row:tag('th') | local header_th = row:tag('th') | ||
第106行: | 第130行: | ||
end | end | ||
end | end | ||
function renderRow(row_id, args, tbl) | function renderRow(row_id, args, tbl) | ||
第138行: | 第162行: | ||
end | end | ||
--Bottom | |||
function renderBottom(tbl) | |||
local row = tbl:tag('tr') | |||
for i=1,3 do | |||
if params["display"][i] == "true" then | |||
local header_th = row:tag('th') | |||
header_th | |||
:wikitext(params["bottom"][i]) | |||
:css('padding' ,'10px') | |||
:css('font-size' ,'1.2rem') | |||
:css('width' , params["bottom_col_width" ][i]) | |||
:css('height' , params["bottom_col_height" ][i]) | |||
:css('color' , params["bottom_color" ][i]) | |||
:css('background-color' , params["bottom_bg_color" ][i]) | |||
:css('border-width' , params["bottom_border_width" ][i]) | |||
:css('border-color' , params["bottom_border_color" ][i]) | |||
:css('border-style' , params["bottom_border_style" ][i]) | |||
:css('text-align' , params["bottom_text" ][i]) | |||
end | |||
end | |||
end | |||
--处理表格 | --处理表格 | ||
function renderTable(args, row_ids) | function renderTable(args, row_ids) |