fix: 修改 tooltip type 无法选择的问题

This commit is contained in:
zhangyu
2023-02-23 18:07:34 +08:00
parent bcbeaa1843
commit 5bc8a34a2e
2 changed files with 12 additions and 1 deletions

View File

@@ -953,7 +953,10 @@
{{$t('overall.type')}}
</div>
<div class="form-row-value">
<el-input v-model="pen.data.tooltip.chartType" />
<!-- <el-input v-model="pen.data.tooltip.chartType" />-->
<el-select v-model="pen.data.tooltip.chartType" size="small" style="width: 100%">
<el-option v-for="item in chartType" :key="item.id" :value="item.id" :label='item.name'></el-option>
</el-select>
</div>
</div>
<div class="form-row-item form-row-item-full">
@@ -1035,6 +1038,11 @@ export default {
return {
theme: theme,
pen: {},
chartType: [
{ id: 'line', name: 'Line' },
{ id: 'area', name: 'Area' },
{ id: 'text', name: 'Text' }
],
penDash: [
{ d: 'M5 14 l85 0', 'stroke-dasharray': '', strokeColor: theme == 'light' ? 'black' : '#BEBEBE' },
{ d: 'M5 14 l85 0', 'stroke-dasharray': '5,5', strokeColor: theme == 'light' ? 'black' : '#BEBEBE' },

View File

@@ -47,6 +47,9 @@ export default {
params: {
immediate: true,
handler (n) {
if (this.params.chartType == 'text') {
return
}
this.chartInfo.type = this.params.chartType || 'line'
const chartData = []
const elements = []