From 7649274a4bc498b643e17a144cb980927b13ffa9 Mon Sep 17 00:00:00 2001 From: hyrious Date: Tue, 16 May 2023 11:21:40 +0800 Subject: [PATCH] refactor(flat-components): workaround table style on electron 12 --- .../src/components/UsersPanel/style.less | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/flat-components/src/components/UsersPanel/style.less b/packages/flat-components/src/components/UsersPanel/style.less index 8e181c3158f..6375d4ba663 100644 --- a/packages/flat-components/src/components/UsersPanel/style.less +++ b/packages/flat-components/src/components/UsersPanel/style.less @@ -53,6 +53,9 @@ } .users-panel-list { + display: flex; + flex-flow: column nowrap; + thead { height: 40px; background-color: #F9F9F9; @@ -60,15 +63,22 @@ } th { - text-align: left; - padding: 8px 0 8px 16px; - min-width: 128px; font-weight: 400; } + tr { + display: flex; + align-items: center; + } + + th, td { + flex: 1; + display: inline-flex; + max-width: 133px; text-align: left; padding: 12px 0 12px 16px; + overflow: hidden; } } @@ -80,6 +90,11 @@ color: var(--text-weaker); } +.users-panel-items { + display: flex; + flex-flow: column nowrap; +} + .users-panel-list-item { font-size: 0; position: relative; @@ -96,14 +111,18 @@ } .users-panel-list-avatar-name { + flex: 1; + overflow: hidden; display: inline-flex; align-items: center; gap: 8px; } .users-panel-list-name-wrapper { + flex: 1; display: flex; flex-direction: column; + overflow: hidden; } .users-panel-list-name-content { @@ -114,7 +133,6 @@ } .users-panel-list-name { - max-width: 100px; display: inline-flex; gap: 4px; font-size: 14px;