CN-38 feat: 添加 chart type 31

This commit is contained in:
zhangyu
2021-06-23 15:57:34 +08:00
parent 407e1c9c9f
commit becfb5b120
23 changed files with 334 additions and 51 deletions

View File

@@ -8,26 +8,27 @@
<slot name="operations"></slot>
</div>
</div>
<div class="cn-chart__body">
<div class="cn-chart__body" :class="{'pie-with-table': isPieWithTable}">
<slot></slot>
</div>
<div class="cn-chart__footer" v-if="layout.indexOf(layoutConstant.FOOTER) > -1">
<div class="cn-chart__footer" v-if="layout.indexOf(layoutConstant.FOOTER) > -1" :class="{'pie-with-table': isPieWithTable}">
<slot name="footer"></slot>
</div>
</div>
</template>
<script>
import { layoutConstant } from '@/components/charts/chart-options'
import { layoutConstant, isEchartsWithTable } from '@/components/charts/chart-options'
export default {
name: 'EchartsFrame',
props: {
layout: Array
layout: Array,
chartInfo: {}
},
setup () {
setup (props) {
return {
layoutConstant
layoutConstant,
isPieWithTable: isEchartsWithTable(props.chartInfo.type)
}
},
mounted () {
@@ -35,6 +36,9 @@ export default {
}
</script>
<style>
</style>
<style scoped>
.cn-panel .cn-chart__echarts .pie-with-table{
flex: 1;
padding: 10px;
}
</style>