张延森 3 年 前
コミット
1159e62c94
共有1 個のファイルを変更した4 個の追加0 個の削除を含む
  1. 4
    0
      src/components/CustomNav/index.jsx

+ 4
- 0
src/components/CustomNav/index.jsx ファイルの表示

@@ -64,6 +64,10 @@ export default (props) => {
64 64
     }
65 65
   }
66 66
 
67
+  useEffect(() => {
68
+    Taro.setNavigationBarTitle(title)
69
+  }, [title])
70
+
67 71
   return (
68 72
     <view className='custom-nav' style={navStyle}>
69 73
       <view className='custom-nav-bar' style={navBarStyle}>