king
2023-05-18 e9e8b1c7b481415714fff9a0d83099fd5a7d6ff0
src/menu/components/table/base-table/index.jsx
@@ -99,39 +99,6 @@
    MKEmitter.removeListener('completeSave', this.completeSave)
  }
  // updateFix = (card) => {
  //   let fixs = {}
  //   card.cols.forEach(col => {
  //     if (!col.field) return
  //     if (col.postfix || col.prefix) {
  //       fixs[col.field] = col
  //     }
  //   })
  //   card.cols.forEach(col => {
  //     if (col.type === 'custom') {
  //       col.elements.forEach(cell => {
  //         if (cell.datatype === 'dynamic') {
  //           cell.height = ''
  //           cell.innerHeight = 'auto'
  //           if (fixs[cell.field]) {
  //             if (!cell.prefix && fixs[cell.field].prefix) {
  //               cell.prefix = fixs[cell.field].prefix
  //             }
  //             if (!cell.postfix && fixs[cell.field].postfix) {
  //               cell.postfix = fixs[cell.field].postfix
  //             }
  //           }
  //         }
  //       })
  //     }
  //   })
  //   return card
  // }
  completeSave = () => {
    const { card } = this.state
@@ -255,8 +222,13 @@
    let _actions = [...action]
    cols.forEach(col => {
      if (col.type !== 'action') return
      _actions.push(...col.elements)
      if (col.type === 'custom') {
        col.elements.forEach(cell => {
          if (cell.eleType !== 'button') return
          _actions.push(cell)
        })
      }
    })
    return getWrapForm(wrap, _actions, columns)