頁面.json用來對本頁面的窗口表現進行配置。
它只能針對window配置,並且會覆蓋 app.json 的 window 中相同的配置項。
1 { 2 3 /** 4 * 以下是頁面頂部導航欄設置 5 **/ 6 "navigationBarBackgroundColor" : "[Color]", // 導航欄背景顏色,默認值:#000000 7 "navigationBarTextStyle" : "white|black", // 導航欄標題顏色,默認值white 8 "navigationBarTitleText": "[String]" , // 導航欄標題文字內容 9 10 /** 11 * 以下是下拉刷新或上拉觸底設置 12 **/ 13 "backgroundColor" : "[Color]", // 窗口的背景色 14 "backgroundTextStyle" : "dark|light", // 下拉 loading 的樣式,默認值dark(暗) 15 "enablePullDownRefresh" : true|false, // 是否全局開啟下拉刷新,值 true | false 16 "onReachBottomDistance" : [Number], // 頁面上拉觸底事件觸發時距頁面底部距離,單位為px,默認值 50 17 "disableScroll" : true|false // 設置為 true 則頁面整體不能上下滾動;只在頁面配置中有效,無法在 app.json 中設置該項 18 19 /** 20 * usingComponents 定義自定義組件(僅在本頁面中可用) 21 **/ 22 "usingComponents": { 23 "component-tag-name": "component-path", // 格式:組件標簽名稱 : 自定義組件路徑 24 // 可定義多個自定義組件 25 } 26 27 }