大屏组件

This commit is contained in:
yanran200730
2023-03-08 17:16:03 +08:00
parent 452952670b
commit 341643a87e

View File

@@ -5,7 +5,9 @@
v-for="(item, index) in header"
:key="index"
:style="{
width: item.width + 'px', flex: item.width ? 'inherit' : 1}">
width: item.width + 'px',
flex: item.width ? 'inherit' : 1
}">
{{ item.v }}
</span>
</div>
@@ -75,12 +77,13 @@
})
this.header = value.map(v => {
console.log((Number(v.width)))
return {
v: v[headerKey],
width: v.width || ''
width: Number(v.width || 0) ? (Number(v.width || 0) + (this.isShowIndex === '1' ? 0 : 0)) : ''
}
})
console.log(this.header)
this.body = bodyKey.map(v => {
return value.map(e => {
return {
@@ -125,7 +128,7 @@
.body {
height: calc(100% - 40px);
padding: 10px 12px;
padding: 10px 20px;
overflow-y: auto;
box-sizing: border-box;
.row {