This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

继续table

old
宇天 2020-07-17 15:15:23 +08:00
parent f7c455535f
commit f573fa5a61
3 changed files with 13 additions and 8 deletions

View File

@ -1,8 +1,9 @@
<template> <template>
<div class="table"> <div class="table">
<wc-tr class="thead"></wc-tr> <wc-tr thead class="thead"></wc-tr>
<wc-scroll class="tbody"><slot /></wc-scroll> <wc-scroll class="tbody"><slot /></wc-scroll>
<wc-tr class="tfoot"></wc-tr> <div class="line"></div>
<wc-tr tfoot class="tfoot"></wc-tr>
</div> </div>
</template> </template>
@ -36,6 +37,7 @@
border-top: 0; border-top: 0;
} }
.tbody { .tbody {
flex: 1;
border: 1px solid nth($cp, 3); border: 1px solid nth($cp, 3);
::slotted(wc-tr:last-child) { ::slotted(wc-tr:last-child) {

View File

@ -8,12 +8,12 @@
display: flex; display: flex;
align-items: center; align-items: center;
min-width: 60px; min-width: 60px;
// min-height: 36px;
// height: auto; // height: auto;
border-left: 1px solid nth($cp, 3); border-left: 1px solid nth($cp, 3);
.cell { .cell {
min-height: 36px; padding: var(--padding, 5px 8px);
padding: 3px 5px;
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }

View File

@ -6,17 +6,13 @@
:host { :host {
display: flex; display: flex;
// min-height: 36px; // min-height: 36px;
width: auto;
color: inherit; color: inherit;
.tr { .tr {
flex: 1; flex: 1;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
// border-top: var(--border, 0);
// border-right: var(--border, 0);
border-bottom: var(--border-bottom, 1px solid nth($cp, 3)); border-bottom: var(--border-bottom, 1px solid nth($cp, 3));
// border-left: var(--border, 0);
} }
} }
:host(:hover) { :host(:hover) {
@ -26,6 +22,13 @@
::slotted(wc-td:first-child) { ::slotted(wc-td:first-child) {
border-left: 0; border-left: 0;
} }
// :host([thead]) {
// ::slotted(wc-td) {
// min-height: 36px;
// --padding: 18px 8px;
// }
// }
</style> </style>
<script> <script>