fix: 抽取修改别名方法为全局 修改正则
This commit is contained in:
@@ -293,7 +293,7 @@ import chartGroup from './chart-group'
|
||||
import logs from './logs'
|
||||
import { fromRoute } from '@/components/common/js/constants'
|
||||
import chartTempData from '@/components/charts/chartTempData'
|
||||
import { chartResizeTool } from '@/components/common/js/tools'
|
||||
import { chartResizeTool, dealLegendAlias } from '@/components/common/js/tools'
|
||||
export default {
|
||||
name: 'chartList',
|
||||
props: {
|
||||
@@ -1164,7 +1164,7 @@ export default {
|
||||
host = chartItem.elements[innerPos].expression
|
||||
}
|
||||
// 处理legend别名
|
||||
let alias = this.$refs['editChart' + chartItem.id][0].dealLegendAlias(host, chartItem.elements[innerPos].legend)
|
||||
let alias = dealLegendAlias(host, chartItem.elements[innerPos].legend)
|
||||
if (!alias || alias === '') {
|
||||
alias = host
|
||||
}
|
||||
@@ -1404,7 +1404,7 @@ export default {
|
||||
host += '}'
|
||||
}
|
||||
// 处理legend别名
|
||||
let alias = this.$refs['editChart' + chartInfo.id][0].dealLegendAlias(host, chartInfo.elements[0].legend)
|
||||
let alias = dealLegendAlias(host, chartInfo.elements[0].legend)
|
||||
if (!alias || alias === '') {
|
||||
alias = host
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user