大屏样式完成
This commit is contained in:
@@ -192,6 +192,19 @@ export default {
|
|||||||
const item = tableData[k.substring(1) || 0] || {}
|
const item = tableData[k.substring(1) || 0] || {}
|
||||||
item[prop] = v
|
item[prop] = v
|
||||||
tableData[k.substring(1) || 0] = item
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<template v-if="$slots.title" #title>
|
<template v-if="$slots.title" #title>
|
||||||
<slot name="title"/>
|
<slot name="title"/>
|
||||||
</template>
|
</template>
|
||||||
<div :style="{padding}">
|
<div :style="{padding}" class="content">
|
||||||
<slot/>
|
<slot/>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</component>
|
||||||
<div v-else :style="{padding}">
|
<div v-else :style="{padding}" class="content">
|
||||||
<slot style="width: 100%; height: 100%;"/>
|
<slot style="width: 100%; height: 100%;"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -74,5 +74,9 @@ export default {
|
|||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user