From bbcb3f45ad0ef4c808bf5a68ec10c0464c094e2f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 27 十月 2021 11:51:40 +0800
Subject: [PATCH] Merge branch 'master' into bms

---
 src/menu/components/share/normalheader/index.jsx |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/share/normalheader/index.jsx b/src/menu/components/share/normalheader/index.jsx
index adac673..2440a63 100644
--- a/src/menu/components/share/normalheader/index.jsx
+++ b/src/menu/components/share/normalheader/index.jsx
@@ -18,6 +18,10 @@
     updateComponent: PropTypes.func  // 閰嶇疆鏇存柊
   }
 
+  state = {
+    appType: sessionStorage.getItem('appType')
+  }
+
   componentDidMount () {
     MKEmitter.addListener('submitStyle', this.getStyle)
   }
@@ -49,14 +53,25 @@
   changeStyle = () => {
     const { config } = this.props
 
-    MKEmitter.emit('changeStyle', [config.uuid, 'header'], ['font', 'border'], config.headerStyle)
+    let options = ['font', 'border']
+    if (config.type === 'menubar') {
+      options.push('padding')
+    }
+
+    MKEmitter.emit('changeStyle', [config.uuid, 'header'], options, config.headerStyle)
   }
 
   render() {
     const { config, defaultshow, hideSearch } = this.props
+    const { appType } = this.state
 
     let title = config.plot ? config.plot.title : config.wrap.title
     let show = true
+
+    if (!title && appType === 'mob' && config.type === 'card' && config.subtype === 'datacard' && config.action && config.action.length) {
+      title = ' '
+    }
+
     if (defaultshow === 'hidden') {
       if (!title && (!config.search || config.search.length === 0)) {
         show = false
@@ -65,7 +80,7 @@
     let _style = resetStyle(config.headerStyle)
 
     return (
-      <div className={'normal-header' + (!show ? ' hidden' : '')} style={_style}>
+      <div className={'normal-header' + (!show ? ' hidden' : '') + (config.wrap && config.wrap.searchable === 'true' ? ' tree-search' : '')} style={_style}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
@@ -73,6 +88,7 @@
         } trigger="hover">
           <span className="title">{title}</span>
         </Popover>
+        {config.wrap && config.wrap.searchable === 'true' ? <span className="ant-input-search ant-input-affix-wrapper"><span className="ant-input-suffix"><Icon type="search" /></span></span> : null}
         {hideSearch !== 'true' && config.search ? <SearchComponent config={config} updatesearch={this.props.updateComponent}/> : null}
       </div>
     )

--
Gitblit v1.8.0