Unverified 提交 ae38dc27 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #2169 from dataease/pr@dev@fix_view-image-export-botton

fix: 表格明细无需显示导出图片按钮
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="exportExcel"><svg-icon icon-class="ds-excel" class="ds-icon-excel" />Excle</el-dropdown-item> <el-dropdown-item @click.native="exportExcel"><svg-icon icon-class="ds-excel" class="ds-icon-excel" />Excle</el-dropdown-item>
<el-dropdown-item icon="el-icon-picture-outline" @click.native="exportViewImg">{{ $t('chart.image') }}</el-dropdown-item> <el-dropdown-item v-if="showExportImgButton" icon="el-icon-picture-outline" @click.native="exportViewImg">{{ $t('chart.image') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</span> </span>
...@@ -137,6 +137,9 @@ export default { ...@@ -137,6 +137,9 @@ export default {
created() { created() {
}, },
computed: { computed: {
showExportImgButton() {
return this.showChartInfo.type && !this.showChartInfo.type.includes('table')
},
canvasInfoMainStyle() { canvasInfoMainStyle() {
if (this.backScreenShot) { if (this.backScreenShot) {
return { return {
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="exportExcel"><svg-icon icon-class="ds-excel" class="ds-icon-excel" />Excle</el-dropdown-item> <el-dropdown-item @click.native="exportExcel"><svg-icon icon-class="ds-excel" class="ds-icon-excel" />Excle</el-dropdown-item>
<el-dropdown-item icon="el-icon-picture-outline" @click.native="exportViewImg">{{ $t('chart.image') }}</el-dropdown-item> <el-dropdown-item v-if="showExportImgButton" icon="el-icon-picture-outline" @click.native="exportViewImg">{{ $t('chart.image') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</span> </span>
...@@ -952,6 +952,10 @@ export default { ...@@ -952,6 +952,10 @@ export default {
} }
}, },
computed: { computed: {
showExportImgButton() {
// if the chart type belong to table,'export image' button should be hidden
return this.showChartInfo.type && !this.showChartInfo.type.includes('table')
},
showGrid() { showGrid() {
if (this.canvasStyleData && this.canvasStyleData.aidedDesign) { if (this.canvasStyleData && this.canvasStyleData.aidedDesign) {
return this.canvasStyleData.aidedDesign.showGrid return this.canvasStyleData.aidedDesign.showGrid
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论