All files / src/components/u-form-table.vue index.vue

68.42% Statements 13/19
33.33% Branches 2/6
33.33% Functions 1/3
72.22% Lines 13/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74      7x     7x             7x           7x 7x             7x 7x 7x 7x 7x 7x 7x           7x                                                                    
<template>
<table :class="$style.root">
    <slot></slot>
</table>
</template>
 
<script>
export default { name: 'u-form-table' };
</script>
 
<style module>
.root {
    table-layout: fixed;
    width: 580px;
}
 
.root[size="full"] {
    width: 100%;
}

.root thead {
    color: var(--form-table-head-color);
    line-height: 40px;
    border-bottom: 1px solid var(--border-color-base);
}

.root thead tr {
    background: var(--form-table-head-background);
}
 
.root thead th {
    position: relative;
    font-weight: normal;
    text-align: left;
    height: 44px;
    padding: var(--form-table-head-padding);
}
 
.root tbody td {
    padding: 0;
    padding-top: 15px;
    padding-right: 10px;
}
 
.root tbody td:last-child {
    padding-right: 0;
}
 
.root[size="mini"] {
    width: auto;
}
 
.root[size="mini"] thead {
    line-height: 32px;
}
 
.root[size="mini"] thead th {
    height: 32px;
}
 
.root[size="mini"] tbody tr:first-child td {
    padding-top: 0;
}
 
.root[size="mini"] tbody td {
    padding-top: 10px;
}
 
.root[size="mini"] .remove-button {
    height: 20px;
    line-height: 20px;
    font-size: 20px;
}</style>