king
2024-06-07 8040a18c4b2a848d252bf01838f06c7aec1be9f3
src/menu/components/share/actioncomponent/index.jsx
@@ -120,7 +120,17 @@
    const { card, actionlist } = this.state
    let _card = fromJS(card).toJS()
    _card.style = style
    _card.style = fromJS(style).toJS()
    if (_card.style.paddingLeft === '15px') {
      delete _card.style.paddingLeft
    }
    if (_card.style.paddingRight === '15px') {
      delete _card.style.paddingRight
    }
    if (_card.style.minHeight === '28px') {
      delete _card.style.minHeight
    }
    let _actionlist = actionlist.map(cell => {
      if (cell.uuid === _card.uuid) return _card
@@ -136,7 +146,11 @@
  changeBtnStyle = (element) => {
    let _style = element.style ? fromJS(element.style).toJS() : {}
    let options = ['font', 'border', 'background', 'margin', 'padding']
    let options = ['font', 'border', 'background', 'margin', 'padding', 'minHeight']
    _style.paddingLeft = _style.paddingLeft || '15px'
    _style.paddingRight = _style.paddingRight || '15px'
    _style.minHeight = _style.minHeight || '28px'
    this.setState({
      card: element
@@ -148,6 +162,8 @@
  addButton = (cardId, element) => {
    if (cardId !== this.props.config.uuid) return
    delete element.eleType
    const { actionlist } = this.state
    this.setState({actionlist: [...actionlist, element]})
@@ -206,8 +222,10 @@
        supId = ''
      }
    }
    let menu = window.GLOB.customMenu
    
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId)
    let modules = MenuUtils.getSubModules(menu.components, config.uuid, supId, menu.interfaces || null)
    if (config.subtype === 'basetable') {
      delete card.eleType // 区分按钮位置
@@ -218,7 +236,7 @@
        formlist: getBaseTableActionForm(card, functip, config, usefulFields, modules)
      })
    } else {
      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, config.uuid) || []
      let anchors = MenuUtils.getAnchors(menu.components, config.uuid) || []
  
      this.setState({
        visible: true,
@@ -283,12 +301,17 @@
              output: 'true',
              required: 'false',
              type: 'text',
              noValue: 'true',
              uuid: Utils.getuuid()
            }
  
            if (item.type === 'number') {
              cell.type = 'number'
              cell.decimal = item.decimal
              if (item.noValue === 'hide') {
                cell.noValue = 'false'
              }
            }
  
            columns.push(cell)
@@ -407,10 +430,11 @@
            btn.style = item.style || {}
            if (btn.class) {
              if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || (item.focus && !btn.style.color)) {
                if (btn.show === 'icon') {
                  btn.style.color = color[btn.class]
                  btn.style.backgroundColor = 'transparent'
                } else if (btn.class === 'default') {
                // if (btn.show === 'icon') {
                //   btn.style.color = color[btn.class]
                //   btn.style.backgroundColor = 'transparent'
                // }
                if (btn.class === 'default') {
                  btn.style.color = 'rgba(0, 0, 0, 0.65)'
                  btn.style.backgroundColor = '#fff'
                  btn.style.borderColor = '#d9d9d9'
@@ -419,6 +443,7 @@
                  btn.style.color = color[_c]
                  btn.style.backgroundColor = '#fff'
                  btn.style.borderColor = color[_c]
                  btn.style.borderWidth = '1px'
                } else if (btn.class === 'gray') {
                  btn.style.color = 'rgba(0, 0, 0, 0.65)'
                  btn.style.backgroundColor = color[btn.class]
@@ -709,6 +734,7 @@
          destroyOnClose
        >
          <ActionForm
            type={config.type === 'tree' ? 'card' : ''}
            card={card}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}