fix: update table style

修复表格样式问题
This commit is contained in:
yanglbme 2019-12-26 22:30:20 +08:00
parent 15ddc9cad2
commit 6393c53d9a
3 changed files with 9 additions and 5 deletions

View File

@ -111,7 +111,11 @@ section {
display: table; display: table;
width: 100% !important; width: 100% !important;
} }
/*
.preview table tr:nth-child(even){
background: rgb(250, 250, 250);
}
*/
.select-item-left { .select-item-left {
float: left; float: left;
} }

View File

@ -181,10 +181,10 @@ let WxRenderer = function (opts) {
}; };
renderer.strong = text => `<strong ${getStyles('strong')}>${text}</strong>`; renderer.strong = text => `<strong ${getStyles('strong')}>${text}</strong>`;
renderer.em = text => `<p ${getStyles('p', ';font-style: italic;')}>${text}</p>`; renderer.em = text => `<p ${getStyles('p', ';font-style: italic;')}>${text}</p>`;
renderer.table = (header, body) => `<table class="preview-table"><thead ${getStyles('thead')}>${header}</thead><tbody>${body}</tbody></table>`; renderer.table = (header, body) => `<section style="padding:0 8px;"><table class="preview-table"><thead ${getStyles('thead')}>${header}</thead><tbody>${body}</tbody></table></section>`;
// renderer.tablerow = (text) => `<tr style="">${text}</tr>`;
renderer.tablecell = (text, flags) => `<td ${getStyles('td')}>${text}</td>`; renderer.tablecell = (text, flags) => `<td ${getStyles('td')}>${text}</td>`;
renderer.hr = () => `<hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);">`; renderer.hr = () => `<hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);">`;
return renderer; return renderer;
} }
}; };

View File

@ -155,11 +155,11 @@ let default_theme = {
}, },
thead: { thead: {
'background': 'rgba(0, 0, 0, 0.05)' 'background': 'rgba(0, 0, 0, 0.05)',
'font-weight': 'bold'
}, },
td: { td: {
'font-size': '80%',
'border': '1px solid #dfdfdf', 'border': '1px solid #dfdfdf',
'padding': '0.25em 0.5em' 'padding': '0.25em 0.5em'
}, },