king
2022-10-22 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a
src/menu/components/table/normal-table/columns/index.jsx
@@ -277,6 +277,13 @@
    let _columns = fromJS(this.state.columns).toJS()
    let col = { focus: true, uuid: Utils.getuuid(), label: 'label', field: '', type: item.subType, elements: [] }
    if (col.type === 'colspan') {
      col.subcols = []
    } else if (col.type === 'action') {
      col.label = '操作'
    } else if (col.type === 'index') {
      col.label = '序号'
    }
    _columns.splice(hoverIndex, 0, col)
@@ -290,7 +297,7 @@
  loopCol = (columns, col) => {
    return columns.map(column => {
      if (column.type === 'colspan') {
        column.subcols = this.loopCol(column.subcols, col)
        column.subcols = this.loopCol(column.subcols || [], col)
      }
      if (column.uuid === col.uuid) {
        return col