king
2021-10-14 dddb2c96f42d9c852dba26ff9a27daa12bd85008
src/menu/components/card/cardcomponent/index.jsx
@@ -13,6 +13,7 @@
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardCellComponent = asyncComponent(() => import('../cardcellcomponent'))
const CardMenus = asyncComponent(() => import('./menus-wrap'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteController = asyncIconComponent(() => import('@/components/paste'))
@@ -192,8 +193,7 @@
        }
      })
    }
    return getSettingForm(card.setting, cards.subtype === 'propcard', buttons)
    return getSettingForm(card.setting, cards.subtype, buttons, card.$cardType, cards.columns)
  }
  updateSetting = (res) => {
@@ -273,6 +273,16 @@
    }
  }
  updateMenus = (res) => {
    const { card } = this.state
    this.setState({
      card: {...card, menus: res}
    })
    this.props.updateElement({...card, menus: res})
  }
  render() {
    const { cards, offset } = this.props
    const { card, elements, side } = this.state
@@ -303,6 +313,8 @@
                <NormalForm title="卡片设置" width={800} update={this.updateSetting} getForms={this.getSettingForms}>
                  <Icon type="edit" className="edit" title="编辑"/>
                </NormalForm>
                {cards.subtype === 'datacard' && card.$cardType !== 'extendCard' && card.setting.click === 'menus' ?
                  <CardMenus card={card} updateMenus={this.updateMenus}/> : null}
                <CopyComponent type="cardcell" card={card}/>
                <PasteController options={['action', 'customCardElement']} updateConfig={this.paste} />
                <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />