From e1cee96b38805bcccf48e7bcb9d296f2bc54c720 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 24 一月 2025 11:10:32 +0800 Subject: [PATCH] 2025-01-24 --- src/tabviews/custom/components/share/normalheader/index.jsx | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/tabviews/custom/components/share/normalheader/index.jsx b/src/tabviews/custom/components/share/normalheader/index.jsx index 92848b7..34f8a6b 100644 --- a/src/tabviews/custom/components/share/normalheader/index.jsx +++ b/src/tabviews/custom/components/share/normalheader/index.jsx @@ -9,7 +9,6 @@ class NormalHeader extends Component { static propTpyes = { BID: PropTypes.any, // 涓婄骇涓婚敭鍊� - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 config: PropTypes.object, // 閰嶇疆淇℃伅 refresh: PropTypes.func // 鏉′欢鍒锋柊 } @@ -28,7 +27,14 @@ }) } - shouldComponentUpdate (nextProps, nextState) { return false } + shouldComponentUpdate (nextProps, nextState) { + const { config } = this.props + + if (config.checkBid && this.props.BID !== nextProps.BID) { + return true + } + return false + } /** * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊锛屾竻闄ゅ揩鎹烽敭璁剧疆 @@ -40,7 +46,7 @@ } render() { - const { config, menuType, BID } = this.props + const { config, BID } = this.props const { title, show } = this.state if (!title && !show) return null @@ -48,7 +54,7 @@ return ( <div className={'normal-header' + (show ? ' header-search' : '')} style={config.headerStyle}> <span className="title">{title}</span> - {show ? <SearchComponent config={config} BID={BID} menuType={menuType} refreshdata={this.props.refresh}/> : null} + {show ? <SearchComponent config={config} BID={BID} refreshdata={this.props.refresh}/> : null} </div> ) } -- Gitblit v1.8.0