大屏样式完成

This commit is contained in:
aixianling
2024-02-08 11:09:18 +08:00
parent 1994faf5b8
commit 421d15e27e
2 changed files with 19 additions and 2 deletions

View File

@@ -192,6 +192,19 @@ export default {
const item = tableData[k.substring(1) || 0] || {}
item[prop] = v
tableData[k.substring(1) || 0] = item
}else if (k != columnProp) {
const index = columns.findIndex(e => k == e)
if (index > -1) {
const item = tableData[index] || {}
item[prop] = v
tableData[index] = item
} else {
columns.push(k)
const newIndex = columns.length - 1
const item = tableData[newIndex] || {}
item[prop] = v
tableData[newIndex] = item
}
}
})
})

View File

@@ -4,11 +4,11 @@
<template v-if="$slots.title" #title>
<slot name="title"/>
</template>
<div :style="{padding}">
<div :style="{padding}" class="content">
<slot/>
</div>
</component>
<div v-else :style="{padding}">
<div v-else :style="{padding}" class="content">
<slot style="width: 100%; height: 100%;"/>
</div>
</section>
@@ -74,5 +74,9 @@ export default {
* {
box-sizing: border-box;
}
.content {
height: 100%;
}
}
</style>