提交 5acbbc31 authored 作者: wangjiahao's avatar wangjiahao

refactor:仪表板视图详情背景优化,跟随仪表板背景

上级 df2e1f08
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
</el-radio-group> </el-radio-group>
</div> </div>
<el-tooltip :content="$t('panel.fontSize')"> <el-tooltip :content="$t('panel.fontSize')">
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" /> <i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" />
</el-tooltip> </el-tooltip>
...@@ -123,6 +122,17 @@ export default { ...@@ -123,6 +122,17 @@ export default {
tooltip: this.$t('panel.text_align_right'), tooltip: this.$t('panel.text_align_right'),
label: 'right' label: 'right'
} }
],
'v-text': [
'textAlign',
'fontSize',
'fontWeight',
'letterSpacing',
'opacity',
'borderRadius',
'color',
'backgroundColor',
'hyperlinks'
] } ] }
}, },
watch: { watch: {
...@@ -140,6 +150,9 @@ export default { ...@@ -140,6 +150,9 @@ export default {
// console.log('mainWidthOffset:' + this.mainWidthOffset) // console.log('mainWidthOffset:' + this.mainWidthOffset)
}, },
computed: { computed: {
attrShow(attr) {
return style
},
letterDivColor() { letterDivColor() {
const style = { const style = {
height: '2px', height: '2px',
......
<template> <template>
<de-container> <de-container>
<de-aside-container v-if="!chart.type.includes('table')"> <de-aside-container v-if="!chart.type.includes('table')" :style="customStyle">
<chart-component v-if="!chart.type.includes('text')" class="chart-class" :chart="chart" /> <chart-component v-if="!chart.type.includes('text')" class="chart-class" :chart="chart" />
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" /> <label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
</de-aside-container> </de-aside-container>
...@@ -19,6 +19,7 @@ import DeMainContainer from '@/components/dataease/DeMainContainer' ...@@ -19,6 +19,7 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer' import DeContainer from '@/components/dataease/DeContainer'
import DeAsideContainer from '@/components/dataease/DeAsideContainer' import DeAsideContainer from '@/components/dataease/DeAsideContainer'
import { export_json_to_excel } from '@/plugins/Export2Excel' import { export_json_to_excel } from '@/plugins/Export2Excel'
import { mapState } from 'vuex'
export default { export default {
name: 'UserView', name: 'UserView',
...@@ -38,6 +39,32 @@ export default { ...@@ -38,6 +39,32 @@ export default {
refId: null refId: null
} }
}, },
computed: {
customStyle() {
let style = {
}
if (this.canvasStyleData.openCommonStyle) {
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
style = {
background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`,
...style
}
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
style = {
background: this.canvasStyleData.panel.color,
...style
}
}
}
return style
},
...mapState([
'isClickComponent',
'curComponent',
'componentData',
'canvasStyleData'
])
},
methods: { methods: {
exportExcel() { exportExcel() {
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name) const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论