king
2021-12-18 b223552a0c4bc787ad251add025a93d77527ffbe
src/menu/components/card/table-card/index.jsx
@@ -109,6 +109,25 @@
      if (!_card.action) {
        _card.action = []
      }
      if (this.state.appType === 'mob') {
        _card.action = _card.action.map(item => {
          if (!item.color) {
            if (item.sqlType === 'LogicDelete' || item.sqlType === 'delete') {
              item.color = 'danger'
            } else if (item.sqlType === 'insert') {
              item.color = 'success'
            } else if (item.sqlType === 'update' || item.sqlType === 'insertOrUpdate' || item.sqlType === 'custom') {
              item.color = 'primary'
            } else if (item.sqlType === 'audit') {
              item.color = 'warning'
            } else {
              item.color = 'weak'
            }
          }
          return item
        })
      }
      this.setState({
        card: _card
      })