king
2021-11-18 c98e45bfac25e9110ad0383faac54a54d98ea9d5
src/mob/components/topbar/normal-navbar/index.jsx
@@ -12,6 +12,7 @@
import './index.scss'
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
class NormalNavbar extends Component {
  static propTpyes = {
@@ -179,6 +180,19 @@
    this.updateComponent({...this.state.card, wrap: res})
  }
  skip = () => {
    const { wrap } = this.state.card
    if (!wrap.linkmenu) return
    MKEmitter.emit('changeEditMenu', {
      MenuID: wrap.linkmenu,
      copyMenuId: '',
      MenuNo: '',
      MenuName: '',
    })
  }
  render() {
    const { card } = this.state
@@ -187,10 +201,10 @@
      right = <Icon type="logout" />
    }
    if (card.wrap.scan === 'true') {
      right = !right ? <ExpandOutlined /> : <Icon type="ellipsis" />
      right = !right ? <ExpandOutlined onDoubleClick={this.skip}/> : <Icon type="ellipsis" />
    }
    if (card.wrap.refresh === 'true') {
      right = !right ? <ReloadOutlined /> : <Icon type="ellipsis" />
      right = !right ? <ReloadOutlined /> : <Icon type="ellipsis" onDoubleClick={this.skip}/>
    }
    return (
@@ -200,6 +214,7 @@
            <NormalForm title="导航栏设置" width={750} update={this.updateWrap} getForms={this.getWrapForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="topbar" card={card}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
          </div>