king
2020-09-03 af02b8f3c3ec9e5684be1084904d673429421d2b
src/menu/components/chart/antv-bar/index.jsx
@@ -6,6 +6,7 @@
import asyncComponent from '@/utils/asyncComponent'
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import './index.scss'
@@ -32,7 +33,8 @@
  UNSAFE_componentWillMount () {
    const { card, config } = this.props
    // card.dataName = Utils.getdataName()
    // this.props.updateConfig(card)
    if (card.isNew) {
      let _plot = {
        chartType: card.type, // 图表类型
@@ -68,11 +70,22 @@
        i++
      }
      let dataName = ''
      while (!dataName) {
        let _dataName = Utils.getdataName()
        if (config.components.filter(com => com.dataName === _dataName).length === 0) {
          dataName = _dataName
        }
      }
      let _card = {
        uuid: card.uuid,
        type: card.type,
        format: 'array',
        dataName: dataName,
        subtype: card.subtype,
        setting: {span: 12, height: 400, name},
        setting: {span: 12, height: 400, interType: 'system', name},
        columns: [],
        scripts: [],
        search: [],