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

优化表格

old
宇天 2020-05-12 18:43:11 +08:00
parent fef32d4fef
commit d74ccf6fc6
3 changed files with 9 additions and 3 deletions

View File

@ -58,10 +58,12 @@ export default class Table {
let w = flex[i] let w = flex[i]
if (typeof w === 'number') { if (typeof w === 'number') {
w = `flex="${w}"` w = `flex="${w}"`
} else { } else if (typeof w === 'string') {
w = `style="${w}"` w = `style="${w}"`
} else {
w = ''
} }
return `<wc-td align="center" ${w}>${name}</wc-td>` return `<wc-td leaf align="center" ${w}>${name}</wc-td>`
}) })
.join('') .join('')
} }

View File

@ -10,7 +10,7 @@
min-width: 60px; min-width: 60px;
min-height: 36px; min-height: 36px;
border-right: 1px solid nth($cp, 3); border-right: 1px solid nth($cp, 3);
border-bottom: 1px solid nth($cp, 3); border-top: 1px solid nth($cp, 3);
} }
:host([flex='2']) { :host([flex='2']) {
flex: 2; flex: 2;

View File

@ -11,6 +11,10 @@
background-color: #fbfbfb; background-color: #fbfbfb;
} }
:host(.thead) ::slotted(wc-td[leaf]) {
border-top: 0;
// border-bottom: 1px solid nth($cp, 3);
}
::slotted(wc-td:last-child) { ::slotted(wc-td:last-child) {
border-right: 0; border-right: 0;
} }