king
2021-05-13 145a6eb83133497b3863add21610ac6015e6533e
src/menu/components/card/data-card/index.jsx
@@ -34,13 +34,13 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,
    ismob: sessionStorage.getItem('appType') === 'mob',
    appType: sessionStorage.getItem('appType'),
    back: false
  }
  UNSAFE_componentWillMount () {
    const { card } = this.props
    const { ismob } = this.state
    const { appType } = this.state
    if (card.isNew) {
      let _card = {
@@ -67,7 +67,7 @@
        btnlog: [],
        subcards: [{
          uuid: Utils.getuuid(),
          setting: { width: ismob ? 24 : 6, type: 'simple'},
          setting: { width: appType === 'mob' ? 24 : 6, type: 'simple'},
          style: {
            borderWidth: '1px', borderColor: '#e8e8e8',
            paddingTop: '15px', paddingBottom: '15px', paddingLeft: '15px', paddingRight: '15px',
@@ -383,7 +383,7 @@
  }
  render() {
    const { card, ismob } = this.state
    const { card, appType } = this.state
    let offset = 0
    if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') {
@@ -403,7 +403,7 @@
        <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" />
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <CopyComponent type="datacard" card={card}/>
@@ -420,7 +420,7 @@
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
        <div style={{clear: 'both'}}></div>
        {card.wrap.pagestyle !== 'switch' && card.setting.laypage === 'true' ? <Pagination total={85} size="small" showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null}
        {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' ? <Pagination total={85} size="small" showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null}
      </div>
    )
  }