翻譯:qyvlikmarkdown
應用的一個頁面。app
VPlayApps 1.0ide
Inherits: MouseAreapost
Inherited By: ListPagethis
Item
: NavigationStack
spa
backNavigationEnabled
: bool
翻譯
backgroundColor
: color
rest
canNavigateBack
: bool
code
leftBarItem
: Item
圖片
navigationBarHidden
: bool
navigationBarTranslucency
: real
navigationStack
: NavigationStack
rightBarItem
: Item
tabBarHidden
: bool
title
: string
titleItem
: Item
The Page type provides a container for the contents of a single page within an application.
應用的一個頁面提供一個內容。
Item
:NavigationStack
read-only
The nearest parent item in the QML hierarchy that is a NavigationStack
item. (read-only)
在 QML 層次中最親近的父級項 NavigationStack
。
If the current item or one of its parent items is a child of a NavigationStack
item, this property contains the owning NavigationStack
item. This property is null
if the Page
is not embedded inside a NavigationStack
item.
假設當前項的直接父級項是 NavigationStack
的孩子,則這個屬性會本身主動包括 NavigationStack
。假設這個屬性爲 null
。則 Page
不在 NavigationStack
中。
backNavigationEnabled
:bool
Set this property to false
to disable the back navigation within a page in a NavigationStack
if previous pages exist on the stack.
設置爲 false
,則不予顯示回退按鈕。
Disabling the back navigation hides the 「back」 button within a NavigationBar
, deactivates the iOS back swipe gesture and also disables the hardware back button on Android and Windows Phone.
隱藏位於 NavigationBar
上的回退按鈕,意味着 iOS 上滑動回退以及安卓和 WP 上硬件返回鍵無效。
The default value is false
, if the current page is the first one inside a NavigationStack
, true
otherwise.
假設當前頁面爲 NavigationStack
的第一個頁面,默認值爲 false
。
backgroundColor
:color
The background color of the Page
which is displayed if no other items are placed within the page.
Page
的背景色,假設沒有被其它項所替代,就會顯示此顏色。
The default value is defined in the Theme::backgroundColor
property and can be overridden.
默認值是 Theme::backgroundColor
,可又一次定義。
canNavigateBack
:bool
read-only
Readonly property holds whether it is possible to actually navigate back within the current stack. The property is true
if a previous page exists on the stack, otherwise false
.
當前頁面可否夠回退到上一級,僅僅讀。
This QML property was introduced in V-Play 2.7.0.
leftBarItem
:Item
A custom navigation bar item displayed on the left of the navigation bar if the item is on top of a NavigationStack
as a direct child of it.
假設 Page
是 NavigationStack
的直接孩子。則顯示本身定義導航欄左邊控件。
By default this item displays a back navigation item if the current NavigationStack
can navigate back. If setting the item to an explicit NavigationBarItem
it replaces the back button with the custom item.
假設當前 NavigationStack
可以回退至上一頁,則默認顯示一個回退按鈕。假設直接使用 NavigationBarItem
來替代的話。會顯示定製的控件。
navigationBarHidden
:bool
A boolean value indicating whether the navigation bar should be hidden for that specific Page if the item is presented within a NavigationStack
item.
You can set this property to false to implement a custom styled full-screen page within a NavigationStack
without the default navigation bar behavior (make sure to implement a custom back navigation action in that case).
By default this property is false
, meaning that the navigation bar is visible for that Page.
大致意思就是是否隱藏導航欄。
navigationBarTranslucency
:real
Set this value to make the navigation bar translucent for that specific Page within a NavigationStack
.
The allowed value range is 0.0 to 1.0. The default value is 0.0, meaning that the navigation bar is not translucent (fully opaque).
注意這裏的是系統的狀態欄作文章。具體就是一個應用以全屏方式顯示。但是狀態欄沒有被應用覆蓋,並且自身保持必定的透明度,以顯示下層的應用畫面。這裏是調整系統狀態欄的透明度的。默認值爲 0.0。不透明。
大致就是沉浸式了。
If using a translucent navigation bar, the page content will move beneath the navigation bar and you should add that extra spacing for your pages on your own (you can get the current height from ThemeNavigationBar::height
).
假設使用了沉浸式導航欄(系統狀態欄沉浸,與應用融爲一體),需要使用 ThemeNavigationBar::height
修復 Page
的高度。
navigationStack
:NavigationStack
read-only
The nearest parent item in the QML hierarchy that is a NavigationStack
item. (read-only)
在 QML 層次中最親近的父級項 NavigationStack
。
If the current item or one of its parent items is a child of a NavigationStack
item, this property contains the owning NavigationStack
item. This property is null
if the Page
is not embedded inside a NavigationStack
item.
假設當前項的直接父級項是 NavigationStack
的孩子,則這個屬性會本身主動包括 NavigationStack
。
假設這個屬性爲 null
。則 Page
不在 NavigationStack
中。
rightBarItem
:Item
A custom navigation bar item displayed on the right of the navigation bar if the item is on top of a NavigationStack
as a direct child of it.
假設 Page
是 NavigationStack
的直接孩子,則顯示本身定義導航欄右邊控件。
By default this item is empty.
默以爲空。
tabBarHidden
:bool
A boolean value indicating whether a tab bar should be hidden for that specific Page if the item is presented within a Navigation
item showing tabs.
By default this property is false
, meaning that the tab bar is visible for that Page.
是否顯示選項板控制控件。默認不顯示。
title
:string
A localized, human-readable string that represents the the content of this page.
The title is used as string in a navigation bar if the Page item is a child of a NavigationStack
.
顯示本頁面的標題,假設當前 Page
是 NavigationStack
的直接孩子。就顯示在導航欄上。
titleItem
:Item
A custom navigation bar item displayed at the title slot of the navigation bar if the item is on top of a NavigationStack as a direct child of it.
By default, the title of the page is displayed.
This QML property was introduced in V-Play 2.6.2.
用以顯示本身定義標題,好比帶有圖片的標題等。