king
2023-06-30 874b48da44ea0f7ddca00fb865647fe5ea5f906f
src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -1512,12 +1512,29 @@
    const { node } = this.state
    if (node.shape === 'edge') {
      let labels = this.selectNode.prop('labels')
      if (!labels || labels.length === 0) {
        labels = [{
          attrs: {label: { text: '' }}
        }]
      }
      if (key === 'title') {
        this.selectNode.setLabels(value)
        labels = JSON.parse(JSON.stringify(labels))
        labels[0].attrs.label.text = value
        this.selectNode.setLabels(labels)
      } else if (key === 'stroke') {
        this.selectNode.attr('line/stroke', value)
      } else if (key === 'strokeWidth') {
        this.selectNode.attr('line/strokeWidth', value)
      } else if (key === 'fontSize') {
        labels = JSON.parse(JSON.stringify(labels))
        labels[0].attrs.label.fontSize = value
        this.selectNode.setLabels(labels)
      } else if (key === 'fontFill') {
        labels = JSON.parse(JSON.stringify(labels))
        labels[0].attrs.label.fill = value
        this.selectNode.setLabels(labels)
      } else if (key === 'lineType') {
        if (value === 'dash') {
          this.selectNode.attr('line/strokeDasharray', 5)