diff --git a/frontend/src/views/chart/components/map/MapController.vue b/frontend/src/views/chart/components/map/MapController.vue index 706abe3663..2f877ceae4 100644 --- a/frontend/src/views/chart/components/map/MapController.vue +++ b/frontend/src/views/chart/components/map/MapController.vue @@ -79,10 +79,19 @@ export default { this.chart.customAttr = JSON.stringify(this.customAttr) }, callParent(methodName, param) { - this.$emit(methodName, param) + this.$emit(this.toLowerLine(methodName), param) }, init() { + }, + toLowerLine(str) { + var temp = str.replace(/[A-Z]/g, function(match) { + return '-' + match.toLowerCase() + }) + if (temp.slice(0, 1) === '-') { + temp = temp.slice(1) + } + return temp } } }