From f573fa5a611c90e46cadf3ed0f37c1a7dd7cf4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Fri, 17 Jul 2020 15:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=ADtable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/table/index.wc | 6 ++++-- src/table/td.wc | 4 ++-- src/table/tr.wc | 11 +++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/table/index.wc b/src/table/index.wc index 97a9928..7e38f96 100644 --- a/src/table/index.wc +++ b/src/table/index.wc @@ -1,8 +1,9 @@ @@ -36,6 +37,7 @@ border-top: 0; } .tbody { + flex: 1; border: 1px solid nth($cp, 3); ::slotted(wc-tr:last-child) { diff --git a/src/table/td.wc b/src/table/td.wc index 2fad6cc..ff928f2 100644 --- a/src/table/td.wc +++ b/src/table/td.wc @@ -8,12 +8,12 @@ display: flex; align-items: center; min-width: 60px; + // min-height: 36px; // height: auto; border-left: 1px solid nth($cp, 3); .cell { - min-height: 36px; - padding: 3px 5px; + padding: var(--padding, 5px 8px); word-wrap: break-word; word-break: break-all; } diff --git a/src/table/tr.wc b/src/table/tr.wc index 01957aa..c86c96e 100644 --- a/src/table/tr.wc +++ b/src/table/tr.wc @@ -6,17 +6,13 @@ :host { display: flex; // min-height: 36px; - width: auto; color: inherit; .tr { flex: 1; display: flex; flex-wrap: nowrap; - // border-top: var(--border, 0); - // border-right: var(--border, 0); border-bottom: var(--border-bottom, 1px solid nth($cp, 3)); - // border-left: var(--border, 0); } } :host(:hover) { @@ -26,6 +22,13 @@ ::slotted(wc-td:first-child) { border-left: 0; } + +// :host([thead]) { +// ::slotted(wc-td) { +// min-height: 36px; +// --padding: 18px 8px; +// } +// }