From 6393c53d9a7f3d18e11e0b6d049343025065a871 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Thu, 26 Dec 2019 22:30:20 +0800 Subject: [PATCH] fix: update table style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复表格样式问题 --- assets/css/app.css | 6 +++++- assets/scripts/renderers/wx-renderer.js | 4 ++-- assets/scripts/themes/default-theme.js | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index bbce79c..6d430d3 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -111,7 +111,11 @@ section { display: table; width: 100% !important; } - +/* +.preview table tr:nth-child(even){ + background: rgb(250, 250, 250); +} + */ .select-item-left { float: left; } diff --git a/assets/scripts/renderers/wx-renderer.js b/assets/scripts/renderers/wx-renderer.js index 4d57f34..a2473dd 100644 --- a/assets/scripts/renderers/wx-renderer.js +++ b/assets/scripts/renderers/wx-renderer.js @@ -181,10 +181,10 @@ let WxRenderer = function (opts) { }; renderer.strong = text => `${text}`; renderer.em = text => `

${text}

`; - renderer.table = (header, body) => `${header}${body}
`; + renderer.table = (header, body) => `
${header}${body}
`; + // renderer.tablerow = (text) => `${text}`; renderer.tablecell = (text, flags) => `${text}`; renderer.hr = () => `
`; - return renderer; } }; diff --git a/assets/scripts/themes/default-theme.js b/assets/scripts/themes/default-theme.js index 302cefa..c58c587 100644 --- a/assets/scripts/themes/default-theme.js +++ b/assets/scripts/themes/default-theme.js @@ -155,11 +155,11 @@ let default_theme = { }, thead: { - 'background': 'rgba(0, 0, 0, 0.05)' + 'background': 'rgba(0, 0, 0, 0.05)', + 'font-weight': 'bold' }, td: { - 'font-size': '80%', 'border': '1px solid #dfdfdf', 'padding': '0.25em 0.5em' },