king
2021-08-11 a757b75163d77acc5111637fbe20ec61d895a72b
src/mob/components/tabs/antv-tabs/index.jsx
@@ -138,18 +138,34 @@
    MKEmitter.emit('changeStyle', [tabs.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], tabs.style)
  }
  changeTabStyle = () => {
    const { tabs } = this.state
    MKEmitter.emit('changeStyle', [tabs.uuid, 'tab'], ['font', 'padding'], tabs.tabStyle || {})
  }
  getStyle = (comIds, style) => {
    const { tabs } = this.state
    if (comIds.length !== 1 || comIds[0] !== tabs.uuid) return
    if (comIds[0] !== tabs.uuid) return
    let _card = {...tabs, style}
    if (comIds.length === 1) {
      let _card = {...tabs, style}
    this.setState({
      tabs: _card
    })
    this.props.updateConfig(_card)
      this.setState({
        tabs: _card
      })
      this.props.updateConfig(_card)
    } else if (comIds[1] === 'tab') {
      let _card = {...tabs, tabStyle: style}
      this.setState({
        tabs: _card
      })
      this.props.updateConfig(_card)
    }
  }
  handleTabsChange = (parentId) => {
@@ -353,6 +369,7 @@
  render() {
    const { tabs, dict, labelvisible, editab, appType } = this.state
    let _style = resetStyle(tabs.style)
    let _tabStyle = resetStyle(tabs.tabStyle)
    return (
      <div className={'mob-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}>
@@ -363,10 +380,11 @@
                <div className="mk-popover-control">
                  <Icon className="edit" title="edit" type="edit" onClick={() => this.editTab(tab)} />
                  <PasteController type="tab" Tab={tab} insert={this.insert} />
                  <Icon className="style" title="调整样式" onClick={this.changeTabStyle} type="font-colors" />
                  <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} />
                </div>
              } trigger="hover">
                <span>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>
                <span style={_tabStyle}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>
              </Popover>
            } key={tab.uuid}>
              {appType === 'mob' && tabs.setting.position === 'top' && tabs.setting.display === 'inline-block' && tab.hasSearch === 'icon' ?