Enhanced style compatibility.
This commit is contained in:
parent
6f784a3e36
commit
658537f155
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="dv-charts-container" :ref="ref">
|
||||
<div class="charts" :ref="chartRef" />
|
||||
<div class="charts-canvas-container" :ref="chartRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -30,6 +30,8 @@ export default {
|
|||
option () {
|
||||
let { chart, option } = this
|
||||
|
||||
if (!chart) return
|
||||
|
||||
if (!option) option = {}
|
||||
|
||||
chart.setOption(option)
|
||||
|
@ -67,7 +69,7 @@ export default {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.charts {
|
||||
.charts-canvas-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<template>
|
||||
<div class="dv-scroll-board" :ref="ref">
|
||||
<div class="header" v-if="header.length && mergedConfig">
|
||||
<div class="header" v-if="header.length && mergedConfig" :style="`background-color: ${mergedConfig.headerBGC};`">
|
||||
<div
|
||||
class="header-item"
|
||||
v-for="(headerItem, i) in header"
|
||||
:key="headerItem + i"
|
||||
:style="`
|
||||
background-color: ${mergedConfig.headerBGC};
|
||||
height: ${mergedConfig.headerHeight}px;
|
||||
line-height: ${mergedConfig.headerHeight}px;
|
||||
width: ${widths[i]}px;
|
||||
|
@ -19,7 +18,7 @@
|
|||
<div
|
||||
v-if="mergedConfig"
|
||||
class="rows"
|
||||
:style="`height: calc(100% - ${header.length ? mergedConfig.headerHeight : 0}px);`"
|
||||
:style="`height: ${height - (header.length ? mergedConfig.headerHeight : 0)}px;`"
|
||||
>
|
||||
<div
|
||||
class="row-item"
|
||||
|
@ -357,6 +356,12 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.dv-scroll-board {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
|
||||
.text {
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
|
@ -365,12 +370,6 @@ export default {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.dv-scroll-board {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
Loading…
Reference in New Issue